更新系统
yum update
yum upgrade -y
添加用户
adduser csgo
passwd csgo
开放端口
firewall-cmd --zone=public --add-port=27015/tcp --permanent
firewall-cmd --zone=public --add-port=27015/udp --permanent
firewall-cmd --reload
安装依赖
yum install glibc.i686 libstdc++.i686 -y
执行如下命令
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
tar xf steamcmd_linux.tar.gz
安装CSGO
./steamcmd.sh
login anonymous
force_install_dir ./csgo
app_update 740 validate
当你看到Success! App '740' fully installed
时,说明你安装好了,退出即可
使用命令修改配置文件
nano ~/csgo/csgo/cfg/server.cfg
修改如下两行
hostname "ServerName" #主机名
rcon_password RconPassword #管理密码
执行如下命令来启动
cd /home/csgo/csgo/
screen -dmS csgo ./srcds_run -game csgo -console -port 27015 +game_type 0 +game_mode 1 +mapgroup mg_bomb +map de_nuke -autoupdate
接下来,就是打开客户端开始爽啦!