Nginx PHP Installation

Source: Internet
Author: User
Tags ldap mcrypt

. Select Source Directory
Selected directory/data/klj/

cd/data/klj/

2. Install pcre library
cd/data/klj/
wget ftp:// ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.34.tar.gz
TAR-ZXVF pcre-8.21.tar.gz
CD pcre-8.21
./configure
Make
Make install

3. Install zlib library
cd/data/klj/
wget http://zlib.net/ zlib-1.2.8.tar.gz
tar-zxvf zlib-1.2.8.tar.gz cd zlib-1.2.8
./configure
Make
Make install

4. Install SSL

cd/data/klj/
wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
TAR-ZXVF Openssl-1.0.1c.tar.gz
./config
Make
do install

5. Installing Nginx

Nginx is generally available in two versions, which are stable version and development version, You can choose one of these two versions according to your purpose, below is the detailed steps for installing Nginx into the/usr/local/nginx directory:

cd/data/klj/
wget http://nginx.org/ download/nginx-1.7.8.tar.gz
TAR-ZXVF nginx-1.2.8.tar.gz
CD nginx-1.2.8
./configure--WITH-PCRE=/DATA/KLJ /pcre-8.21--with-zlib=/data/klj/zlib-1.2.8--with-openssl=/data/klj/openssl-1.0.1c--prefix=/usr/local/nginx
Make
Make install


Install PHP
Download the PHP installation package
wget Http://cn2.php.net/get/php-5.6.3.tar.gz/from/this/mirror

TAR-ZXVF php-5.6.3.tar.gz
CD php-5.6.3

./configure--prefix=/data/klj/php--with-config-file-path=/data/klj/php/etc--with-mysql--with-mysqli-- With-iconv-dir=/usr/local--with-freetype-dir--with-jpeg-dir--with-png-dir--with-zlib--with-libxml-dir=/usr-- Enable-xml--disable-rpath--enable-discard-path--enable-safe-mode--enable-bcmath--enable-shmop--enable-sysvsem- -enable-inline-optimization--with-curl--with-curlwrappers--enable-mbregex--enable-fastcgi--enable-fpm-- Enable-force-cgi-redirect--enable-mbstring--with-mcrypt--with-gd--enable-gd-native-ttf--with-openssl-- With-mhash--enable-pcntl--enable-sockets--with-ldap--with-ldap-sasl--with-xmlrpc--enable-zip--enable-soap-- Enable-pdo--with-pdo-mysql=mysqlnd

./configure--prefix=/data/klj/php--with-config-file-path=/data/klj/php/etc--with-mysql--with-mysqli-- Enable-mbstring--enable-sockets--enable-pcntl--enable-zip--enable-bcmath--with-zlib-dir--with-bz2-- With-freetype-dir--with-gd--with-libxml-dir--with-png-dir--with-jpeg-dir=/usr/local/jpeg--enable-mbstring-- With-mcrypt--with-curl--enable-fasecgi--enable-fpm


Error 5

Checking whether to enable jis-mapped Japanese font support in GD ... No
Checking for FABSF ... yes
Checking for Floorf ... yes
Configure:error:jpeglib.h not found
GD Library is not installed
Solutions
Yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_ 64-y


1) go to the website http://www.ijg.org/download the source code. The version I'm using is jpegsrc.v8d.tar.gz, execute command: sudo tar-zxvf jpegsrc.v8d.tar.gz-c/usr/src

(2) Enter the/usr/src/jpegsrc.v8d directory, sudo mode execution command: sudo./configure--prefix=/usr/local/jpeg;make;make Install;

(3) Recompile PHP, add parameter--with-jpeg-dir=/usr/local/jpeg


Compile again, encounter the problem: Configure:error:mcrypt.h not found. Please reinstall Libmcrypt.

(1) to the website http://mcrypt.hellug.gr/lib/index.html download source code, my next version is libmcrypt-2.5.7.tar.gz; Execute command: sudo tar-zxvf Libmcrypt-2.5.7.tar.gz-c/USR/SRC

(2) Enter the/usr/src/libmcrypt-2.5.7 directory, sudo way to execute the command:./configure prefix=/usr/local/libmcrypt/;make; make install

(3) Recompile PHP, add parameter--with-mcrypt=/usr/local/libmcrypt

Install Libmcrypt First

#tar-ZXVF libmcrypt-2.5.8.tar.gz
#cd libmcrypt-2.5.8
#./configure
#make
#make Install Instructions: Libmcript is installed by default on/usr/local

3. Installing Mhash

#tar-ZXVF mhash-0.9.9.9.tar.gz
#cd mhash-0.9.9.9
#./configure
#make
#make Install
4. Installing MCrypt

#tar-ZXVF mcrypt-2.6.8.tar.gz
#cd mcrypt-2.6.8
#LD_LIBRARY_PATH =/usr/local/lib./configure
#make
#make Install


This installation is primarily for Linux systems
The first thing to download is three software, namely
Libmcrypt-2.5.8.tar.gz
: http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91774&release_id=487459
Mhash-0.9.9.tar.gz
: http://sourceforge.net/project/showfiles.php?group_id=4286&package_id=4300&release_id=645636
Mcrypt-2.6.8.tar.gz
: http://sourceforge.net/project/showfiles.php?group_id=87941&package_id=91948&release_id=642101

Nginx PHP Installation

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.