Part of the use of Yum installation, you need to download the following:
Apr,apr-util,pcre,httpd,php5,eaccelerator
First use Yum to install the dependent program:
| The code is as follows |
Copy Code |
|
Yum Install GD zlib-devel freetype libjpeg* libpng* php-gd libxml2
Libxml2-devel Curl-devel Openssl-devel Php-mysql |
Since the computer is not installed mysql,php want to connect to MySQL, you must install the MySQL client, where Php-mysql is installed
After downloading the required packages, use TAR-ZXVF file.tar.gz decompression, the configuration of each software and compile commands as follows:
| The code is as follows |
Copy Code |
|
Apr
#./configure--PREFIX=/USR/LOCAL/APR
# Make && make install
Apr-util
#./configure\
--prefix=/usr/local/apr-util\
--with-apr=/usr/local/apr/bin/apr-1-config
# Make && make install
Pcre
./configure--prefix=/usr/local/pcre
Make && make install
httpd
#./configure\
--prefix=/usr/local/apache2\
--with-included-apr\
--with-apr=/home/apr-1.5.1\
--with-apr-util=/home/apr-util-1.5.3\
--enable-so\
--enable-mods-shared=most\
--with-pmp=worker\
--with-pcre=/usr/local/pcre\
--with-ssl\
--enable-ssl\
--enable-rewrite
# Make && make install
/usr/local/apache2/bin/apachectl-k start starts Apache
/usr/local/apache2/bin/apachectl-k Stop/restart stop or restart Apache
PhP5
#./configure\
--prefix=/usr/local/php\
--with-apxs2=/usr/local/apache2/bin/apxs\
--with-mysql\
--with-mysqli\
--with-pdo-mysql\
--with-curl\
--with-mcrypt\
--enable-mbstring\
--with-iconv\
--with-freetype\
--with-gd\
--with-jpeg\
--with-png\
--enable-sockets\
--with-zlib\
--enable-zip\
--enable-soap\
--enable-shared\
--with-xmlprc\
--with-libxml\
--enable-xml\
--enable-bcmath\
--with-openssl
# Make && make install
Modify httpd.conf, add the following current
LoadModule Php5_module modules/libphp5.so
AddType application/x-httpd-php. php
To restart Apache.
Memecache
#/usr/local/php/bin/pecl Install Memcache
Add the memcache.so generated above to the php.ini file, like this:
extension= "/usr/local/php/lib/php/extensions/no-debug-zts-20100525/memcache.so"
Eaccelerator
#./configure\
--enable-eaccelerator=shared\
--with-php-config=/usr/local/php/bin/php-config
|
Also add the generated eaccelerator.so to the php.ini file
A minor problem with the installation is that the Yum installation package prompts key error
CentOS Yum The solution to prompt key error when installing package
Yum Install pptpd--NOGPG