快速在linux服务器上搭建insurgency正版可用服务器

快速在centos和debain系(ubuntu)上搭建一个正版刷的出来带vac的服务器

这里以合作模式为默认模式。。。


首先安装运行环境:

Centos:

yum install screen xulrunner.i686

Debian or Ubuntu:

apt-get install ia32-libs screen

创建游戏运行用的用户

useradd steam

passwd steam

登进去。。。

su - steam

下载安装steamcmd然后下载游戏

wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz

tar xvfz steamcmd_linux.tar.gz

./steamcmd.sh

login anonymous

force_install_dir /home/steam/ins2

app_update 237410 validate

创建游戏配置文件

cd /home/steam/ins2/insurgency/cfg

touch server.cfg

修改server.cfg如下

// ---------------------------------------------------------------
// Server Info Options
// ---------------------------------------------------------------
hostname "your server name"	// 修改成你想要的服务器的名字
rcon_password ""	// 修改rcon 的管理密码
sv_password ""		// 修改服务器密码
sv_minrate 30000 // recommended minimum rate

// ---------------------------------------------------------------
// Server Download Options (Community made maps) 
// ---------------------------------------------------------------
// sv_downloadurl "<type-url-here>"
// sv_allowdownload 1
// sv_allowupload 1

// ---------------------------------------------------------------
// Server Logging Options
// ---------------------------------------------------------------
log on
sv_logbans 1
sv_logecho 1
sv_logfile 1
sv_log_onefile 0

// ---------------------------------------------------------------
// Game Mode Options (Change text with in the quotes)
// ---------------------------------------------------------------
// "mapcycle.txt" - by default this contains the most popular options
// "mapcycle_all.txt"  - all possible map/mode combinations for PvP
// "mapcycle_ambush.txt" - only ambush (VIP) mode
// "mapcycle_attackdefend.txt" - mix of attack/defend modes
// "mapcycle_cooperative.txt" - checkpoint, outpost, hunt
// "mapcycle_firefight.txt" - all firefight maps
// "mapcycle_flashpoint.txt" - all flashpoint maps
// "mapcycle_infiltrate.txt" - all infiltrate (CTF) maps
// "mapcycle_objrespawn.txt" - all modes featuring respawning for completing objectives
// "mapcycle_occupy.txt" - all occupy maps
// "mapcycle_push.txt" - all push maps
// "mapcycle_singlelife.txt" - mix of all single life modes
// "mapcycle_skirmish.txt" - all skirmish maps
// "mapcycle_workshop.txt" - used by Workshop system
mapcyclefile "mapcycle_cooperative.txt" //修改地图循环,按照上面的选项修改,这里默认为合作模式

// ---------------------------------------------------------------
// Enabling Matchmaking (Change text with in the quotes)
// More info: http://steamcommunity.com/app/222880/discussions/2/558746089590579609/
// ---------------------------------------------------------------
// "pvp" (Player vs Player)
// "custom" (Custom rules and modded servers)
// "coop" (Cooperative)
sv_playlist coop //默认模式为合作模式
cd /home/steam/ins2

touch run.sh

然后修改run.sh

export LD_LIBRARY_PATH=/home/steam/ins2:/home/steam/ins2/bin:{$LD_LIBRARY_PATH}
./srcds_linux -console -ip 改成你的服务器ip -port 27015 +map market_coop +maxplayers 32
chmod a+x run.sh

启动游戏

screen ./run.sh

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注