First, log on to the Operating System Using SSH...
Then download the installation package
CopyCode The Code is as follows: wget http://catlnmp.googlecode.com/files/lnmp1.1.zip
Then decompress the package.Copy codeThe Code is as follows: unzip lnmp1.1.zip
Some of them do not have unzip. We do this.
Copy code The Code is as follows: Yum install unzip
Then we will jump to this directory
Copy code The Code is as follows: CD lnmp
Then we add permissions to the file:
Copy code The Code is as follows: chmod + x install. Sh APC. Sh eaccelerator. Sh
Finally, execute
Copy code The Code is as follows:./install. Sh
After installation, the default MySQL user name and password are both root. You can use the following command to change the password:
Copy code The Code is as follows:/usr/local/MySQL/bin/mysqladmin-u root-P password your password
In this way, you can upload your website.
ProgramInstallation path:
MySQL:/usr/local/MySQL
PHP:/usr/local/PHP
Nginx:/usr/local/nginx
PHPmyAdmin/home/www/phpMyAdmin
Web directory/home/WWW
FTP root directory/home/WWW
Note: the MySQL database username is root and password. After logging on to the MySQL database, find the user table and delete all users except the root password.
To install vsftp, run the following command:
Copy code The Code is as follows: Yum-y install vsftpd
/Etc/init. d/vsftpd start
Chkconfig -- level 345 vsftpd on
You can change the password of a WWW user when logging on with the WWW User:
Copy code The Code is as follows: passwd WWW
To install eaccelerator, run the following command:
Copy code The Code is as follows:./eaccelerator. Sh
To install APC, run the following command:
Copy code The Code is as follows:./APC. Sh
Note: Only one accelerator APC can be installed.
For how to add a site and restart nginx, see some basic commands in centos.