Ubuntu搭建Http服务器

一句命令:

sudo apt-get install apache2

产生的启动和停止文件是:/etc/init.d/apache2

  启动:sudo apache2ctl -k start

  停止:sudo apache2ctl -k stop

  重新启动:sudo apache2ctl -k restart

  配置文件保存在:/etc/apache2

Reference


 

下载:

httpd

Apr&AprUtil

PCRE

解压&Rename

cd ~/Downloads/
ls

sudo tar -zxvf httpd-2.4.10.tar.gz -C /usr/local

sudo tar -zxvf apr-1.5.1.tar.gz -C /usr/local/httpd-2.4.10/srclib/
sudo tar -zxvf apr-util-1.5.4.tar.gz -C /usr/local/httpd-2.4.10/srclib/
sudo tar -zxvf pcre-8.36.tar.gz -C /usr/local/

sudo apt-get install build-essential

cd /usr/local/pcre/

sudo ./configure --prefix=/usr/local/pcre

sudo make

sudo make install

 

sudo ./configure --prefix=/usr/local/http-2.4.10
sudo make

sudo make install

sudo /usr/local/http-2.4.10/bin/apachectl start

sudo /usr/local/http-2.4.10/bin/apachectl stop

posted @ 2014-10-08 14:10  Man_华  阅读(2159)  评论(0编辑  收藏  举报