第1章 環(huán)境說明 1.1 系統(tǒng)說明 Centos 6.2 (最小化安裝) 1.2 軟件說明 httpd-2.4.2.tar.gz apr-util-1.4.1.tar.gz apr-1.4.6.tar.gz pcre-8.13.tar.gz php-5.4.3.tar.bz2 libmcrypt-2.5.8.tar.gz 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 -y 2.2 安裝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 安裝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 安裝pcre tar -zxvf pcre-8.10.tar.gz cd pcre-8.10 ./configure --prefix=/usr/local/pcre make && make install 2.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 install 2.6 配置文件說明 /usr/local/apache/conf/httpd.conf DocumentRoot "/usr/local/apache/htdocs" 修改此條可配置項目運行目錄,。 啟動文件 /usr/local/apache/bin/apachectl 第3章 Php搭建說明 3.1 安裝libmcrypt tar xvf libmcrypt-2.5.8.tar.gz ./configure make && make install 3.2 安裝mhash tar xvf mhash-0.9.9.9.tar.gz cd mhash-0.9.9.9 ./configure make && make install 3.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.ini 3.4 錯誤提示修改說明 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/ 第4章 修改配置并測試 4.1 修改apache配置文件支持php 修改DirectoryIndex index.html 為DirectoryIndex index.html index.php 并添加AddType application/x-httpd-php .php 4.2 測試php支持 創(chuàng)建測試php頁面test.php,,并存放在網站主目錄下,, <?php phpinfo(); ?> 重啟apache服務后,訪問http://ip/test.php 看到站點,,則說明php搭建完成,; |
|