PHP Installation
I. Downloads of documents related to this document
Second, PHP installation
I. Downloads of documents related to this document
1, php:http://php.net/downloads.php
(Note: This document is downloaded in PHP version php-5.6.11.tar.gz)
2, the test machine system for the CentOS release 6.3 (Final)
Second, PHP installation
1. Install PHP
A, unzip the compressed file tar–zxf php-5.6.11.tar.gz
b, after entering the decompression directory, execute
./configure--prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc--with-mysql=/usr/local/ MYSQL--ENABLE-FPM--enable-xml--enable-soap--enable-mbstring--enable-sockets--with-curl--enable-zip--enable-ftp --WITH-GD--with-bz2--with-openssl--with-zlib--with-mhash--enable-exif--enable-sockets--enable-mbstring-- Enable-xml--enable-fpm--enable-soap--with-gd--with-curl--with-mcrypt=/usr/local/libmcrypt--with-imap-- With-imap-ssl--with-jpeg-dir--with-png-dir--with-zlib-dir--with-freetype-dir-- Enable-gd-native-ttf--enable-gd-jis-conv--with-kerberos
c. Compile and install make && make installation
2. Start PHP
A. Copy the php.ini file
[email protected] phpsrc]# Cpphp.ini-production/usr/local/php/etc/php.ini
B, start php-fpm
[email protected] etc]# Cpphp-fpm.conf.default php-fpm.conf
[email protected] php]#./sbin/php-fpm
C, check the PHP-FPM port
3. Test PHP
4. Common anomalies and treatment
Error One
Checking libxml2 installdir ... no
Checking for Xml2-configpath ...
Configure:error:xml2-config not found. Please check your LIBXML2 installation.
Solution Solutions
Yum Install LIBXML2
Yum Install Libxml2-devel
Error two
Configure:error:Cannot Find OpenSSL ' s<evp.h>
Solution Solutions
Yum Install Openssl-devel
Error three
Checking for BZIP2 in default Path...not found
Configure:error:Please Reinstall THEBZIP2 Distribution
Solution Solutions
Yum Install Bzip2-devel
Error Four
Checking for CURL in default Path...not found
Configure:error:Please Reinstall Thelibcurl Distribution-
Easy.h should be in<curl-dir>/include/curl/
Solution Solutions
Yum Install Libcurl Libcurl-devel
Error Five
If Configure fails try--with-vpx-dir=<dir>
Configure:error:jpeglib.h not found.
Solution Solutions
Yum install libjpeg libpng freetypelibjpeg-devel libpng-devel freetype-devel
Error Six
Configure:error:utf8_mime2text () hasnew signature, but u8t_canonical is missing. This should is not happen. Checkconfig.log For additional information
Solution Solutions
Yum Install Libc-client-devel
Error Seven
Configure:error:This c-client Libraryis built with Kerberos support.
Add--with-kerberos to your configureline. Check Config.log for details.
Solution Solutions
Add the--with-kerberos to the/configure.
Error Eight
Configure:error:mcrypt.h not found. Please reinstall Libmcrypt.
Solution Solutions
Yum Install Libmcrypt or
Download Libmcrypt Package
(Compile and install./configure--prefix=/usr/local/libmcrypt make && make install)
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Small shell _php Source installation