Chapter 1th Environmental Description
1.1 System Description
Centos 6.4
1.2 Software Description
httpd-2.4.2.tar.gz Http://pan.baidu.com/s/1hr2mtpE
apr-util-1.4.1.tar.gz http://pan.baidu.com/s/1bol16Mj
apr-1.4.6.tar.gz Http://pan.baidu.com/s/1sjX1LBB
pcre-8.13.tar.gz
php-5.4.3.tar.bz2 Http://pan.baidu.com/s/1hr2mtpE
Libmcrypt-2.5.8.tar.gz Http://pan.baidu.com/s/1sjX1LBB
mhash-0.9.9.9.tar.gz
2nd Apache Construction Instructions
2.1 Installing dependent packages
yum install make openldap-devel ntp vim-enhanced gcc gcc-c++ gcc-g77 Flex Bison autoconf bzip2-devel ncurses-devel ope Nssl-devel libtool* zlib-devel libxml2-devel libjpeg-devel libpng-devel libtiff-devel fontconfig-devel freetype-devel Libxpm-devel gettext-devel curl-devel Curl pam-devel openldap-devel e2fsprogs-devel krb5-devel libidn libidn-devel-y
2.2 Installing Apr
TAR-ZXVF apr-1.4.2.tar.gz
CD apr-1.4.2.tar.gz
./configure--prefix=/usr/local/apr
Make && make install
2.3 Installing Apr-util
TAR-ZXVF apr-util-1.3.10.tar.gz
CD apr-util-1.3.10.tar.gz
./configure \
--prefix=/usr/local/apr-util \
--WITH-APR=/USR/LOCAL/APR
Make && make install
2.4 Installing Pcre
TAR-ZXVF pcre-8.10.tar.gz
CD pcre-8.10
./configure--prefix=/usr/local/pcre
Make && make install
2.5 Installing Apache
./configure \
--prefix=/usr/local/apache \
--with-apr-util=/usr/local/apr-util/\
--with-pcre=/usr/local/pcre/\
--with-apr=/usr/local/apr/
Make && make install
2.6 Description of the configuration file
/usr/local/apache/conf/httpd.conf
documentroot "/usr/local/apache/htdocs"
Modify this section to configure the project run directory.
Startup file
/usr/local/apache/bin/apachectl
3rd. PHP Construction Instructions
3.1 Installing Libmcrypt
Tar xvf libmcrypt-2.5.8.tar.gz
./configure
Make && make install
3.2 Installing Mhash
Tar xvf mhash-0.9.9.9.tar.gz
CD mhash-0.9.9.9
./configure
Make && make install
3.3 Installing PHP
./configure--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/php/etc
Make && make install
CP Php.ini-production/usr/local/php/etc/php.ini
3.4 Error Prompt modification Instructions
Configure:error:Cannot Find LDAP libraries In/usr/lib
ln-s/usr/lib64/libldap*/usr/lib/
Configure:error:libjpeg. (A|SO) not found.
ln-s/usr/lib64/libjpeg.so/usr/lib/libjpeg.so
Configure:error:libpng. (A|SO) not found.
ln-s/usr/lib64/libpng.so/usr/lib/
4th. Modify the configuration and test
4.1 Modifying Apache configuration file support PHP
Modify DirectoryIndex index.html to DirectoryIndex index.html index.php
and add AddType application/x-httpd-php. PHP
4.2 Testing PHP Support
Create a Test PHP page test.php, and store it in the website home directory,
Phpinfo ();
?>
After restarting the Apache service, visit http://ip/test.php
See the site, the PHP setup is complete;
The original address is: http://blog.csdn.net/yincg/article/details/8782364
The above describes the Linux installation apache+php detailed, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.