LoginSignup
4
4

More than 3 years have passed since last update.

UnityCacheServerをLinux上に立ててサービス化する

Last updated at Posted at 2018-07-18

UnityCacheServerの構築&サービス化のまとめ。

UnityCacheServer: 6.02
OS: AmazonLinux2

インストール

管理しやすいようにnpmでインストール

curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash -
sudo yum -y install nodejs
sudo npm install unity-cache-server -g

→/usr/lib/node_modules/unity-cache-server/ 以下に展開される

サービス化

sudo adduser unity -s /sbin/nologin
sudo chown -R unity:unity /usr/lib/node_modules/unity-cache-server
sudo vi /etc/systemd/system/unity-cache-server.service
/etc/systemd/system/unity-cache-server.service
[Unit]
Description=Unity Cache Server Service
After=network.target

[Service]
Type=simple
User=unity
ExecStart=/usr/bin/unity-cache-server
Restart=on-abort

[Install]
WantedBy=multi-user.target
sudo systemctl enable unity-cache-server

→これで以下サービスコマンドが実行可能 & サーバ再起動時に自動起動される

sudo service unity-cache-server start
sudo service unity-cache-server status
sudo service unity-cache-server stop
sudo service unity-cache-server restart

設定ファイル

/usr/lib/node_modules/unity-cache-server/config/default.yml

参考URL

https://networm.me/unity-cache-server-setup.html
https://docs.unity3d.com/ja/current/Manual/CacheServer.html
https://github.com/Unity-Technologies/unity-cache-server
https://dev.classmethod.jp/cloud/aws/release-change-ebs-volume-size/

4
4
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4