Infernales/Sandbox – User
Jump to navigation
Jump to search
Infernales (talk | contribs) No edit summary |
Lou Montana (talk | contribs) m (*Some* wiki formatting) |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
{{Feature|warning|''' | {{TOC|side}} | ||
{{Feature|warning| | |||
Do '''not''' run the server as {{hl|root}}!<br> | |||
All actions in this guide were performed as a normal user or under {{hl|sudo}}. | |||
}} | |||
== | == Download SteamCMD == | ||
'''Debian:'''<syntaxhighlight> | |||
'''Debian:''' | |||
<syntaxhighlight lang="bash"> | |||
sudo apt-get install lib32gcc-s1 | sudo apt-get install lib32gcc-s1 | ||
</syntaxhighlight>'''RHEL:'''<syntaxhighlight> | </syntaxhighlight> | ||
'''RHEL:'''<syntaxhighlight lang="bash"> | |||
sudo yum install glibc.i686 libstdc++.i686 | sudo yum install glibc.i686 libstdc++.i686 | ||
</syntaxhighlight>'''Arch Linux:'''<syntaxhighlight> | </syntaxhighlight> | ||
'''Arch Linux:'''<syntaxhighlight lang="bash"> | |||
sudo pacman -Syy glibc lib32-glibc nano | sudo pacman -Syy glibc lib32-glibc nano | ||
</syntaxhighlight> | </syntaxhighlight> | ||
After installing these packages, do the following:<syntaxhighlight> | After installing these packages, do the following: | ||
<syntaxhighlight lang="bash"> | |||
mkdir -p ~/servers/steamcmd && cd ~/servers/steamcmd | mkdir -p ~/servers/steamcmd && cd ~/servers/steamcmd | ||
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - | curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf - | ||
</syntaxhighlight> | </syntaxhighlight> | ||
====''' | == Download DayZ Server == | ||
'''Stable branch:'''<syntaxhighlight> | |||
{{Feature|informative| | |||
* Instead of '''your_login''', you must indicate your Steam login. | |||
* Updating the server is performed using the same commands as installation. | |||
}} | |||
=== Without Mods === | |||
'''Stable branch:''' | |||
<syntaxhighlight lang="bash"> | |||
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login your_login +app_update 223350 +quit | ~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login your_login +app_update 223350 +quit | ||
</syntaxhighlight>'''Experimental branch:'''<syntaxhighlight> | </syntaxhighlight> | ||
'''Experimental branch:''' | |||
<syntaxhighlight lang="bash"> | |||
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login your_login +app_update 1042420 +quit | ~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login your_login +app_update 1042420 +quit | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === With Mods === | ||
Let's install two mods on a stable branch: {{Link|https://steamcommunity.com/sharedfiles/filedetails/?id{{=}}1559212036|Community Framework}} and {{Link|https://steamcommunity.com/sharedfiles/filedetails/?id{{=}}1564026768|Community Online Tools}}: | |||
<syntaxhighlight lang="bash"> | |||
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login yout_login +app_update 223350 +workshop_download_item 221100 1559212036 +workshop_download_item 221100 1564026768 +quit | ~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login yout_login +app_update 223350 +workshop_download_item 221100 1559212036 +workshop_download_item 221100 1564026768 +quit | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== | |||
{{Feature| | == Run DayZ Server == | ||
=== | |||
<syntaxhighlight> | {{Feature|important|Do not forget to {{Link|DayZ:Server Configuration|configure}} the server before running.}} | ||
=== Without Mods === | |||
<syntaxhighlight lang="bash"> | |||
сd ~/servers/dayz-server/ | сd ~/servers/dayz-server/ | ||
./DayZServer -config=serverDZ.cfg -port=2301 -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck | ./DayZServer -config=serverDZ.cfg -port=2301 -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== | === With Mods === | ||
In this example, there will still be two mods: Community Framework and Community Online Tools.<syntaxhighlight> | |||
In this example, there will still be two mods: Community Framework and Community Online Tools. | |||
<syntaxhighlight lang="bash"> | |||
cd ~/servers/dayz-server/ | cd ~/servers/dayz-server/ | ||
ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1559212036 ~/servers/dayz-server/1559212036 | ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1559212036 ~/servers/dayz-server/1559212036 | ||
ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1564026768 ~/servers/dayz-server/1564026768 | ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1564026768 ~/servers/dayz-server/1564026768 | ||
ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1559212036/keys/* ~/servers/dayz-server/keys/ | ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1559212036/keys/* ~/servers/dayz-server/keys/ | ||
./DayZServer -config=serverDZ.cfg -port=2301 "-mod=1559212036;1564026768;" -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck | ./DayZServer -config=serverDZ.cfg -port=2301 "-mod=1559212036;1564026768;" -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Controls|Ctrl|C}} - Close the server. | |||
=== | === As Daemon With Restart and Auto-Update === | ||
{{Feature|informative| | |||
* Instead of '''your_login''', you must indicate your Steam login. | |||
* Instead of '''your_username''' should be your username in the OS. | |||
}} | |||
# '''Without mods:''' nano ~/servers/dayz-server/update.sh<syntaxhighlight> | ==== Create The Initial Scripts ==== | ||
# Depending on mods: | |||
</syntaxhighlight>'''With mods:''' nano ~/servers/dayz-server/update.sh<syntaxhighlight> | #* '''Without mods:''' nano ~/servers/dayz-server/update.sh <syntaxhighlight lang="bash"> | ||
/home/your_username/servers/steamcmd/steamcmd.sh +force_install_dir /home/your_username/servers/dayz-server/ +login your_login +app_update 223350 +quit | |||
rm | </syntaxhighlight> | ||
ln -s | #* '''With mods:''' nano ~/servers/dayz-server/update.sh <syntaxhighlight lang="bash"> | ||
ln -s | /home/your_username/servers/steamcmd/steamcmd.sh +force_install_dir /home/your_username/servers/dayz-server/ +login your_login +app_update 223350 +workshop_download_item 221100 1559212036 +workshop_download_item 221100 1564026768 +quit | ||
rm /home/your_username/servers/dayz-server/1559212036 /home/your_username/servers/dayz-server/1564026768 /home/your_username/servers/dayz-server/keys/Jacob_Mango_V3.bikey | |||
ln -s /home/your_username/servers/dayz-server/steamapps/workshop/content/221100/1559212036 /home/your_username/servers/dayz-server/1559212036 | |||
ln -s /home/your_username/servers/dayz-server/steamapps/workshop/content/221100/1564026768 /home/your_username/servers/dayz-server/1564026768 | |||
ln -s /home/your_username/servers/dayz-server/steamapps/workshop/content/221100/1559212036/keys/* /home/your_username/servers/dayz-server/keys/ | |||
</syntaxhighlight> | </syntaxhighlight> | ||
# Ctrl | # {{Controls|Ctrl|O}} | ||
# Ctrl | # {{Controls|Ctrl|X}} | ||
# sudo chmod +x ~/servers/dayz-server/update.sh | # sudo chmod +x ~/servers/dayz-server/update.sh | ||
# sudo nano /etc/systemd/system/dayz-server.service<syntaxhighlight> | # sudo nano /etc/systemd/system/dayz-server.service<syntaxhighlight lang="ini"> | ||
[Unit] | [Unit] | ||
Description=DayZ Dedicated Server | Description=DayZ Dedicated Server | ||
Line 94: | Line 123: | ||
# sudo systemctl daemon-reload | # sudo systemctl daemon-reload | ||
==== | ==== Daemon Commands ==== | ||
'''sudo systemctl enable dayz-server''' - Enables server autostart when the OS starts. | * '''sudo systemctl enable dayz-server''' - Enables server autostart when the OS starts. | ||
* '''sudo systemctl disable dayz-server''' - Disables server autostart when the OS starts. | |||
'''sudo systemctl disable dayz-server''' - Disables server autostart when the OS starts. | * '''sudo systemctl start dayz-server''' - Starting the server. | ||
* '''sudo systemctl restart dayz-server''' - Restarting the server. | |||
'''sudo systemctl start dayz-server''' - Starting the server. | * '''sudo systemctl stop dayz-server''' - Stopping the server. | ||
* '''sudo systemctl status dayz-server''' - Checking the server status. | |||
'''sudo systemctl restart dayz-server''' - Restarting the server. | |||
'''sudo systemctl stop dayz-server''' - Stopping the server. | |||
'''sudo systemctl status dayz-server''' - Checking the server status. |
Latest revision as of 11:43, 14 February 2024
Download SteamCMD
Debian:
sudo apt-get install lib32gcc-s1
RHEL:
sudo yum install glibc.i686 libstdc++.i686
Arch Linux:
sudo pacman -Syy glibc lib32-glibc nano
After installing these packages, do the following:
mkdir -p ~/servers/steamcmd && cd ~/servers/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
Download DayZ Server
Without Mods
Stable branch:
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login your_login +app_update 223350 +quit
Experimental branch:
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login your_login +app_update 1042420 +quit
With Mods
Let's install two mods on a stable branch: Community Framework and Community Online Tools:
~/servers/steamcmd/steamcmd.sh +force_install_dir ~/servers/dayz-server/ +login yout_login +app_update 223350 +workshop_download_item 221100 1559212036 +workshop_download_item 221100 1564026768 +quit
Run DayZ Server
Without Mods
сd ~/servers/dayz-server/
./DayZServer -config=serverDZ.cfg -port=2301 -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck
With Mods
In this example, there will still be two mods: Community Framework and Community Online Tools.
cd ~/servers/dayz-server/
ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1559212036 ~/servers/dayz-server/1559212036
ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1564026768 ~/servers/dayz-server/1564026768
ln -s ~/servers/dayz-server/steamapps/workshop/content/221100/1559212036/keys/* ~/servers/dayz-server/keys/
./DayZServer -config=serverDZ.cfg -port=2301 "-mod=1559212036;1564026768;" -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck
Ctrl + C - Close the server.
As Daemon With Restart and Auto-Update
Create The Initial Scripts
- Depending on mods:
- Without mods: nano ~/servers/dayz-server/update.sh
/home/your_username/servers/steamcmd/steamcmd.sh +force_install_dir /home/your_username/servers/dayz-server/ +login your_login +app_update 223350 +quit
- With mods: nano ~/servers/dayz-server/update.sh
/home/your_username/servers/steamcmd/steamcmd.sh +force_install_dir /home/your_username/servers/dayz-server/ +login your_login +app_update 223350 +workshop_download_item 221100 1559212036 +workshop_download_item 221100 1564026768 +quit rm /home/your_username/servers/dayz-server/1559212036 /home/your_username/servers/dayz-server/1564026768 /home/your_username/servers/dayz-server/keys/Jacob_Mango_V3.bikey ln -s /home/your_username/servers/dayz-server/steamapps/workshop/content/221100/1559212036 /home/your_username/servers/dayz-server/1559212036 ln -s /home/your_username/servers/dayz-server/steamapps/workshop/content/221100/1564026768 /home/your_username/servers/dayz-server/1564026768 ln -s /home/your_username/servers/dayz-server/steamapps/workshop/content/221100/1559212036/keys/* /home/your_username/servers/dayz-server/keys/
- Without mods: nano ~/servers/dayz-server/update.sh
- Ctrl + O
- Ctrl + X
- sudo chmod +x ~/servers/dayz-server/update.sh
- sudo nano /etc/systemd/system/dayz-server.service
[Unit] Description=DayZ Dedicated Server Wants=network-online.target After=syslog.target network.target nss-lookup.target network-online.target [Service] ExecStartPre=/home/your_username/servers/dayz-server/update.sh ExecStart=/home/your_username/servers/dayz-server/DayZServer -config=serverDZ.cfg -port=2301 "-mod=1559212036;1564026768;" -BEpath=battleye -profiles=profiles -dologs -adminlog -netlog -freezecheck WorkingDirectory=/home/your_username/servers/dayz-server/ LimitNOFILE=100000 ExecReload=/bin/kill -s HUP $MAINPID ExecStop=/bin/kill -s INT $MAINPID User=your_username Group=users Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target
- sudo systemctl daemon-reload
Daemon Commands
- sudo systemctl enable dayz-server - Enables server autostart when the OS starts.
- sudo systemctl disable dayz-server - Disables server autostart when the OS starts.
- sudo systemctl start dayz-server - Starting the server.
- sudo systemctl restart dayz-server - Restarting the server.
- sudo systemctl stop dayz-server - Stopping the server.
- sudo systemctl status dayz-server - Checking the server status.