Some time ago because of which hacker malicious attack my site, resulting in WAN network directly to my host to deactivate, had to change VPS, natural not independent host high, Remote Desktop will wait long, for me this impatient person is no doubt can not stand, so pondering into Linux performance should be better. Good day research, finally put the whole environment prepared. Crap less said, directly below the introduction.
First, compile Nginx, and then download Nginx last source code version (1.3.3), for http://nginx.org/download/nginx-1.3.3.tar.gz, directly through the wget can:
Wget-c http://nginx.org/download/nginx-1.3.3.tar.gz
Mkdir-p/usr/src/nginx
Cd/usr/src/nginx
TAR-XZVF nginx-1.3.3.tar.gz
CD nginx-1.3.3.
Useradd www
Usemod-s/sbin/nologin-g www www
./configure–prefix=/usr/local/nginx–user=www–group=www–with-http_stub_status_module–with-http_ssl_module– With-pcre && make && make install
(Note: Do not add –without-http_rewrite_module, otherwise it will cause rewrite not to use)
Once compiled, you can start nginx with the following command:
/usr/local/nginx/sbin/nginx-c/usr/local/nginx/conf/nginx.conf
Second, compile PHP, download the source code package, http://118.26.57.11/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/cn.php.net/distributions/php-5.4.5.tar.bz2
Mkdir-p/usr/src/nginx/php
cd/usr/src/nginx/php
Wget-c http://118.26.57.11/1Q2W3E4R5T6Y7U8I9O0P1Z2X3C4V5B/cn.php.net/distributions/php-5.4.5.tar.bz2
TAR-JXVF php-5.4.5.tar.bz2
Yum-y Install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel MySQL
./configure–prefix=/usr/local/php–with-mysql–enable-fpm–with-freetype-dir–with-jpeg-dir–with-png-dir–with-zlib –with-libxml-dir–enable-xml–disable-debug–enable-safe-mode–enable-mbstring && make && make install
Cp-r./sapi/fpm/php-fpm.conf/usr/local/php/etc/php-fpm.conf
Cp-r./sapi/fpm/php-fpm/etc/init.d/php-fpm #php-fpm Start
/etc/init.d/php-fpm
Third, install MySQL, download the installation package
Nginx+php+mysql Construction Guide