不多说上图上教程
----------------------------------------------------------------------------------
阿里云1g完美启动
----------------------------------------------------------------------------------
环境要求
window or centos7.x
java1.8
mysql5.7
redis
php
----------------------------------------------------------------------------------
1:安装宝塔yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
2:安装所需环境
3:上传server.zip到/www/wwwroot下。解压server.zip
4:新建sanguo_game数据库并导入sanguo_game.sql
5:设置Redis密码为:e5968b5bd4f916e4
6:进入宝塔添加站点PHP选择安装的版本,域名填写公网IP:81,目录指向/www/wwwroot/sanguoweb
7:网站配置PHP版本选择自定义设置成PHP配置信息:例如我的unix:/tmp/php-cgi-56.sock(这个路径在php fpm配置文件中可以看到)
8:修改服务端数据库密码jdbc.password
game\target\classes\webgame\props\mysql.properties
center\target\classes\webgame\props\mysql.properties
修改/www/wwwroot/sanguoweb\global\config.php
9:启动服务端:
java -Dfile.encoding=utf-8 -cp /www/wwwroot/center/lib/*:/www/wwwroot/center/target/classes com.linlongyx.startup.CrossServer
java -Dfile.encoding=utf-8 -cp /www/wwwroot/game/lib/*:/www/wwwroot/game/target/classes com.linlongyx.sanguo.webgame.startup.GameServer
10:进入游戏畅玩吧
外网:gm地址公网ip:81/gm/gm.php
授权码123456
----------------------------------------------------------------------------------
|