首页 游戏资源分享 手游技术交流 咸鱼 linux搭建教程
0赞
赞赏
手机版
扫码打开手机版
把文字装进口袋

其他教程 咸鱼 linux搭建教程

David902  2024-9-26 11:43:25

  1. 1、安装宝塔
  2. yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
  3. 输入y回车确认安装

  4. -----------------------------------------------------------------------------------------------------------------------------------
  5. 安装环境:
  6. Nginx 1.18
  7. mysql 5.7
  8. PHP 7.2
  9. mongo4.0  关闭安全验证
  10. redis5.0
  11. -----------------------------------------------------------------------------------------------------------------------------------
  12. 宝塔放行端口:1-65535  或单独放行 82,85,8889 自行抓包!

  13. 关闭防火墙:
  14. systemctl stop firewalld
  15. systemctl disable firewalld
  16. -----------------------------------------------------------------------------------------------------------------------------------
  17. 上传服务端压缩文件到home目录,解压
  18. cd /
  19. unzip 手工端home.zip
  20. -----------------------------------------------------------------------------------------------------------------------------------
  21. 安装openresty1.19.3.1
  22. cd /home/proj
  23. wget https://openresty.org/download/openresty-1.19.3.1.tar.gz
  24. tar -zxvf openresty-1.19.3.1.tar.gz

  25. mv openresty-1.19.3.1 openresty
  26. cd openresty

  27. sudo apt-get install libpcre3-dev \
  28. libssl-dev perl make build-essential curl unzip -y

  29. sudo yum install -y pcre-devel openssl-devel

  30. ./configure
  31. make
  32. make install

  33. echo "openresty环境变量"
  34. echo "PATH=/usr/local/openresty/bin:/usr/local/openresty/nginx/sbin:$PATH
  35. export  LC_ALL=en_US.UTF-8
  36. export PATH" >> ~/.bash_profile
  37. source ~/.bash_profile

  38. -----------------------------------------------------------------------------------------------------------------------------------
  39. 设置数据库密码为:123456
  40. 导入数据库
  41. mysql -uroot -p123456
  42. create database sanguo DEFAULT CHARACTER SET utf8;
  43. flush privileges; #
  44. use sanguo
  45. source /home/sql/sanguo.sql
  46. exit;
  47. -----------------------------------------------------------------------------------------------------------------------------------
  48. 宝塔添加站点:

  49. IP:85端口
  50. 网站目录指向:/home/proj/goserver/admin/assets/web/dist

  51. 127.0.0.1:82端口
  52. 网站目录指向:/home/proj/web-mobile
  53. -----------------------------------------------------------------------------------------------------------------------------------
  54. 修改服务端IP:替换192.168.0.152为你自己的ip
  55. \home\proj\common\settings.lua (2 hits)
  56. \home\proj\goserver\admin\assets\web\.env.development (1 hit)
  57. \home\proj\goserver\admin\assets\web\dist\js\app.3d18e251.js (2 hits)
  58. \home\proj\goserver\admin\assets\web\dist\js\highlight.js.0adc4c0f.js (1 hit)
  59. \home\proj\goserver\agent_admin\agent_assets\web\.env.development (1 hit)
  60. \home\proj\goserver\agent_admin\agent_assets\web\dist\js\app.bfd4e5a3.js (2 hits)
  61. \home\proj\goserver\agent_admin\agent_assets\web\dist\js\highlight.js.0adc4c0f.js (1 hit)
  62. \home\proj\pyapi\wxpay\app.py (1 hit)
  63. \home\proj\web-mobile\assets\main\index.bcc80.js (3 hits)
  64. \home\proj\web-mobile\assets\resources\import\24\241bc4ec-587f-41fa-a24d-e904c5f906c6.9f804.json (1 hit)

  65. find /home/proj/ -type f -name '*.*' | xargs sed -i 's/192.168.0.152/你的IP/g'
  66. find /home/proj/ -type f -name '*.py' | xargs sed -i 's/192.168.0.152/你的IP/g'
  67. find /home/proj/ -type f -name '*.js' | xargs sed -i 's/192.168.0.152/你的IP/g'
  68. find /home/proj/ -type f -name '*.development' | xargs sed -i 's/192.168.0.152/你的IP/g'

  69. -----------------------------------------------------------------------------------------------------------------------------------

  70. chmod 777 -R /home/proj/

  71. 启动服务器
  72. 启动apiserver
  73. 启动
  74. cd /home/proj/apiserver
  75. nginx -p `pwd` -c conf/nginx.conf


  76. 重启
  77. nginx -p `pwd` -c conf/nginx.conf -s reload


  78. 停止
  79. nginx -p `pwd` -c conf/nginx.conf -s stop


  80. 启动gameserver
  81. cd /home/proj/skynet
  82. sh getkey.sh
  83. 生成key,后面的串码复制后黏贴到本目录下面的key.txt里面后保存
  84. ./skynet ../loginserver/prodconfig //启动登录服务器
  85. ./skynet ../gameserver/prodconfig //启动游戏服务器
  86. kill -9 `cat loginskynet.pid` //停止登录服务器
  87. kill -9 `cat gameskynet.pid` //停止游戏服务器

  88. 启动goserver
  89. cd /home/proj/goserver
  90. ./mygo //启动管理后台服务
  91. -----------------------------------------------------------------------------------------------------------------------------------
  92. 游戏地址
  93. http://IP:82/?id=646415
  94. 链接id后面的数字是账号随便填

  95. 后端地址:
  96. http://Ip:85/#/login?next=%2F
  97. 数据库sys_auth_user.password修改成VNgFfka8Or4=
  98. 账号:admin
  99. 密码:admin
  100. 登陆后到 游戏配置-区服配置 新增一个大区 再点开服,默认保存就行,开服活动自行研究
复制代码


使用道具 举报

您需要登录后才可以回帖 立即登录
反反复复反反复复反反复复反反复复反反复复反反复复反反复复反反复复
2024-9-28 12:50:15
tttttttttttttttttttttttt
2024-9-29 02:13:25
返回顶部