CentOS 6.5 apache源碼安裝2.0版

來源:互聯網
上載者:User

標籤:apache

yum install -y pcre-devel zlib-devel(可能需要安裝gcc)


tar xf apr-1.5.2.tar.bz2

cd apr-1.5.2

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

make

make install


cd ..

tar xf apr-util-1.5.4.tar.bz2 

cd apr-util-1.5.4

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

make

make install


groupadd www

useradd -g www -s /sbin/nologin -M www

 

yum install -y openssl openssl-devel(ssl需要安裝)


cd ..

tar xf httpd-2.4.20.tar.bz2

cd httpd-2.4.20

./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf/ --enable-so --enable-ssl --enable-cgi --enable-expires --enable-deflate --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event | tee /root/apache    --enable-ssl=shared --with-ssl=/usr/local/openssl(ssl需要安裝)

make

make install


cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/httpd

chmod +x /etc/rc.d/init.d/httpd

vim /etc/rc.d/init.d/httpd

#chkconfig: 2345 10 90

#description: Activates/Deactivates Apache Web Server

chkconfig --add httpd

chkconfig --level 35 httpd on


vim /usr/local/apache/conf/httpd.conf

ServerName localhost:80


vim /etc/profile.d/httpd.sh

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

. /etc/profile.d/httpd.sh

httpd -t


service httpd strat

本文出自 “每天進步一點點” 部落格,請務必保留此出處http://zuoshou.blog.51cto.com/2579903/1956521

CentOS 6.5 apache源碼安裝2.0版

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.