Apache 2.4升級筆記

根據http://jasonpowell42.wordpress.com/2013/04/05/install-apache-2-4-4-on-centos-6-4/ ,但是安裝時要注意configure

cd /usr/src/
 
wget http://ftp.tc.edu.tw/pub/Apache//httpd/httpd-2.4.9.tar.gz
 
tar xzvf httpd-2.4.9.tar.gz
 
cd httpd-2.4.9
 
./configure --enable-so --enable-ssl --with-mpm=prefork --with-included-apr --mandir=/usr/share/man --sysconfdir=/etc/httpd
 
make; make install
 
cd /etc/httpd
 
rm httpd.conf
 
ln -s conf/httpd.conf httpd.conf
 
yum -y install libxml2 libxml2-devel 
 
cd /usr/src/
 
wget http://tw2.php.net/get/php-5.3.28.tar.gz/from/this/mirror
 
tar xzvf php-5.5.13.tar.gz
 
cd /usr/src/php-5.5.13
 
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-config-file-path=/etc
 
make
 
make install
 
libtool --finish /usr/src/php-5.5.13/libs
 
ln -s /usr/local/apache2/modules /etc/httpd/modules

修改/etc/init.d/httpd,將內容改為以下

apachectl=/usr/local/apache2/bin/apachectl
httpd=${HTTPD-usr/local/apache2/bin/httpd}

存檔離開。

接著 service httpd start就可以了。

請記住,若有設定過httpd.conf的話,請注意這一篇的提醒事項

 

參考資料

  1. [Linux] 重新編譯 PHP 時出現錯誤的解決方式
  2. Upgrading to 2.4 from 2.2
  3. How to Install Apache2.4 PHP5 and MySQL from Source on Debian Linux
  4. Apache 2.4 Configure
  5. Install Apache 2.4.4 on CentOS 6.4
  6. Linux Commands For Shared Library Management & Debugging Problem
  7. How install Apache 2.4 PHP 5.4 and MySQL 5.5.21 on Windows 7
  8. [Apache] Apache 從 2.2 換至 2.4 httpd.conf 的調整筆記 (windows 環境)
  9. Apache Module mod_slotmem_shm
  10. Apache Module mod_access_compat
  11. Apache Module mod_unixd
  12. Linux Tutorial: How to Build Apache, PHP5 and MySQL From Source ( the Hard Way)
  13. Linux: Set OR Change The Library Path
  14. Installing Apache 2.4 and PHP 5.4 from source

About the Author

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like these