在CentOS 6上搭建 方舟:生存进化 服务器
Foreword
In 2018, Steam had been started a Chinese Spring Festival Selling Activity, I buy a ARK: Survival Evolved in this activity. Though I can’t play it at the moment, but I can setup a server. Luckily, I have an avaliable VPS.
Contents
Prepare
- A 4GB RAM or higher VPS
- CentOS 6 or higher system
Installation
Update glibc
In CentOS 6, we must update our glibc from 2.14 to 2.16. First, switch to root user or you should add sudo before every command.
1 | su |
Then, input these commands to have prerequisites.
1 | yum groupinstall "Development tools" |
Change directory to /tmp
1 | cd /tmp |
Download the version 2.16.0 of glibc
1 | wget http://ftp.gnu.org/gnu/glibc/glibc-2.16.0.tar.gz |
Unarchive it
1 | tar zxvf glibc-2.16.0.tar.gz |
Change directory to glibc-2.16.0
1 | cd glibc-2.16.0 |
Make a new directory to save build files
1 | mkdir glibc-build |
Change to it
1 | cd glibc-build |
Run configure
1 | ../configure --prefix='/usr' |
Notice: There are two
.before the wordconfigure.
Tips:
--prefix='XXX'means the directory where the glibc will install.
Then,we need to have some changes in the file test-installation.pl
1 | vim ../scripts/test-installation.pl |
To jump to 171th line, press : and type 171 and ENTER.
And replace if (/$ld_so_name/) { with if (/\Q$ld_so_name\E/) {
Then install it
1 | make && make install |
Update gcc
Notice: This operation takes a lot of space! Be sure to have enough!
Like the last step, so I gave commands only.
1 | cd /tmp |
Install Third Party Dependency
In 64-bit system
1 | yum install mailx postfix curl wget bzip2 gzip unzip python binutils bc tmux glibc.i686 libstdc++ libstdc++.i686 |
In 32-bit system
1 | yum install mailx postfix curl wget bzip2 gzip unzip python binutils bc tmux libstdc++ |
Notice: If there’s not tmux, change your repo by inputing
bash
1
2 rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
yum install epel-releaseor input
bash
1
2 wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -ivh epel-release-6-8.noarch.rpmFor 32-bit user, replace
x86_64withi386.
Install arkserver
Switch to root.
1 | su |
Create a user.
1 | useradd arkserver |
Find where the sudoers is.
1 | whereis sudoers |
Add it to sudoers. And you should replace /etc/sudoers with the path your whereis command found.
1 | chmod u+x /etc/sudoers |
Find the line where you can see root ALL=(ALL) ALL. It is near 90th line.
Then create a new line after this line, type
1 | arkserver ALL=(ALL) ALL |
Switch permission and login
1 | chmod u-x /etc/sudoers |
Download and run the script
1 | wget -N --no-check-certificate https://gameservermanagers.com/dl/linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh arkserver |
Run the installer and follow the instructions
1 | ./arkserver install |
Usage
All Commands
A complete list of commands can be found by typing
1 | ./arkserver |
Below are the most common commands available.
Running
Start
1 | ./arkserver start |
Stop
1 | ./arkserver stop |
Restart
1 | ./arkserver restart |
Console
Console allows you to view the live console of a server as it is running and allow you to enter commands; if supported.
1 | ./arkserver console |
Notice: To exit the console press
CTRL+B+D.
PressingCTRL+Cwill terminate the server.
Updating
Update
Update checks for any server updates and applies them. The server will update and restart only if required.
1 | ./arkserver update |
Bypass the check and go straight to SteamCMD update.
1 | ./arkserver force-update |
Validate
You can use the SteamCMD validate option when updating the server.
1 | ./arkserver validate |
Debugging
Details
You can get all important and useful details about the server such as passwords, ports, config files etc.
1 | ./arkserver details |
Debug
Use debug mode to help you if you are having issues with the server. Debug allows you to see the output of the server directly to your terminal allowing you to diagnose any problems the server might be having.
1 | ./arkserver debug |
Logs
Server logs are available to monitor and diagnose your server. Script, console and game server (if available) logs are created for the server.
1 | /home/arkserver/logs |
Backup
Backup will allow you to create a complete bzip2 archive of the whole server.
1 | ./arkserver backup |
Monitor
LinuxGSM can monitor the game server by checking that the proccess is running and querying it. Should the server go offline LinuxGSM can restart the server and send you an alert. You can use cronjobs to setup monitoring.
1 | ./arkserver monitor |
Configure LinuxGSM
For details on how to alter LinuxGSM settings visit LinuxGSM Config Files page.
Further Information
For more information and documentation about LinuxGSM see the wiki that will give you plenty of detail about how everything works.


