Compile and install the LNMP environment in CentOS 6.3

Source: Internet
Author: User
Tags mcrypt

Compile and install the LNMP environment in CentOS 6.3

Compile and install the LNMP environment in CentOS 6.3, and install the necessary dependencies:

Yum-y install libjpeg-devel libpng-devel freetype-devel libxml2 libxml2-devel zlib-devel bzip2 bzip2-devel curl-devel openssl-devel gd-devel libmcrypt guest-devel pcre-devel libaio
 
Install necessary tools:

Yum-y install gcc-c ++ make
 
Compile and install mcrypt:

1. First install Libmcrypt:

: Http://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/

Tar-zxvf libmcrypt-2.5.8.tar.gz
Cd libmcrypt-2.5.8
./Configure
Make
Make install
 

2. Install mhash

: Http://sourceforge.net/projects/mhash/files/mhash/0.9.9.9/

Tar-zxvf mhash-0.9.9.9.tar.gz
Cd mhash-0.9.9.9
./Configure
Make
Make install

3. Install mcrypt

: Http://sourceforge.net/projects/mcrypt/files/MCrypt/2.6.8/

Tar-zxvf mcrypt-2.6.8.tar.gz
Cd mcrypt-2.6.8
Export LD_LIBRARY_PATH =/usr/local/lib
./Configure
Make
Make install
 
Compile and install Nginx

./Configure -- prefix =/usr/local/nginx -- user = www -- group = www -- with-http_stub_status_module
Make & make install
 
Compile and install MYSQL

Download the MYSQL source code and deploy it according to the instructions in the INSTALL-BINARY document ~
 
Compile and install PHP

PHP compilation parameters:
./Configure -- prefix =/usr/local/php \
-- With-libxml-dir \
-- With-zlib \
-- With-curl \
-- Enable-exif \
-- With-gd \
-- With-jpeg-dir \
-- With-png-dir \
-- With-freetype-dir \
-- With-gettext \
-- With-openssl \
-- With-mcrypt \
-- With-mysql =/usr/local/mysql \
-- With-mysqli =/usr/local/mysql/bin/mysql_config \
-- With-pdo-mysql =/usr/local/mysql \
-- Enable-soap \
-- With-iconv \
-- With-pear \
-- Enable-sockets \
-- Enable-fpm \
-- Enable-pcntl \
-- Enable-mbstring \
-- Enable-fileinfo \
 
Make & make install
 
Change the php-fpm.conf.default under/usr/local/php/etc/to php-fpm.conf

PS:

1. Tips: After the installation is complete, change the php Directory to the php + version number, and then link to the directory to facilitate replacement of multiple versions in the future.
 
Lrwxrwxrwx. 1 root 9 June 22 07:03 php-> php5.6.9/
Drwxr-xr-x. 9 root 4096 June 21 11:03 php5.6.9
Drwxr-xr-x. 9 root 4096 June 21 10:38 php7.0.0
 

2. If php7 is installed, change www. conf. default of/usr/local/php/etc/php-fpm.d directory to www. conf.

Ubuntu 14.04 LTS install LNMP Nginx \ PHP5 (PHP-FPM) \ MySQL

Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04

Build and install the LNMP production environment in CentOS 6.4

Practical Production Environment-LNMP architecture compilation and installation + SSL encryption implementation

LNMP full-featured compilation and installation for CentOS 6.3 notes

Install LNMP in CentOS 6.3 (PHP 5.4, MyySQL5.6)

Nginx startup failure occurs during LNMP deployment.

Ubuntu install Nginx php5-fpm MySQL (LNMP environment setup)

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.