The original server environment:
LNMP hand-built environment (CentOS7.2 PHP7.0 mysql5.7)
Because some of the demand, would like to migrate to the pagoda environment, direct installation pagoda:
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
Bt panel installed, open the URL prompt landing, but could not access.
When you see:
Warning:
If you cannot access the panel,
release the following port (8888|888|80|443|20|21) in the security group
Immediately set to open firewall ports.
参考:
https://blog.csdn.net/weixin_34080571/article/details/93165595
https://blog.csdn.net/irokay/article/details/72717132
yum install iptables-services
vim /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8888 -j ACCEPT
systemctl restart iptables.service
iptables -L -n
或者直接指令添加:
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 8888 -j ACCEPT
iptables -A INPUT -p tcp --dport 888 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
iptables -A INPUT -p tcp --dport 20 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
The results still can not visit, engage in quite a long time, friends said server's background also open ports for the job
Also a wave port open operation, finally saw the pagoda interface.
Into the interface, suggesting LNMP package environment (php5.6 nginx mysql5.6 ...) and Apache environment,
Then hand cheap, there is no backup of the database, direct point of installation.
Then the original site can not access, database access is also not ...
After ten minutes bt installed the environment, add a site immediately,
Then the database mydata folder copied to the pagoda database directory / www / server / data:
cp /var/lib/mysql/database /www/server/data/database -r
Configuring account, set permissions, your user mysql
Thought ok, who knows some of the database table is Innodb
When InnoDB
time engine, will produce a total of three file:
.ibd
: Each table contains data and index.frm
: A table used to describe like structureibdata1
: Dictionaries and historical operating table containing all the
That data
folder, each database is a folder, this folder contains each table
of the .ibd
files and .frm
documents; at the same time, in the data
folder, ibdata1
the file will record all the MySQL InnoDB
database table
dictionary and historical operations.
So be sure to remember ibdata1
this document.
Note also innodb_file_per_table
this parameter problem
See: Https://Blog.Csdn.Net/u012278016/article/details/88073325
Directly copy the database file past can not access, then
cp /var/lib/mysql/ib_logfile* /www/server/data/
cp /var/lib/mysql/ibdata1 /www/server/data/
Results or not, uninstall the bt mysql5.6, can not delete prompt, use rm -rf delete the directory
Mysql5.7 bt installed, and then replicate databases and ib_logfile0 ib_logfile1 ibdata1 past,
Table still open, suggesting table table xxx does not exist does not exist
Wave, modify cnf file ah, add innodb_file_per_table
this parameter ah,
Finally or not, even the service will not start
But I did not delete / www / server / * .pid * .err * .index * -slow file data / under, I wondered not
Then unload the database, refer to:
mysql install and completely uninstall
https://blog.csdn.net/Seven_tester/article/details/82663949
yum list installed | grep mysql
Delete mysql installed
execute the command: [package name appears in the first step command] yum -y remove
Mysql delete related files
execute the command: find / -name mysql
Execute the command: rm -rf [the results of the above command to detect catalog]
Reinstall the MySQL Community Server 5.7, the database and ib_logfile0 ib_logfile1 ibdata1 covering the past does not work.
Finally the database files and ib_logfile0 ib_logfile1 ibdata1 packaged under local mysql5.7 to run,
Can read all the tables, but also strange, why not work on the server
Local Export sql file quickly, the pagodas install mysql, and then import
500 site visits error, because a pseudo-static problems tp5 system configuration pagoda built-in pseudo-static
Also appear: Warning: require (): open_basedir restriction in effect ....
Anti-Cross-cause, tp5 cross directory
Reference: https://www.cnblogs.com/grimm/p/11133242.html
Delete user.ini
No!
配置open_basedir=/home/wwwroot/xlboo.com/:/tmp/:/proc/
It does not work! !
Reconfigure your directory permissions assigned to www
There are other operations do not remember, anyway, finally finally finally able to visit ...
Free version 7.3 of the pagoda is some pit, phpmyadmin installation does not take a view port 888 is not in force,
In other ports have not seen success
Other references:
linux MySQL Community Server 5.7.9 to replace the data directory location
https://blog.csdn.net/u012576527/article/details/52268318