0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

マイクラサーバを立てる!その2

Posted at

systemctlコマンドで、起動と停止が行えるようにする。

rootになってファイルを作成

su -
cd /etc/systemd/system
vi neoforge.service
cat neoforge.service 
[Unit]
Description=launch neoforge server
After=network-online.target

[Service]
User=minecraft
WorkingDirectory=/home/minecraft/neoforge-server
ExecStart=/home/minecraft/neoforge-server/run.sh
Restart=always
TimeoutStartSec=180

[Install]
WantedBy = multi-user.target

workingDirectoryとExecStartのパスは実際のパスに修正をしてね。

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?