安装配置HTTP Server

来源:互联网 发布:优化人才培养方案 编辑:程序博客网 时间:2024/06/03 16:51

1,下载httpd的必须依赖包:

http://apr.apache.org/download.cgi  下载 apr-1.5.2.tar.gz、apr-util-1.5.4.tar.gz
http://sourceforge.net/projects/pcre/files/latest/download 下载pcre2-10.23.zip


2,下载httpd包

http://httpd.apache.org/download.cgi#apache24   下载httpd-2.2.32.tar.gz


3,安装pcre
    # unzip pcre2-10.23.zip
    # cd cre2-10.23.zip
    # ./configure -prefix=/usr/local/pcre
    # make
    # make install

4,安装apr
    # tar -zxvf apr-1.5.2.tar.gz
    # cd apr-1.5.2.tar.gz
    # ./configure -prefix=/usr/local/apr -with-pcre=/usr/local/pcre
    # make
    # make install


5,安装apr-util
    # tar -zxvf apr-util-1.5.4.tar.gz
    # cd apr-util-1.5.4.tar.gz
    # ./configure -prefix=/usr/local/apr-util -with-apr=/usr/local/apr
    # make
    # make install


6,安装httpd

    # tar -zxvf httpd-2.2.32.tar.gz    

    # cd httpd-2.2.32.tar.gz    
    # ./configure --prefix=/usr/local/httpd --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-rewrite    # make
    # make install


7,# service httpd
Usage: httpd {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|help|configtest}


8,启动httpd

service httpd start


9,打开浏览器,输入http://localhost,有界面展示,说明安装成功。

0 0
原创粉丝点击