|
@@ -62,33 +62,31 @@ yum clean all
|
|
yum makecache
|
|
yum makecache
|
|
```
|
|
```
|
|
|
|
|
|
-> 7、切换到root用户
|
|
|
|
|
|
+> 7、游戏资源下载
|
|
|
|
+
|
|
|
|
+````shell
|
|
|
|
+# 生成GitHub SSH KEY
|
|
|
|
+ssh-keygen -t rsa -C "你的GitHub登录账号"
|
|
|
|
+````
|
|
|
|
|
|
```shell
|
|
```shell
|
|
-yum update -y
|
|
|
|
|
|
+git config -global user.name "你的GitHub用户名"
|
|
|
|
+git config -global user.email "你的GitHub登录账号"
|
|
```
|
|
```
|
|
-
|
|
|
|
-> 8、安装常用的软件和组件
|
|
|
|
-
|
|
|
|
```shell
|
|
```shell
|
|
-yum install -y vim curl git openssl openssl-devel
|
|
|
|
|
|
+cd /opt/Engine2D
|
|
|
|
+# 下载游戏源码
|
|
|
|
+git clone --depth=1 git@github.com:makeryangcom/Engine2D.git
|
|
```
|
|
```
|
|
|
|
|
|
-> 9、安装Nginx
|
|
|
|
|
|
+> 8、自动化部署
|
|
|
|
|
|
```shell
|
|
```shell
|
|
-yum install -y nginx
|
|
|
|
|
|
+cd /opt/Engine2D
|
|
|
|
+sudo ./tools/init.sh
|
|
```
|
|
```
|
|
|
|
|
|
-``` bash
|
|
|
|
-# 启动Nginx服务
|
|
|
|
-sudo systemctl start nginx.service
|
|
|
|
-```
|
|
|
|
-
|
|
|
|
-``` bash
|
|
|
|
-# 设置Nginx服务开机启动
|
|
|
|
-sudo systemctl enable nginx.service
|
|
|
|
-```
|
|
|
|
|
|
+> 9、日常维护使用的命令
|
|
|
|
|
|
``` bash
|
|
``` bash
|
|
# 常用维护命令-重启Nginx服务
|
|
# 常用维护命令-重启Nginx服务
|
|
@@ -97,13 +95,12 @@ sudo systemctl restart nginx.service
|
|
sudo systemctl stop nginx.service
|
|
sudo systemctl stop nginx.service
|
|
# 常用维护命令-启动Nginx服务
|
|
# 常用维护命令-启动Nginx服务
|
|
sudo systemctl start nginx.service
|
|
sudo systemctl start nginx.service
|
|
-```
|
|
|
|
|
|
|
|
-> 10、防火墙设置
|
|
|
|
|
|
+# 查看后端服务、游戏服务器状态
|
|
|
|
+sudo systemctl status server.service game.service
|
|
|
|
|
|
-```shell
|
|
|
|
-sudo firewall-cmd --zone=public --add-port=443/tcp --permanent
|
|
|
|
-sudo firewall-cmd --zone=public --add-port=9000/udp --permanent
|
|
|
|
-# 重启防火墙
|
|
|
|
-sudo firewall-cmd --reload
|
|
|
|
|
|
+# 监听后端服务日志
|
|
|
|
+sudo journalctl -fu server.service
|
|
|
|
+# 监听游戏服务器日志
|
|
|
|
+sudo journalctl -fu game.service
|
|
```
|
|
```
|