To deploy the installation of PHP LNMP architecture

First, what is PHP
PHP that is, "Hypertext Preprocessor" is a general open-source scripting language. PHP is a server-side scripting language to perform in, similar to the C language, a common website programming languages. PHP syntax unique mix of C, Java, Perl and PHP own syntax. Conducive to learning, widely used, mainly for Web development.
With the general principle similar LAMP architecture, there are a few differences in the structure LNMP will start a service in php: php-fpm, and LAMP in php only exist as an Apache module. Nginx will request the user to php dynamic service to deal with, this service will be to php and database interaction. Static user requests Nginx will deal directly, Nginx handle static requests faster than the speed of apache much better performance, so Nginx and apache on a dynamic request handling very different, but if it is still processing the request, they would obviously want to find Nginx faster than apache, Nginx and can withstand the amount of concurrent apache than large, can withstand the amount of concurrent tens of thousands, so a large number of sites will use Nginx as a web server.
Second, the experimental
1. Installation deployment environment package
To deploy the installation of PHP LNMP architecture
2. The decompression php mounted under / opt directory
To deploy the installation of PHP LNMP architecture
3. Installation Configuration function module
To deploy the installation of PHP LNMP architecture
To deploy the installation of PHP LNMP architecture
4.Make the install the make &&
5. The modified core profile
To deploy the installation of PHP LNMP architecture
To deploy the installation of PHP LNMP architecture
To deploy the installation of PHP LNMP architecture
To deploy the installation of PHP LNMP architecture
6. Turn php-fpm module
To deploy the installation of PHP LNMP architecture
for an open profile the monitoring engine PID
To deploy the installation of PHP LNMP architecture
7. the modified extension profiles
To deploy the installation of PHP LNMP architecture
8. open service inspection port
To deploy the installation of PHP LNMP architecture
9. All command php facilitate identification system
To deploy the installation of PHP LNMP architecture
10. the function allows nginx support PHP
To deploy the installation of PHP LNMP architecture

location ~ \.php$ {
    root       html;//指定站点目录
    fastcgi_pass  127.0.0.1:9000;//指定fpm模块所在位置,IP地址,9000端口
    fastcgi_index index.php;//指定默认首页类型
    fastcgi_param SCRIPT_FILENAME /usr/local/nginx/html$fastcgi_script_name;//指定脚本文件所在目录
    include      fastcgi_params;//将nginx中的变量转换成PHP能识别的变量
}

To deploy the installation of PHP LNMP architecture
Here all LNMP infrastructure services have all been set up is completed.
Restart the service and test!
To deploy the installation of PHP LNMP architecture
To deploy the installation of PHP LNMP architecture
To deploy the installation of PHP LNMP architecture
PHP pages to build complete!

Guess you like

Origin blog.51cto.com/14557905/2461142