本帖付費內容售價 10钻石 本帖部分内容需要扣减积分,您尚未登录,请 登录 或 注册
centos7.2
1.安装宝塔
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
安装Nginx php5.6 MySQL5.5
数据库密码123456
2.xShell内输入以下命令,开放数据库远程权限,创建导入sql文件夹数据库
mysql -u root -p123456
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
FLUSH PRIVILEGES;
quit
连接数据库 创建对应的数据库后导入sql文件
gameserver 这个数据库,字符集UTF-8 排序规则utf8_unicode_ci,其他库没这要求
3. 上传动态库
将/usr/lib64/内的libgeneral.so,传到服务器对应目录
上传sants.cn解压
chmod -R 777 /home
4.安装lua的相关依赖
yum install readline-dev readline-devel unzip
5.安装lua5.1
cd /home/soft
tar -zxvf lua-5.1.5.tar.gz
cd lua-5.1.5
make linux test && make install
6.安装luarocks
cd /home/soft
tar -zxvf luarocks-3.0.4.tar.gz
cd luarocks-3.0.4/
./configure --with-lua=/usr/local --with-lua-include=/usr/local/include
make && make install && make bootstrap
luarocks install luasocket
7.网站修改
preload.js 43.226.158.57 改为自己的ip
index.min.html 43.226.158.57
serverlist.php 43.226.158.57
serverlist.json 43.226.158.57
8.上传 梦幻H5授权后台.zip到/www/wwwroot/www.sants.cn 解压
8.設置站点
ip:81,目录指向/www/wwwroot/www.sants.cn
ip:88,目录指向/www/wwwroot/www.sants.cn/gm
添加第二个站点会提示已经存在,百度解决
游戏启动命令
cd /home/server
./start.sh
停止
./stop.sh
游戏地址 ip/cdn
后台地址:ip:88/gm.php
netstat -ltnp
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 20675/mysqld
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 18423/nginx: master
tcp 0 0 0.0.0.0:10001 0.0.0.0:* LISTEN 22774/gameserver
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 4231/sshd
tcp 0 0 0.0.0.0:888 0.0.0.0:* LISTEN 18423/nginx: master
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 23785/python
tcp 0 0 0.0.0.0:11001 0.0.0.0:* LISTEN 22774/gameserver
tcp 0 0 127.0.0.1:12001 0.0.0.0:* LISTEN 22789/operationanal
tcp 0 0 127.0.0.1:8001 0.0.0.0:* LISTEN 22729/chargeserver
tcp 0 0 127.0.0.1:8004 0.0.0.0:* LISTEN 22759/worldserver
|
评分
-
参与人数 1 | 钻石 +10 |
贡献 +1 |
收起
理由
|
| + 10 |
+ 1 |
原创首发,感谢为论坛做出贡献!. |
查看全部评分
|