PHP的編譯安裝

PHP編譯安裝:
 
一.解壓安裝包:
   tar xf php-5.3.6.tar.bz2
   cd php-5.3.6.tar.bz2
二.配置安裝:
   ./configure --prefix=/usr/local/php5 --sysconfdir=/etc/php  --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql  --enable-mbstring --with-mcrypt --with-gd --with-zlib --with-bz2 --with-pdo-mysql=/usr/local/mysql
三.安裝:
  make && make install
四.配置
 vim /etc/httpd/httpd.conf
 添加以下行:
 AddType application/x-httpd-php .php
 AddType application/x-httpd-source .phps
 
 DirectoryIndex 後添加 index.phpphp

相關文章
相關標籤/搜索