|
- 游戏服务器搭建 game_server_id.tar.gz
- 1.复制代码,取game_server拷贝到/data目录下,取app代码到game_server目录下
- 2.修改游戏服配置文件 (config配置文件下)
- (1) 修改master.json文件 (游戏服环境配置)
- 配置启动的环境id,以及端口
- (2) 修改servers.json (游戏服对外开放配置)
- 配置环境id
- 游戏服的realhost(服务器ip)
- 游戏服进程对应端口 (对外开放的端口)
- (3) 修改server_congfig.json (游戏服连接配置)
- 配置 startPid (玩家唯一标识,同一登入服不能重复)
- MYSQL地址以及端口 (支付信息存储)
- MONGO地址以及端口 (游戏玩家数据,游戏日志存储)
- CURRENT_SERVER (服务器唯一识别id,用于登入支付连接识别)
- gift_code_server的ip端口 (礼包服连接,用于sdk生成兑换)
- Platform地址端口 (用于连接登入服)
- 例:
- {
- "game_version": 180000, (游戏版本信息)
- "startPID":1800000, (玩家pid)
- "debugBattle":false,
- "mysql_pay_server": { (连接mysql地址,端口)
- "host": "172.31.48.28",
- "port": 3306,
- "user": "root", (连接mysql的用户密码)
- "password": "leyun1324",
- "db": "pay_aly009" (创建 mysql 支付的表)
- },
- "mysql_account_server": {
- "host": "172.31.48.28",
- "port": 3306,
- "user": "root",
- "password": "leyun1324",
- "db": "account"
- },
- "ccy_data_server": { (玩家新增,留存查询)
- "host": "111.111.111.111",
- "port": 3306,
- "user": "root",
- "password": "leyun1324",
- "db": "ccy_data"
- },
- "uc_info":{
- "apiKey":"5c04925674920eb58467fb52ce4ef728",
- "cpId":"49347",
- "gameId":"320676"
- },
- "lj_secretKey": "93a95852b5854f88931f29c255664e64",
- "app_secret_360": "43f2e67d84dbab68dd804a14e64718b4",
- "productCode": "p976",
- "pay_url":"http://127.0.0.1:",
- "mongodb_server": { (mongodb配置)
- "host": "172.31.48.28", (mongo的ip端口)
- "port": 27209,
- "db": "game_aly009", (mongo玩家信息数据库)
- "reconnect": 5000
- },
- "mongodb_log_server": {
- "host": "172.31.48.28", (mongodb连接ip 端口)
- "port": 27209,
- "db": "dc_aly009", (mongo日志信息数据库)
- "reconnect": 5000
- },
- "cache_config": {
- "maxAge": 300000,
- "max": 2000
- },
- "master":{
- "host":"127.0.0.1",
- "post":"10000"
- },
- "current_server": 9,
- "log_server": {
- "host":"127.0.0.1",
- "httpPort":7937
- },
- "gift_code_server": {
- "host":"172.31.48.19",
- "httpPort":7936
- },
- "platform": {
- "host":"120.92.146.148",
- "httpPort":8930
- },
- "monitor":{
- "host": "127.0.0.1",
- "port": 8300
- },
- "needStartDB": false,
- "current_server_info": [{
- "id": 1,
- "name": "嘉年华"
- }, {
- "id": 2,
- "name": "内测服"
- }],
- "current_server_info_remark": "为了合服需求,server_id设定为数组,初始可能是[{}}]这样的结构,合服后[{},{}]"
- }
复制代码
|
|