Centos7.6手动搭建dnf服务端
关闭防火墙和selinux
systemctl disable --now firewalld.service
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
配置yum源
rm -rf /etc/yum.repos.d/*
cat >> /etc/yum.repos.d/vault.repo <<EOF
[vault]
name=centos
baseurl=https://vault.centos.org/7.6.1810/os/x86_64/
enabled=1
gpgcheck=0
EOF
yum makecache
安装mysql
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm &&
yum repolist enabled | grep "mysql.*-community.*" &&
yum -y install mysql-community-server &&
systemctl enable mysqld &&
systemctl start mysqld &&
mysql_secure_installation
设置一下默认密码,其他全部选y
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Set root password? [Y/n] y
New password:
上传从其他端打包的服务端
主要有以下文件夹
[root@localhost /]# tar -zcvf dnf.tgz /home/neople/ /root/ /usr/lib/libGeoIP.so.1 /usr/local/share/GeoIP/
解压
[root@dnf /]# tar -zxvf dnf.tgz
导入数据库
[root@dnf /]# mysql -u root -p
Enter password:
mysql> source /root/MySQL/_2808.sql;
创建用户,设置权限和密码
mysql> GRANT ALL PRIVILEGES ON *.* TO 'game'@'%' IDENTIFIED BY 'uu5!^%jg' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'game'@'127.0.0.1' IDENTIFIED BY 'uu5!^%jg' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
安装依赖包
yum -y install glibc.i686 &&
yum -y install xulrunner.i686 &&
yum -y install libXtst.i686 &&
yum -y install libstdc++.i686 &&
yum -y install gcc gcc-c++ make zlib-devel
复制home/neople/game下的libnxencryption.so到/lib目录下
[root@dnf MySQL]# cp /home/neople/game/libnxencryption.so /usr/lib
修改IP
[root@dnf MySQL]# cd /home/neople/
[root@dnf neople]# sed -i "s/192.168.200.131/192.168.117.222/g" `find . -type f -name "*.tbl"`
[root@dnf neople]# sed -i "s/192.168.200.131/192.168.117.222/g" `find . -type f -name "*.cfg"`
sed: can't read ./secsvr/zergsvr/cfg/dib/__+_: No such file or directory
sed: can't read dib.cfg: No such file or directory
[root@dnf neople]#
sed -i "s/192.168.200.131/192.168.117.222/g" `find . -type f -name "*.tbl"`
sed -i "s/192.168.200.131/192.168.117.222/g" `find . -type f -name "*.cfg"`