问道端游另类假设方法(无需修改数据库)
本帖最后由 柠檬 于 2022-3-13 20:44 编辑1.虚拟机网络配置(服务器不需要,默认网络已配置好)
vi /etc/sysconfig/network-scripts/ifcfg-enp0s3
systemctl restart network.service
2.更新系统
yum update
3.安装宝塔面板
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
==================================================================
BT-Panel default info!
==================================================================
外网面板地址: http://192.168.56.104:8888/72523e2d
内网面板地址: http://10.0.2.15:8888/72523e2d
*以下仅为初始默认账户密码,若无法登录请执行bt命令重置账户/密码登录
username: dyzwccjq
password: 44923ab8
If you cannot access the panel
release the following panel port in the security group
若无法访问面板,请检查防火墙/安全组是否有放行面板端口
==================================================================
4.安装Mysql 5.6,复制root密码(数据库-root密码)
5.配置数据库
登录数据库
mysql -u root -pd3e759e84a8a0b1d
开启远程登录:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'127.0.0.1' IDENTIFIED BY 'd3e759e84a8a0b1d' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY 'd3e759e84a8a0b1d' WITH GRANT OPTION;
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'd3e759e84a8a0b1d' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
6.修复问道大飞注册无法登录
Mysql对应的配置下面添加,重启mysql
default-character-set = latin1
character_set_server=latin1
default-character-set= latin1
7.重启数据库 关闭防火墙
systemctl restart mysqld.service
systemctl stop firewalld.service
8.配置端口转发
①创建虚拟网卡
cd /etc/sysconfig/network-scripts/
cp ifcfg-enp0s3 ifcfg-enp0s3:0
清空ifcfg-enp0s3:0文件,把以下内容粘贴过去(用vim或winscp都可以)
BOOTPROTO=static
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
IPADDR=192.168.128.6
NETMASK=255.255.255.0
NAME=enp0s3:0
DEVICE=enp0s3:0
保存后重启网络
systemctl restart network.service
②输入ip address查看虚拟网卡是否创建成功
③设置端口转发(将192.168.56.104替换成服务器IP)
systemctl start firewalld.service
firewall-cmd --zone=trusted --add-interface=enp0s3:0 --permanent
firewall-cmd --zone=trusted --add-forward-port=port=6101:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8101:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8110:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8120:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8160:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8161:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8162:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8163:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8164:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8165:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8166:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=trusted --add-forward-port=port=8167:proto=tcp:toaddr=192.168.56.104
firewall-cmd --zone=public --add-port=3306/tcp --permanent
firewall-cmd --zone=public --add-port=6101/tcp --permanent
firewall-cmd --zone=public --add-port=8101/tcp --permanent
firewall-cmd --zone=public --add-port=8110/tcp --permanent
firewall-cmd --zone=public --add-port=8120/tcp --permanent
firewall-cmd --zone=public --add-port=8160-8167/tcp --permanent
firewall-cmd --reload
③设置firewall开机启动,重启服务器
systemctl enable firewalld.service
reboot
9.上传并修改数据库区名(不改区名和端口号不用修改)
aaa、ccs、config、csa、cta、dba、district、
ldba、server、spa、tts、cs_ccs
10.修改上传服务端
aaa.ini dba.ini ccs.ini csa.ini gs.ini
11.数据库备份
mysqldump -u root -p --databases dl_adb_all dl_ddb_1 dl_dmdb_1 dl_ldb_1 dl_ldb_all dl_mdb_1 dl_mdb_all dl_tdb_1 > all.sql
12.客户端或插件端设置端口转发
192.168.128.6到192.168.56.104上
1.60原版只需要转发线路端口到192.168.56.104上
1.60以上有插件的话,数据库和问道端口全都转发了把
**** Hidden Message *****
真是难得给力的帖子啊。 激动人心,无法言表! 看到这帖子真是高兴! 谢谢大佬的分享 淡定,淡定,淡定…… 我只是路过打酱油的。 真是被感动的痛哭流涕…… 真是难得给力的帖子啊。 看到这帖子真是高兴!