1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
backup web and mysql to newserver ----------------------------------old server command--------------------- #mysqldump --opt --single-transaction -u root -p admin_live| gzip > admin_live.sql.gz #scp -r /root/admin_live.sql.gz root@xxx.xx.x.xx:/root/ *xxxx ip newserver ----------------------------------new server command--------------------- -----------------------install LAMP------------------ #sudo apt-get update #sudo apt-get install apache2 #sudo apt-get install mysql-server #sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql php-curl phpmyadmin #sudo a2enmod rewrite #sudo systemctl restart apache2 ------------------------------------------------ #sudo nano /etc/apache2/sites-available/000-default.conf -------------------addd------------------------- <Directory /var/www/html> Options FollowSymLinks AllowOverride All Order deny,allow Allow from all </Directory> ---------------------------------------- #mysql -u root -e "create database admin_live"; #gunzip < admin_live.sql.gz | mysql -u root -p admin_live |