命令:
sudo apt-get update
sudo apt-get update
修改它的监听端口
sudo vim /etc/apache2/ports.conf
修改它的主机端口
sudo vim /etc/apache2/sites-available/000-default.conf
sudo /etc/init.d/apache2 [ start | stop | restart | status ]
service apache2 [ start | stop | restart | status ]
sudo apt-get –purge remove apache2
sudo apt-get –purge remove apache2-common
sudo apt-get –purge remove apache2-utils
sudo apt-get autoremove apache2
注: –purge 是不保留配置文件的意思
删掉/etc/apache2文件夹:
sudo rm -rf /etc/apache2
删掉/var/www文件夹:
sudo rm -rf /var/www
删掉/etc/init.d/apache2文件:
sudo rm -rf /etc/init.d/apache2
原文:https://www.cnblogs.com/xjxin/p/14190563.html