CentOS6.5编译安装apache2.4--有软件包!
生活随笔
收集整理的這篇文章主要介紹了
CentOS6.5编译安装apache2.4--有软件包!
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
話不多少,直接上實戰,本博文需要的三個軟件源碼包已經上傳至csdn資源,也可聯系本人chn1945@sina.com獲取。
一、安裝依賴
# yum install gcc gcc-c++ ncurses-devel ncurses pcre pcre-devel openssl-devel zlib-devel -y二、安裝apr apr-utils
# tar xvf apr-1.5.2.tar.gz # cd apr-1.5.2 # ./configure --prefix=/usr/local/apr # make && make install # tar xvf apr-util-1.5.4.tar.gz # cd apr-util-1.5.4 # ./configure --with-apr=/usr/local/apr/ --prefix=/usr/local/apr-util # make && make install三、安裝httpd2.4
# tar xvf httpd-2.4.20.tar.gz # cd httpd-2.4.20 # ./configure \ --prefix=/usr/local/httpd2.4/ \ --sysconfdir=/etc/httpd2.4/conf/ \ --enable-so \ --enable-ssl \ --enable-cgi \ --enable-rewrite \ --enable-zlib \ --enable-pcre \ --with-apr=/usr/local/apr \ --with-apr-util=/usr/local/apr-util \ --with-mpm=event \ --enable-deflate \ --enable-mpms-shared=all \ --enable-modules=all # make && make install四、導出相關程序
1).導出二進制
# vim /etc/profile.d/httpd.shPATH=$PATH:/usr/local/httpd2.4/binexport PATH # source /etc/profile.d/httpd.sh2).導出頭文件
# ln -sv /usr/local/httpd2.4/include/ /usr/include/httpd3).導出庫文件(apache2.2)
# vim /etc/ld.so.conf/httpd.conf/usr/local/apache/lib/4).導出幫助文檔
# vim /etc/man.config 添加一行:MANPATH /usr/local/httpd2.4/man五、啟動并訪問測試頁面
# apachectl start # ss -tnl | grep 80------做運維之前很矯情的小年輕-----
總結
以上是生活随笔為你收集整理的CentOS6.5编译安装apache2.4--有软件包!的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: http基于用户的访问控制--实战
- 下一篇: 用yum安装配置搭建lamp环境--超简