第1章 环境说明1.1 系统说明Centos 6.4 1.2 软件说明httpd-2.4.2.tar.gz http://pan.baidu.com/s/1hr2mtpEapr-util-1.4.1.tar.gz http://pan.baidu.com/s/1bol16Mjapr-1.4.6.tar.gz http://pan.baidu.com/s/1sjX1LBBpcre-8.13.tar.gzphp-5.4.3.tar.bz2 http://pan.baidu.com/s/1hr2mtpElibmcrypt-2.5.8.tar.gz http://pan.baidu.com/s/1sjX1LBB
mhash-0.9.9.9.tar.gz第2章 Apache搭建说明2.1 安装依赖包yum install make openldap-devel ntp vim-enhanced gcc gcc-c++ gcc-g77 flex bison autoconf bzip2-devel ncurses-devel openssl-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 -y2.2 安装aprtar -zxvf apr-1.4.2.tar.gz cd apr-1.4.2.tar.gz ./configure --prefix=/usr/local/aprmake && make install2.3 安装apr-utiltar -zxvf apr-util-1.3.10.tar.gzcd apr-util-1.3.10.tar.gz ./configure \--prefix=/usr/local/apr-util \--with-apr=/usr/local/apr make && make install2.4 安装pcretar -zxvf pcre-8.10.tar.gzcd pcre-8.10./configure --prefix=/usr/local/pcremake && make install2.5 安装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 install2.6 配置文件说明/usr/local/apache/conf/httpd.confDocumentRoot "/usr/local/apache/htdocs"修改此条可配置项目运行目录。启动文件/usr/local/apache/bin/apachectl第3章 Php搭建说明3.1 安装libmcrypttar xvf libmcrypt-2.5.8.tar.gz./configuremake && make install3.2 安装mhashtar xvf mhash-0.9.9.9.tar.gzcd mhash-0.9.9.9./configure make && make install3.3 安装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.ini3.4 错误提示修改说明configure: error: Cannot find ldap libraries in /usr/libln -s /usr/lib64/libldap* /usr/lib/configure: error: libjpeg.(a|so) not found.ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.soconfigure: error: libpng.(a|so) not found.ln -s /usr/lib64/libpng.so /usr/lib/第4章 修改配置并测试4.1 修改apache配置文件支持php修改DirectoryIndex index.html 为DirectoryIndex index.html index.php并添加AddType application/x-httpd-php .php4.2 测试php支持创建测试php页面test.php,并存放在网站主目录下,
phpinfo();
?>
重启apache服务后,访问http://ip/test.php
看到站点,则说明php搭建完成;
原地址为:http://blog.csdn.net/yincg/article/details/8782364
以上就介绍了linux下安装apache+php详解,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。