In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to move the VPS host, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
VPS host fast moving method: package while transmitting while decompressing, suitable for large and medium-sized forum websites
First, the preparation work for the VPS mainframe before moving quickly
1. In order to ensure a smooth transition between the new and old VPS hosts, I built the new VPS into the same environment as the original VPS, such as using WDCP, creating a database name and database password with the same account and password.
2. If you are using the SSH provided by the virtual host, you need to find the root directory of the site where you want to move. This is the root directory of my old VPS host.
3. I want to move the root directory on the old VPS to the root directory of the new VPS.
4. The Tribal Forum was originally placed on Linode VPS. It was a Japanese computer room bought in the course of Tenpay's successful purchase of Linode VPS by American Express Card.
5. But the monthly fee of US $20 for Linode VPS is really expensive, which happens to be $10 / month for VPS.NET, Hong Kong and Japan VPS mainframe. This price is OK for a forum.
5. This article is about moving the tribal forum from the Linode VPS host to the VPS.NET VPS host. Because the forum data is not very large, the VPS host of the forum will be moved in about ten minutes.
2. Quickly move the data files from the original VPS to the new VPS
1. Here I want to move the public_html directory under / www/web/freehao123_info on the original VPS to the new VPS, and enter the freehao123_info directory first.
Cd / www/web/freehao123_info
2. Then execute the following command:
Tar czf-public_html | ssh root@50.31.252.181 tar xzf-- C / www/web/freehao123_info/public_html
3. Public_html is the directory to be moved, 50.31.252.181 this is the new VPS host, / www/web/freehao123_info/public_html this is the path to store the files on the new VPS.
PS: updated on November 15, 2013. The SSH login port of some VPS hosts may not be the default 22. At this time, when referring to the fast moving method of VPS hosts, we need to add in the code:-p 5678 is the port. Please modify it yourself. The code example is as follows: (please refer to: remote relocation method port settings between VPS hosts. )
Tar czf-public_html | ssh root@106.186.23.172-p 5678 tar xzf-C / www/web/freehao123_info/public_html
4. Then, because you want to connect to the new VPS, you will be prompted to continue the connection, and finally you will enter the password of the new VPS host.
5. Enter the password and enter. At this time, the data will be transferred continuously between the old and new VPS hosts. The waiting time varies depending on the upload / download speed and data file size of your VPS host.
6. After the file has been moved, you can see the data that has been moved to the new VPS host.
7. If the saved path of the file is inconsistent, you can also move, copy, delete and so on.
Quickly move the MysqL database on the original VPS to the new VPS
1. WDCP default mysql database file and log directory is placed in / www/wdlinux/mysql/var,freehao123_dz is the database I created, which is to be moved.
2. This is the path where I want to move the MysqL database of the old VPS to the new VPS, or put it in freehao123_dz.
3. The operation method is the same as the above move data file, first enter the file directory, and then execute the move command.
Cd / www/wdlinux/mysql-5.1.63/vartar czf-freehao123_dz | ssh root@50.31.252.181 tar xzf-C / www/wdlinux/mysql-5.1.63/var/freehao123_dz
4. Finally, enter the password to complete the migration of MysqL database to the new VPS host.
5. On the new VPS host, you can see that the whole folder of the MysqL database has moved.
6. In PhpMyAdmin, you can also immediately see the MysqL database that has just been transferred, eliminating the pain of importing PhpMyAdmin.
4. Some follow-up work after the rapid relocation of the VPS mainframe
1, the first is to modify the database configuration file, because the tribe has already created the same database name, database user name and password on the new VPS host in advance, so the program can directly connect to the MysqL.
2 、 Discuz! The database configuration file of the forum is located in the config directory. Find the config.global.php and config.ucenter.php files. In the data directory, locate the config.inc.php file. There are three.
3. Due to the new space, Discuz! Application communication failures may occur in the forum.
4. Click to edit the application, and enter the new IP in the column of Application IP.
5. Finally, update the DNS resolution record of the domain name. Add the domain name to the new A record or CNAME record.
6. After completion, you can visit the website normally.
The above is all the contents of the article "how to move the VPS host". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.