一句命令:
sudo apt-get install apache2
产生的启动和停止文件是:/etc/init.d/apache2
启动:sudo apache2ctl -k start
停止:sudo apache2ctl -k stop
重新启动:sudo apache2ctl -k restart
配置文件保存在:/etc/apache2
下载:
解压&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
时间: 2024-11-05 13:37:56