成人午夜激情影院,小视频免费在线观看,国产精品夜夜嗨,欧美日韩精品一区二区在线播放

Linux下Apache 2.4.3安裝和配置教程

2013-02-07 15:51:55來源:linuxde作者:

作為最流行的Web服務器,Apache已經很久沒有用重大更新來吸引用戶的目光了。2012年8月16日,Apache終于進行了自2005年12月以來的首次重大更新,發布Apache HTTP Server 2.4.3。

作為最流行的Web服務器,Apache已經很久沒有用重大更新來吸引用戶的目光了。2012年8月16日,Apache終于進行了自2005年12月以來的首次重大更新,發布Apache HTTP Server 2.4.3。

Apache 2.4提供了很多性能方面的提升,包括支持更大流量、更好地支持云計、利用更少的內存處理更多的并發等。除此之外,新版Apache的提升還包括性能提升、內存利用、異步I/O的支持、動態反向代理設置、與時間驅動的Web服務器相當或更好的性能、更強大的處理資源分配能力,更便捷的緩存支持以及可定制的高速服務器和代理等。其它的功能還包括更簡單的錯誤分析、更靈活的設置項、更強大的驗證機制和更完整的文檔。

Apache 2.4的主要目標之一是大幅改進性能,在這款剛剛發布的Web服務器中,我們發現它也從競爭對手Nginx處借鑒了不少,增加了不少對高性能的支持。它對緩存、代理模塊、會話控制、異步讀寫支持等都進行了改進。

Apache服務器項目管理委員會和Apache基金會主席Jim Jagielski表示,他們希望終端用戶能真正地看到性能進步,Apache 2.4比許多以速度見長的Web服務器更快,例如Nginx。

Apache 2.4.3安裝配置步驟如下:

1、安裝基礎包

yum install gcc gcc-c++ zlib zlib-devel openssl openssl-devel libtool -y

2、安裝apr

cd apr
./configure --prefix=/usr/local/apr/ && make && make install

3、安裝apr-util

cd ../apr-util
./configure --prefix=/usr/local/apr-util/ --with-apr=/usr/local/apr/ && make && make install

4、安裝pcre

cd pcre-8.20
./configure --prefix=/usr/local/pcre && make && make install

5、安裝httpd 2.4.3

編譯必須把 apr,apr-util 的源文件放到 apache2.4.3 源碼的 srclib 目錄下,并修改 apr 源碼目錄為apr,apr-util 源碼目錄為 apr-util

cp -rf apr-1.4.6 ./httpd-2.4.3/srclib/apr
cp -rf apr-util-1.5.1 ./httpd-2.4.3/srclib/apr-util

cd httpd-2.4.3

./configure  --prefix=/usr/local/apache2 --enable-mods-shared=all --enable-deflate --enable-speling --enable-cache --enable-file-cache --enable-disk-cache --enable-mem-cache --enable-ssl --with-ssl=/usr/local/openssl/ --enable-rewrite --enable-so --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre --with-included-apr

make 
make install

可能出現的錯誤:make時出現server/.libs/libmain.a(exports.o):(.data+0xcfc): undefined reference to `apr_os_uuid_get’,解決辦法:

cd srclib/apr; make
cd srclib/apr-util; make

再退回 apache 的源碼目錄重新 make

6、安裝Tomcat-connectors(mod_jk.so模塊)

tar zxvf tomcat-connectors-1.2.37-src.tar.gz
cd tomcat-connectors-1.2.37-src/native/
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-java-home=/usr/local/jdk
make && make install

檢查/usr/local/apache2/modules下是否有mod_jk.so ,如果沒有就復制過去。

注意conf/httpd.conf文件中ServerName xxx.xxx.com:80需要改為ServerName 127.0.0.1:80,可以使用apactrl -t進行語法分析

7、優化Apache

cp /usr/local/apache2/bin/apachectl /etc/init.d/httpd
vim /etc/init.d/httpd           #編輯此服務,將前三行修改為
    #!/bin/bash
    # chkconfig: 35 85 15
    # description:Apache httpd
service httpd restart
chkconfig --add httpd
chkconfig --level 35 httpd on
關鍵詞:LinuxApache

贊助商鏈接:

主站蜘蛛池模板: 伊金霍洛旗| 宁国市| 如东县| 容城县| 昌邑市| 郑州市| 高要市| 大连市| 东阳市| 天峨县| 石楼县| 禄丰县| 巩留县| 文成县| 闽侯县| 大港区| 牟定县| 多伦县| 怀集县| 宜宾县| 习水县| 华亭县| 富源县| 富顺县| 荣成市| 岳阳县| 滁州市| 于都县| 鄱阳县| 孝义市| 喜德县| 城固县| 成武县| 阳江市| 新野县| 和硕县| 肃北| 永兴县| 石嘴山市| 遂川县| 布拖县|