(a) the website environment constructs
First of all, is the website environment Choice, at present the more popular has LNMP, lamp, WDCP, AMH, Lum and so on, here I choose is the military elder brother's Lnmp newest version (www.lnmp.org).
1, the VPS system reload. (If it is a newly opened VPS or has been reset, you can ignore this step.) )
First into the KIWIVM backstage, stop the VPS.
Then select Install new OS on the Left function list
Here I choose is centos-6-x86-minimal, simply say x86 is 32 for the system, callout _64 is 64-bit system, small memory does not recommend installing 64-bit system,-minimal is a compact version of the system. The simplified version of the bricklayer system did a great job. Select a good system, the following I agree tick, click Reload on it.
Clicking Reload will show the following picture. Displays the new SSH port and the new root password. It is recommended that you copy the password and save it locally, and the port will be visible in the main panel.
If click Main controls appear below please don't be alarmed, wait patiently.
After installing the system, you can connect the VPS installation environment via SSH. Note here that the SSH port is filled in correctly. (I use putty here)
After connecting to the VPS, you can follow the official LNMP installation tutorial. Http://lnmp.org/install.html.
First create the screen dialog. Because the installation time of the environment may be slightly longer, if the direct installation, this period if there is any break network AH timeout ah what the trouble, the use of screen installation will not have these problems exist.
Because a compact version of the system was previously installed, there is no screen command (Screen:command not found). Directly run yum install screen-y on it. After screen installation is complete, run the screen-s lnmp command again.
The specific installation process in LNMP's official website has very detailed introduction and screenshot, here is not too much to repeat, we can refer to the official website: http://lnmp.org/install.html. Here is a brief talk about the restoration of the screen window.
If you encounter a card death or a timeout class, turn off the connection. Re-connect the VPS via SSH and enter Screen-ls to list the currently existing screen session. Perform screen-r 383 (or screen-r lnmp) to restore the current conversation. If you are prompted with the following illustration to indicate that there is no resumed matching 383, then the screen-d-R lnmp can be performed.
Until the next figure appears, you have successfully installed the LNMP.
(ii) Add virtual host
The first thing to do is to connect to your VPS via SSH. Enter command LNMP vhost add after connection. The process of creating a virtual host is an interactive page, and I've got a collection of screenshots to get together.
First will require you to enter a domain name, enter a good domain name return, will show whether to add other domain names. I am here generally choose N, do not add other domain name, and then through 301 redirect without www domain name to the domain name with www.
Then the path to the site, the default is/home/wwwroot/yourdomain. If you do not intend to change, direct return to the good, want to customize the path of the words directly to enter the path you want to be good.
Then is whether to allow rewrite. It is recommended to select Y here. Lnmp with several commonly used Web site pseudo static rules, because we want to install the WordPress, directly into WordPress can be.
The next section is whether to open the access log. Bricklayer small hard drive package, not recommended to open, after all, hard disk resources are limited.
The next step is to create the database, which, if it is to be created, will be created with the same user name and database name.
If you choose Y, you will first verify the MySQL root password. After verification will let you enter the database name, return will prompt you, has created a database name and the same user name. Then you enter the password for the database.
Then go to the best one, press any key to create a virtual host.
When the following screen appears, your virtual host has been created successfully.
Of course, the various configurations here can be corrected by modifying the configuration file. So there's no need to tangle. Through vi modification or download to local modification can be.
Virtual Host configuration file in:/usr/local/nginx/conf/vhost/domain name. conf
(iii) Uploading Web site source files and installing
First we need an FTP software, here is the use of FileZilla. Because the environment before the installation, and did not install FTP service, so use SFTP upload site files, the specific settings below, note that the port to fill the correct, the protocol to choose SFTP. Login type to choose the Normal, user name password fill in the connection can be clicked.
After the connection, it is recommended to enter/home/wwwroot/default to delete the files shown in the following figure, while modifying the phpMyAdmin directory name, instead of being easily guessed.
Then go to the site's installation directory, the site's source files uploaded to the root directory on it.
Here I choose to repackage the Web site installation files and upload them. To save a lot of time, if a file upload, slow death. The following figure, into the last folder, you can see all the Web site files, select all, and then right to create a compressed package, remember the suffix if the zip format. The name suggests short a bit good, next time decompression can enter a few letters less.
After uploading, through SSH connection to the VPS, access to the site's installation directory, the command for cd/home/wwwroot/www.banwagong.com (replaced by your own installation directory, note that the CD behind a space).
After entering, execute command unzip wp.zip carriage return. appear to the bottom half of the picture, indicating that the decompression is complete.
Then wait for the domain name resolution to take effect, you can install the site.