坦克风云+战舰Linux超详细架设教程

阿里技术整理

linux7.2  64

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

Nginx1.16  MYSQL5.5  PHP5.6

设置数据库密码为: mnXQID9C

mysql -u root -pmnXQID9C


  GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'mnXQID9C' WITH GRANT OPTION;
  FLUSH   PRIVILEGES;
  GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'mnXQID9C' WITH GRANT OPTION;
  FLUSH   PRIVILEGES;
  grant all privileges on *.* to 'root'@'%' identified by 'mnXQID9C';

GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'mnXQID9C' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'mnXQID9C' WITH GRANT OPTION;
FLUSH   PRIVILEGES;
CREATE DATABASE IF NOT EXISTS alliance_1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_ext1 DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_global DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_kflog DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_kuafu DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_raypayment DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
CREATE DATABASE IF NOT EXISTS tank_account DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
exit

然后使用n11连接数据库导入数据库文件:

数据库文件在  opt.tar.gz 包 解压出来的\opt\sql\

重点:首先需要解压出数据库文件,然后使用n++修改一下数据库文件 把 111.231.69.125  替换成服务器ip 然后再导入数据库

把 opt.tar.gz  上传到服务器根目录

cd /

tar -zxvf  opt.tar.gz

chmod -R 777 /opt

服务端修改: 把下面的文件的 114.67.212.154 , 10.135.136.228  这两个ip改成你的服务器ip

\opt\tankserver\game\tank-luascripts\config\config.lua

\opt\tankserver\game\webroot\gamemetrics\application\config\taskconfigs.php

\opt\tankserver\game\webroot\rayapi\cfg\config\cfg_metric.php

\opt\tankserver\game\webroot\rayapi\cfg\config\cfg_pay.php

\opt\tankserver\game\webroot\tank-server\application\tasks\config.php

\opt\tankserver\game\webroot\tankheroandroidclient\getAppUrl.html

\opt\tankserver\game\webroot\tankheroandroidclient\getconfig.php

\opt\tankserver\game\webroot\tankheroandroidclient\getconfig_test.php

\opt\tankserver\game\webroot\tankheroandroidclient\load_new.php

\opt\tankserver\game\webroot\tankheroandroidclient\load_test.php

\opt\tankserver\game\webroot\tankheroclient\cjjd_new.php

\opt\tankserver\game\webroot\tankheroclient\getconfig.php

\opt\tankserver\game\webroot\tankheroclient\getconfig2.php

\opt\tankserver\game\webroot\tankheroclient\load_new.php

\opt\tankserver\game\webroot\tankheroiosclient\cjjd_new.php

\opt\tankserver\game\webroot\tankheroiosclient\getconfig.php

\opt\tankserver\game\webroot\tankheroiosclient\getconfig_test.php

\opt\tankserver\game\webroot\tankheroiosclient\load_new.php

\opt\tankserver\game\webroot\tankheroiosclient\load_test.php

\opt\tankserver\game\webroot\tank_rayapi\cfg\config\cfg_gserver.php

\opt\tankserver\game\webroot\tank_rayapi\cfg\config\cfg_pay.php

\opt\tankserver\game\webroot\vip\user\config.php

\opt\tankserver\game\webroot\tank-server\application\config\stat.php

\opt\tankserver\game\webroot\tank-server\application\config\across.php

如果不嫌改ip多,最好呢,服务端先解压出来,然后替换ip再打包上传吧

cd /

rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm

rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-6.rpm

安装supervisor
yum -y install epel-release
yum install -y supervisor 
sudo touch /var/run/supervisor.sock
sudo chmod 777 /var/run/supervisor.sock

chmod -R 777 /opt

创建网站端口为81  网站目录为:/opt/tankserver/game/webroot

再增加一个域名 127.0.0.1  端口 80  网站目录为:/opt/tankserver/game/webroot

再设置一个端口443  网站目录为:/opt/tankserver/game/webroot 


游戏启动方式
cd /opt/tankserver/bin/
./tankserverd

舰队安卓
com.SuperOfFleet.cjjd\assets\rjoyconfig.xml
/opt/tankserver/game/webroot/tankherocdn/android/tankheroclient200_jiandui/full
下的更新包luascript.zip里修改 (这里需要用到解密工具)
luascript\script\config\serverconfig\serverCfg.lua的IP
luascript\script\config\gameconfig\platFormCfg.lua大区名
舰队苹果
Payload\TankRSDK.app\TankRSDK  111.231.69.125替换成自己的IP
Payload\TankRSDK.app\luascript\script\config\serverconfig\serverCfg.lua 修改IP
/opt/tankserver/game/webroot/tankherocdn/IOS/tankheroclient200_jiandui/full
下的更新包luascript.zip里修改  (这里需要用到解密工具)
luascript\script\config\serverconfig\serverCfg.lua的IP
luascript\script\config\gameconfig\platFormCfg.lua大区名

热更新配置 客户端第一次更新会读取load_new.php文件里的版本号 比如191,然后会去full下载更新包
以后如需再更新 版本号+1  补丁放到part里即可
© 版权声明
THE END
喜欢就支持一下吧
点赞78 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片