httpd-2.4編譯安裝

1、安裝prce解決依賴關係

#yum -y install pcre-devel

2、編譯安裝apr-1.5.1

#./configure --prefix=/usr/local/apr

#make && make install

 

3、編譯安裝apr-util-1.5.4

#./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/

#make && make install

 

4、編譯安裝httpd-2.4.10(可能會提示openssl太舊,則編譯安裝最新版,並加上 --with-ssl=/usr/local/openssl

#tar xf httpd-2.4.9.tar.bz2

#cd httpd-2.4.9

#./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd24 --enable-so--enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/--enable-modules=most --enable-mpms-shared=all --with-mpm=event

#make && make install

 

5、編譯後操作

1)導出頭文件

#ln -sv /usr/local/apache/include /usr/include/httpd

 

2)導出庫文件

 

#ldconfig

 

#ldconfig -p

 

3)導出man手冊

#vim /etc/man.config

 

4)輸出二進制程序

#vim /etc/profile.d/httpd.sh

exportPATH=/usr/local/apache/bin:$PATH

 

6、配置文件:

/etc/httpd24/httpd.conf   ---------- 主配置文件

/etc/httpd24/extra/httpd-mpm.conf  ------------- MPM配置文件(配置各MPM的參數)

更換MPM

修改加載的模塊名稱,重啓httpd即可


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章