Knowledge section
Introduction: Lnmp also known as Lemp, from the "L" that is, the Linux operating system, "N" is the Nginx Web services, "M" that is MySQL database, "P" that is the PHP language composition. The difference between LNMP and lamp is that Apache and Nginx,nginx, compared to Apache, have a large advantage in concurrency processing, better stability and performance than Apache, so larger companies use LNMP more than lamp. We should be familiar with the construction of our two website platforms for OPS personnel.
The purpose of this example is to build a movie site through LNMP, and we add movies to the site by managing the site backstage. This will enable the website to see movies online.
Operation section
1, Nginx installation You can refer to this document.
http://blog.51cto.com/13434336/2102925
2, (in order to facilitate the construction of LNMP, this instance directly installs all LNMP components on the same server) installs the Lnmp "M" section, because the MySQL needs the CMake configuration installs, therefore installs the CMake package first. (Note that the CMake package requires gmake compilation and installation)
3. Compiling and installing MySQL database
4, MySQL database optimization adjustment and initialization
5. Start the MySQL service.
6, modify the MySQL user password. (this instance uses the root user)
7, "P" section, PHP language parsing environment installation. This example we first insert the system disk with Yum to install PHP four support modules.
8, prepare PHP package, and Zend Optimization module package, install PHP. (where Sky starts with a compressed package is the site source code of this case)
9. Build PHP Master files php.ini and php execution path optimization
10. Install Zend Optimization module for PHP
Add the following two lines in php.ini to load the Zend module
11, configure the PHP-FPM, and start the php-fpm.
Note After startup, you can view the port via netstat, PHP default port 9000.
12, configuration Nginx support PHP parsing environment, restart Nginx service.
13, the download good source code decompression, and then move the web directory to/var/www/baidu, and set the owner.
14. Create the database required for the site.
15. Configure permissions for this Sky database.
16, in the local Firefox browser landing the instance of the site installation interface. (Configure the database for the site, admin users, etc.)
17, enter the backstage. Note: The background address is http://*/sky/admincp/index.php.
18. Homepage of website
LNMP Platform construction site case