复制gameserver文件夹
重命名为s2
\s2\config.xml
:箭头部分全部修改
添加 start.sh
- #!/bin/bash
echo “正在启动世界服务”
cd /data/server/worldserver/unix
./start_worldserver.sh
sleep 3
echo “世界服务启动完成”
echo “正在启动一区”
cd /data/server/gameserver/unix
./start_gameserver.sh
sleep 3
echo “一区启动完成”
echo “正在启动二区”
cd /data/server/s2/unix
./start_gameserver.sh
sleep 3
echo “二区启动完成”
/www/wwwroot/127.0.0.1/cdn/serverlist.json
- {
“Status”: 0,
“Message”: “success”,
“serverList”: [{
“id”: “700001”,
“name”: “一区”,
“ip”: “118.25.79.121”,
“port”: 10001,
“zone”: “10001”,
“open”: 1
},
{
“id”: “700002”,
“name”: “二区”,
“ip”: “118.25.79.121”,
“port”: 10002,
“zone”: “10002”,
“open”: 1
}],
“userServer”: [
{“id”:”700002″,”PartnerId”:”7″,”GameServerId”:”700002″,”loginTime”:”1573745061″,”name”:””},
{“id”:”700001″,”PartnerId”:”7″,”GameServerId”:”700001″,”loginTime”:”1573745061″,”name”:””}
],
“curTime”: 1573745101
}
复制代码
/www/wwwroot/127.0.0.1/cdn/serverlist.php
- {
“Status”: 0,
“Message”: “success”,
“serverList”: [{
“id”: “700001”,
“name”: “一区”,
“ip”: “118.25.79.121”,
“port”: 10001,
“zone”: “10001”,
“open”: 1
},
{
“id”: “700002”,
“name”: “二区”,
“ip”: “118.25.79.121”,
“port”: 10002,
“zone”: “10002”,
“open”: 1
}],
“userServer”: [
{“id”:”700002″,”PartnerId”:”7″,”GameServerId”:”700002″,”loginTime”:”1573745061″,”name”:””},
{“id”:”700001″,”PartnerId”:”7″,”GameServerId”:”700001″,”loginTime”:”1573745061″,”name”:””}
],
“curTime”: 1573745101
}
复制代码创建并导入二区数据库
mysql -uroot -p123456
create database s2;
use s2;
set names utf8;
source /server/sql/gameserver.sql;
flush privileges;
exit 回车退出
启动游戏
over