Small series in front said to realize Lnmp (linux+nginx+mysql+php), in this blog small make up will how to realize Lnmp, because Nginx strong, now more and more enterprises are keen on the LNMP architecture, so small make up to simply realize this kind of architecture , and do some simple PHP optimization, the installation sequence of the software according to the English first letter
preparation, software requirements:
Small series of Linux is Enterprise version 5.4
MYSQL-ADVANCED-5.6.10-LINUX-GLIBC2.5-I686.TAR.GZ//This is a green version, can save the source code installed a lot of time
Nginx-1.3.16.tar.gz
php-5.4.14.tar.bz2
xcache-3.0.1.tar.bz2
Installation of Project 1:nginx
Step 1: Install Pcre-devel, and establish nginx users
# yum Install Pcre-devel
# groupadd-r Nginx
# Useradd-r-G nginx-m nginx
Step 2: Extract the source and install the Nginx
# tar -zxvf nginx-1.3.16.tar.gz -C /usr/local/src/
# cd /usr/local/src/nginx-1.3.16/
# ./configure \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--http-log-path=/var/log/nginx/access.log \
--pid-path=/var/run/nginx/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--user=nginx \
--group=nginx \
--with-http_ssl_module \
--with-http_flv_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--http-client-body-temp-path=/var/tmp/nginx/client/ \
--http-proxy-temp-path=/var/tmp/nginx/proxy/ \
--http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \
--with-pcre
# make && make install
# mkdir -p /var/tmp/nginx/client