少年三国志 Centos7.3搭建教程

来源: 作者: 点击:
输入以下指令把相关环境装好

yum update -y
yum -y install gcc+ gcc-c++
yum -y install golang
yum groupinstall "Development Tools"
yum -y install wget unzip


wget --no-check-certificate https://github.com/ideawu/ssdb/archive/master.zip
unzip master
cd ssdb-master
make
make install

在将SSDB以至/usr/local/ssdb下
ln -sf /usr/local/ssdb/ssdb-server /usr/local/bin/ssdb-server
ln -sf /usr/local/ssdb/tools/ssdb-cli /usr/local/bin/ssdb-cli
ln -sf /usr/local/ssdb/tools/ssdb-dump /usr/local/bin/ssdb-dump
ln -sf /usr/local/ssdb/tools/ssdb-repair /usr/local/bin/ssdb-repair

yum install httpd httpd-devel mysql mariadb-server mariadb-devel php php-devel phpmyadmin redis redis-devel -y

service httpd stopservice mariadb stop

然后将我们之前最开始下好的端上传至以下目录
home.zip放到 / 目录
mysql.tgz到/var/lib/文件夹
html.tgz到/var/www/
httpd.tgz到/etc/




cd /
unzip home.zip
chmod -R 777 /home/


cd
cd /var/lib/
rm -rf mysql
tar zvxf mysql.tgz
service mariadb start


cd
cd /var/www/
rm -rf html
tar zvxf html.tgz



cd /etc/
rm -rf httpd
tar zvxf httpd.tgz
service httpd start



systemctl stop firewalld.service
systemctl disable firewalld.service


vim /etc/hosts


127.0.0.1 localhost localhost.localdomain VM_96_210_centos gw 无论什么后面加 空格gw
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6


service network start


总的搭建算是完成了!


reboot


重启一下服务器 (强迫症患者)


修改/var/www/目录下的serverlist文件


分区名 新开分区网址 游戏地址换成你的服务器IP 游戏端口
{"data":[{"id":101,"name":"一区","login":"127.0.0.1","status":1,"gateway":"外网IP 局域网IP","port":8118}]}




启动游戏
service httpd start
service mariadb start
/home/start.sh

关闭游戏
/home/stop.sh


如搭建上有什么报错行为 可以回复我 我会在教程里补修


APK修改教程就不写了有研究的人知道怎么修改
栏目列表