Build LNMP source code in Red Hat Enterprise Linux5.4

Source: Internet
Author: User
Tags imap temporary file storage website server
LNMP Introduction: LNMP represents the website server architecture of Nginx + MySQL + PHP in Linux. Linux is a general term for a type of Unix computer operating system and is currently the most popular free operating system. Representative versions include debian, CentOS, Ubuntu, Fedora, and gentoo. Nginx is a high-performance HTTP and reverse proxy server and an IMAP/POP3/SMTP proxy server. Mysql is a small

LNMP introduction:

LNMP stands for the website server architecture of Nginx + MySQL + PHP in Linux. Linux is a general term for a type of Unix computer operating system and is currently the most popular free operating system. Representative versions include debian, CentOS, Ubuntu, Fedora, and gentoo.

Nginx is a high-performance HTTP and reverse proxy server and an IMAP/POP3/SMTP proxy server.

Mysql is a small relational database management system.

PHP is a script language for embedding HTML documents on the server.

These four types of software are free and open-source software combined to become a free, efficient, and scalable website service system.

Nginx is a small and efficient Web server software in Linux. It was developed by the Rambler site, where Igor Sysoev is the second most visited in Russia. It has been running on large Russian websites for many years, relatively stable. Nginx has stable performance, rich functions, simple O & M, fast processing of static files, and consumes very little system resources. As a Web server: Compared with Apache, Nginx uses less resources and supports more concurrent connections, reflecting higher efficiency. As a Server Load balancer: Nginx can support both Rails and PHP internally, or serve as an HTTP proxy server.

Build LNMP source code

Source code:

Php-5.4.0.tar (http://www.php.net), nginx-1.1.18.tar (http://www.nginx.org connector, mysql-5.0.95.tar (http://www.mysql.com)

The Linux version is Red Hat Enterprise 5.4 and the IP address is 192.168.101.22.

First edit yum and edit the rhel-debuginfo.repo in the/etc/yum. repos. d/directory (we use local yum ):

Create a disk mount point/mnt/cdrom and mount the disk to mount/dev/cdrom/mnt/cdrom.

Use yum grouplist to view the groups used by the Development environment. The Development environment requires the Development Library Development Librarity, Development tool Development Tools,

Run the command "yum install pcre-devel" to install pcre-devel.

Install the source code below

1. Compile and install the nginx-1.1.18

1. Add nginx system groups and users

Groupadd-r nginx

Useradd-r-g nginx-s/bin/false-M nginx

2. Compile

[Root @ www.linuxidc.com ~] # Tar-zxvf nginx-1.1.18.tar.gz-C/usr/src/

[Root @ www.linuxidc.com ~] # Cd/usr/src/nginx-1.1.18/

./Configure \

-- Prefix =/usr \

-- Sbin-path =/usr/sbin/nginx \

-- Conf-path =/etc/nginx. conf \

-- Error-log-path =/var/log/nginx/error. log \

-- Http-log-path =/var/log/nginx/access. log \

-- Pid-path =/var/run/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 /\

-- Http-uwsgi-temp-path =/var/tmp/nginx/uwsgi \

-- Http-scgi-temp-path =/var/tmp/nginx/scgi \

-- With-pcre

Note: -- prefix =/usr software installation directory

-- Sbin-path =/usr/sbin/nginx binary file directory

-- Conf-path =/etc/nginx. conf configuration file directory

-- Error-log-path =/var/log/nginx/error. log error log

-- Http-log-path =/var/log/nginx/access. log access log

-- Pid-path =/var/run/nginx. pid File

-- Lock-path =/var/lock/nginx. lock file nginx. lock path

-- User = nginx specifies the user

-- Group = nginx indicates the group to which nginx belongs.

-- Ssl module Support added to the with-http_ssl_module

-- Flv module Support added to the with-http_flv_module

With-http_stub_status_module

-- Added support for Static Compression modules for the with-http_gzip_static_module

-- Http-client-body-temp-path =/var/tmp/nginx/client/storage path of temporary files requested by the http client

-- Http-proxy-temp-path =/var/tmp/nginx/proxy/temporary file storage path accessed by proxy

-- Http-fastcgi-temp-path =/var/tmp/nginx/fcgi/fastcgi temporary file storage path

-- Http-uwsgi-temp-path =/var/tmp/nginx/uwsgi

-- Http-scgi-temp-path =/var/tmp/nginx/scgi

Related Article

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.