找回密码
 立即注册

微信登录

只需一步,快速开始

QQ登录

只需一步,快速开始

image.png

image.png

image.png

image.png

  1. 精品西游之如初西游  Linux  架设教程
  2. 测试系统:CentOS  7.6

  3. 安装宝塔直接运行命令即可。
  4. yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
  5. 输入y回车确认安装

  6. 安装环境:
  7. Nginx1.18
  8. Mysql5.7

  9. 关闭防火墙
  10. systemctl stop firewalld
  11. systemctl disable firewalld

  12. 上传服务端到服务器根目录(根目录不是root目录!!使用WinSCP或其他工具上传数据,也可以直接宝塔传!!)

  13. 解压
  14. cd /
  15. unzip -o dhxy.zip

  16. 给予 777权限
  17. chmod -R 777 /home/

  18. 配置环境变量
  19. ln -s /opt/environment/pm2/bin/pm2 /usr/local/bin/pm2
  20. echo 'export PATH=$PATH:/opt/environment/node/bin' >> /etc/profile
  21. echo 'JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk-1.8.0.322.b07-2.el8_5.x86_64' >> /etc/profile
  22. echo 'PATH=$PATH:$JAVA_HOME/bin' >> /etc/profile
  23. echo 'CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar' >> /etc/profile
  24. echo 'export JAVA_HOME CLASSPATH PATH' >> /etc/profile

  25. 安装环境:
  26. cd /opt
  27. tar -xzvf environment.tar.gz
  28. yum install -y java-1.8.0-openjdk.x86_64
  29. source /etc/profile
  30. npm install pm2

  31. 设置数据库root密码为:t9gm.com
  32. 重启数据库

  33. 修改服务端文件IP 159.75.168.238
  34. /home/xy_ga.sql
  35. /home/xy-server/conf/GameConf.ts
  36. /home/t9gm.com/android/project.manifest
  37. /home/t9gm.com/android/version.manifest

  38. 导入数据库
  39. cd /home
  40. ./sk

  41. 重启nginx

  42. 启动游戏
  43. cd /home/xy-server
  44. pm2 start dbserv.ts --time --interpreter /opt/environment/node/bin/ts-node
  45. pm2 start gate.ts --time --interpreter /opt/environment/node/bin/ts-node
  46. pm2 start game.ts --time --interpreter /opt/environment/node/bin/ts-node

  47. 启动后台:
  48. cd /home/rabbit
  49. ./rabbit nohup java -jar rabbit.jar >log.log 2>&1 &

  50. 停止命令:
  51. pm2 stop all

  52. 关闭后台:
  53. sudo fuser -k 9091/tcp

  54. 客户端修改 (客户端默认地址159.75.168.238)
  55. 安卓:
  56. /assets/assets/resources/import/ae/ae9b3372-c7a7-454e-a362-597894da428d.92426.json
  57. ip分为4段
  58. "i1":"159.","i2":"75.","i3":"168.","i4":"238"
  59. ip分为2段
  60. "dip1":"159.75.","dip2":"168.238"

  61. /assets/assets/resources/native/07/07d3d531-c14b-4d4d-89a1-5240aa5ebb64.ded39.manifest
  62. /assets/assets/resources/native/2d/2d9aa17d-62c1-4219-8b9f-52dca8ad4beb.f805d.manifest

  63. 苹果:
  64. /Payload/dhxy-mobile.app/assets/resources/import/ae/ae9b3372-c7a7-454e-a362-597894da428d.92426.json
  65. /Payload/dhxy-mobile.app/assets/resources/native/07/07d3d531-c14b-4d4d-89a1-5240aa5ebb64.92922.manifest
  66. /Payload/dhxy-mobile.app/assets/resources/native/2d/2d9aa17d-62c1-4219-8b9f-52dca8ad4beb.3d621.manifest

  67. 邀请码:12345

  68. 后台地址:
  69. http://IP:9091
  70. 登录账号:admin
  71. 登录密码:123456
复制代码