第1章 情况说明1.1 系统说明Centos 6.2 (最小化安装)1.2 软件说明httpd-2.4.2.tar.gzapr-util-1.4.1.tar.gzapr-1.4.6.tar.gzpcre-8.13.tar.gzphp-5.4.3.tar.bz2libmcrypt-2.5.8.tar.gzmhash-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-devellibtool* zlib-devel libxml2-devel libjpeg-devel libpng-devellibtiff-devel fontconfig-devel freetype-devel libXpm-develgettext-devel curl-devel curl pam-devel openldap-devele2fsprogs-devel krb5-devel libidn libidn-devel -y2.2 安装aprtar -zxvf apr-1.4.2.tar.gzcd 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/aprmake && 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./configuremake && make install3.3 安装php./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etcmake && make installcp 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.htmlindex.php并添加AddType application/x-httpd-php .php4.2 测试php支持建设测试php页面test.php,并存放在网站主目次下,重启apache处过后,会见http://ip/test.php看到站点,美国服务器租用美国站群服务器,则说明php搭建完成;