You may be familiar with LAMP. LAMP represents the website server architecture such as Apache, MySQL, and PHP in Linux. The same as LNMP represents the website server architecture such as Nginx, MySQL, and PHP in Linux.
Why do we adopt the LNMP architecture?
The advantages of using Linux, PHP, and MySQL are needless to say.
Nginx is a small and efficient Web server software in Linux. It was developed by the Rambler.ru site, where Igor Sysoev is the second highest traffic in Russia. It has been running on large Russian websites for many years, relatively stable.
Nginx is quite stable, with rich functions, simple installation and configuration, and low system resources ......
What are the advantages of LNMP architecture?
As a Web server: Compared with Apache, Nginx uses less resources and supports more concurrent connections, reflecting higher efficiency.
As a Server Load balancer: Nginx can support both Rails and PHP internally, or serve as an HTTP proxy server. Nginx is written in C. Both system resource overhead and CPU usage are much more efficient than Perlbal.
As a mail proxy server: Nginx is also a very good mail proxy server (one of the earliest development purposes of this product is also as a mail proxy server), Last. fm describes the success and wonderful use experience.
Nginx installation is very simple and configuration files are very simple (perl syntax is also supported). servers with few buckets: Nginx is easy to start and can run almost without interruption, it does not need to be restarted even if it is running for several months. You can also upgrade the software without interruption.
1. Download the one-click installation package of LNMP:
You can use the downloaded version (recommended for foreign or U.S. VPS) or the full version (recommended for domestic VPS.
2. Unzip the one-click installation package of LNMP:
Run the tar zxvf lnmp0.5.tar.gz or tar zxvf lnmp0.5-full.tar.gz to decompress the LNMP one-click installation package.
3. CentOS Installation Steps
Run the cd lnmp0.5/command in the downloaded version, and run the command in the full version: cd lnmp0.5-full/
Then execute. /centos. sh can also be executed. /centos. sh | tee lnmp. log (this method is recommended. If an error occurs, you can upload lnmp to the Forum. log), enter the domain name to bind, press enter, enter the MySQL root Password to be set, and then press enter again to confirm. The program automatically installs and compiles software Nginx, PHP, MySQL, phpMyAdmin, and Zend.
4. Installation Steps In Debian/Ubuntu
Run the cd lnmp0.5/command in the downloaded version, and run the command in the full version: cd lnmp0.5-full/
Then execute. /debian. sh can also be executed. /debian. sh | tee lnmp. log (this method is recommended. If an error occurs, you can upload lnmp to the Forum. log), enter the domain name to bind, press enter, enter the location of the VPS/server again: asia, america, europe, oceania or africa, and press enter, enter the MySQL root Password to be set, press enter, and press enter again to confirm. The program automatically installs and compiles software Nginx, PHP, MySQL, phpMyAdmin, and Zend. It takes about 10 minutes to install MySQL.
Install other components
1. Install eAccelerator and execute the following command:./eaccelerator. sh will automatically install and restart the web service.
2. Install ionCube and run the following command:./ionCube. sh will automatically install and restart the web service.
3. Install the PureFTPd and Management Panel and run the following command :. /pureftpd. sh will automatically install PureFTPd. After installing PureFTPd, You need to execute http: // your domain name or IP/ftp/install in the browser. install PureFTPd in php. For more information, see/Article/PreviousFile/OS/201101/2011012309583844 .vpser.net/manage/lnmp-pureftpd-cp.html.
4. Install VsFTPD and run the following command :. /vsftpd. sh will automatically install vsftpd. You only need to run the command: useradd-d/home/wwwroot-s/sbin/nologin adminftp to add the account to specify the root directory of the ftp account, run passwd adminftp to set the password and then log on.
VM management
1. Add a VM and run the following command:/root/vhost. sh enter the domain name to be bound as prompted, and press Enter. If you want to add more domain names, enter y, and then enter the domain name to be bound. Multiple Domain names can be separated by spaces. Enter the directory to which the domain name is bound (absolute directory, such as/home/wwwroot/lnmp. If this parameter is left blank, the default domain name is/home/wwwroot/.), and then select whether to add pseudo-static rules, by default, Discuz, Wordpress, Sablog, emlog, and dabr are available. You can directly enter the Preceding Names. To add custom pseudo-static rules, enter the desired name, the program will automatically create a pseudo-static file, directly under/usr/local/nginx/conf/your custom pseudo-static name. add pseudo-static rules in conf. Next, you will be prompted whether to enable the log function. Generally, you do not need to start it. Simply enter n. If you need to start it, enter y, and then enter the name of the log file to be defined, press enter to automatically add a VM.
2. Delete the VM and run rm/usr/local/nginx/conf/vhost/Domain Name. conf on ssh.
3. Status management and related management pages
LNMP status management:/root/lnmp {start | stop | reload | restart | kill | status}
PureFTPd status management/root/pureftpd {start | stop | restart | kill | status}
Phpinfo: http: // The domain name or IP address entered earlier/phpinfo. php
PhpMyAdmin: http: // The domain name or IP address entered earlier/phpmyadmin/
Probe: http: // The previously entered domain name or IP/p. php
MySQL root Password: if you do not enter the password, press enter as root; otherwise, enter the password for you.
LNMP directory:
Mysql:/usr/local/mysql
Php:/usr/local/php
Nginx:/usr/local/nginx
Website directory:/home/wwwroot
======================
After 7747 verification and testing the installation package, it takes a little longer to pass the knowledge on Centos, ubuntu, and basically, much more than the official descriptions, in addition to updating the core package, it takes about 40 minutes to install centos 5.3. However, it is easy to use, but you need to optimize it according to your requirements.
For more information, see bbs.2cto.com.