Gu Jian Fei Xian Mobile Games Linux System Server Setup Tutorial

Install the pagoda and run the command directly.

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

Build environment:

centos 7 or above system server

Pagoda panel installation applications are as follows:

Nginx1.14
mysql5.7
php5.6

1. Close the firewall and open the port

systemctl stop firewalld

systemctl disable firewalld

The firewall is not closed

Pagoda release port: 1:65535

or open individually

PS: If you use Tencent Cloud or Alibaba Cloud, remember to open the port of the console

2. Upload the source code to the root directory of the server (the root directory is not the root directory! Then unzip it

! Use WinSCP or other tools to upload data, you can also pass it directly to the pagoda! ! )

Give 777 permissions

chmod -R 777 /root/
chmod -R 777 /data/server/
chmod -R 777 /www/wwwroot/game

3. Environment configuration

cd /root
tar -xvf otp_src_20.3.tar.gz

cd otp_src_20.3
./configure –prefix=/usr/local/erl –with-ssl –enable-threads –enable-smp-support –enable-kernel-poll –enable-hipe –without-javac

make && make install

Configure environment variables (choose one of the two methods)

Method 1 Manually modify the /etc/profile file


export PATH=$PATH:/usr/local/erl/lib/erlang/bin

Method 2 command line input

echo ‘export PATH=$PATH:/usr/local/erl/lib/erlang/bin’ >> /etc/profile

Make the configuration take effect

yum install screen
source /etc/profile

4. Set the database password to: 123456 (set directly in the pagoda)

command line input

cd /root/
./sk

Database creation is complete. You can check whether the creation is successful through the pagoda. (Database – click to get X from the server and it will be correct)

After running, you can delete the sk file for safety

6. Build a website

Create a new website - your ip: port or domain name: port

If there is a port, add the port here. Ports 80 and 81 here, I don’t know why there are 2 ports that are free to study

Add directly to the list

119.29.92.37
119.29.92.37:81 something like this iP actually for you

Website Directory Settings\www\wwwroot\game

7. Modify 119.29.92.37 on the server side to your IP

\www\wwwroot\game\api\jxtxj_solgame.svrlist_android.php
\www\wwwroot\game\api\jxtxj_solgame.svrlist_ios.php

This is enough to calculate the server side, let's look at the client side

8. Start the game service

Start a new window session for each command

cd /data/server/script/ && ./dev.sh start center

cd /data/server/script/ && ./dev.sh start game

cd /data/server/script/ && ./dev.sh start game2

cd /data/server/script/ && ./dev.sh start name

closure

cd /data/server/script/ && ./dev.sh stop center

cd /data/server/script/ && ./dev.sh stop game

cd /data/server/script/ && ./dev.sh stop game2

cd /data/server/script/ && ./dev.sh stop name

After startup, you can
view the command netstat -lntp through the port

8. Client modification (119.29.92.37)

Android:

\assets\config\platform.txt

苹果:
\Payload\stationNone.app\Data\Raw\config\platform.txt

You can log in normally.

alright. This concludes this tutorial.

Good luck to you. . . .

Do your own research. . .

Guess you like

Origin blog.csdn.net/chiwang_andy/article/details/130473334