Beckham _ php source code installation
PHP installation
1. download relevant files in this document
II. php installation
1. download relevant files in this document
1, php: http://php.net/downloads.php
(Note: in this document, PHP is downloaded as php-5.6.11.tar.gz)
2. the testing machine system is CentOS release 6.3 (Final)
II. php installation
1. install php
A. decompress the compressed file tar? Php-5.6.11.tar.gz zxf
B. go to the extracted directory and 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 --- openssl -- with-zlib -- with-mhash -- enable-exif -- enable-sockets -- enable-mbstring -- enable-xml -- enable-fpm -- enable-soap -- with-gd --- curl -- with-mcrypt =/usr/local/libmcrypt -- 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 install
2. start php
A. copy the php. ini file.
[Root @ hadoop phpsrc] # cpphp. ini-production/usr/local/php/etc/php. ini
B. start php-fpm
[Root @ hadoop etc] # cpphp-fpm.conf.default php-fpm.conf
[Root @ hadoop php] #./sbin/php-fpm
C. check the php-fpm Port
3. test php
4. common exceptions and handling
Error 1
Checking libxml2 installdir... no
Checking for xml2-configpath...
Configure: error: xml2-config not found. Please check your libxml2 installation.
Solution
Yum install libxml2
Yum install libxml2-devel
Error 2
Configure: error: Cannot find OpenSSL's
Solution
Yum install openssl-devel
Error 3
Checking for BZip2 in default path... not found
Configure: error: Please reinstall theBZip2 distribution
Solution
Yum install bzip2-devel
Error 4
Checking for cURL in default path... not found
Configure: error: Please reinstall thelibcurl distribution-
Easy. h shoshould be in /Include/curl/
Solution
Yum install libcurl-devel
Error 5
If configure fails try -- with-vpx-dir =
Configure: error: Invalid Lib. h not found.
Solution
Yum install libjpeg libpng freetypelibjpeg-devel libpng-devel freetype-devel
Error 6
Configure: error: utf8_mime2text () hasnew signature, but U8T_CANONICAL is missing. This shoshould not happen. Checkconfig. log for additional information
Solution
Yum install libc-client-devel
Error 7
Configure: error: This c-client libraryis built with Kerberos support.
Add -- with-kerberos to your configureline. Check config. log for details.
Solution
Add -- with-kerberos to./configure.
Error 8
Configure: error: mcrypt. h not found. Please reinstall libmcrypt.
Solution
Yum install libmcrypt or
Download the libmcrypt package
(Compile and install./configure -- prefix =/usr/local/libmcrypt make & make install)
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.