Implementation of LNMP Architecture and PHP performance optimization

Source: Internet
Author: User
Tags bz2

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.