wiflish
          Loving Life! Loving Coding!
          posts - 98,comments - 98,trackbacks - 0
          安裝PHP

          從下面的URL下載PHP 4.4.4的源代碼:http://www.php.net/downloads.php
          安裝PHP,PHP將被安裝在“/usr/local/php”目錄下,PHP的配置文件(php.ini)放在“/usr/local/php/etc”目錄中:
          tar zvxf php-4.4.4.tar.gz
          cd php-4.4.4

          CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" \
          ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --enable-track-vars --with-config-file-path=/usr/local/php/etc \
          --with-mysql=/usr/local/mysql --enable-force-cgi-redirect --enable-ftp --with-openssl --with-gettext --with-zlib
          (注:其中--prefix表示php安裝目錄,--with-apxs2為apache2安裝目錄下的apxs,--with-mysql為mysql安裝目錄)
          make
          make install
          cp php.ini-dist /usr/local/php/etc/php.ini
          修改Apache的配置,增加對PHP的支持:
          增加“AddType application/x-httpd-php .php .phtml”
          修改“DirectoryIndex index.html index.html.var”為“DirectoryIndex index.html index.htm index.php index.cgi”
          驗證PHP是否安裝成功:
          echo '<? phpinfo(); ?>' >/usr/local/apache2/htdocs/info.php
          重新啟動Apache,在瀏覽器的地址欄中輸入: http://localhost/info.php,你應當可以看到關于PHP的詳細信息。
          注:
          1、如果你準備在這個服務器上面跑PHP的網站、論壇、blog等負載比較大的程序,你可以安裝ZendOptimize、eaccelerator等PHP加速程序。
          2、mysql版本為:4.1.22,apache版本為:2.0.59

          參考文檔:http://www.extmail.org/forum/archive/2/0510/563.html

          posted on 2006-11-28 15:20 想飛的魚 閱讀(301) 評論(0)  編輯  收藏 所屬分類: linux
          主站蜘蛛池模板: 垦利县| 利川市| 微山县| 尤溪县| 合江县| 古浪县| 宜川县| 静宁县| 南溪县| 雅江县| 大田县| 武邑县| 元江| 庆城县| 都昌县| 德化县| 绥德县| 舟山市| 资阳市| 甘南县| 渝北区| 易门县| 五大连池市| 安康市| 芷江| 铁力市| 资兴市| 阿坝县| 独山县| 旬邑县| 尼玛县| 清水县| 天柱县| 若尔盖县| 白朗县| 滕州市| 方正县| 霸州市| 科尔| 普兰县| 驻马店市|