我对在ubuntu下删除apache2有问题。我试过的是:
sudo apt-get remove apache2
sudo apt-get purge apache2不幸的是,在任何上级命令之后,仍然有文件:
sudo find / -name "apache2"
/var/log/apache2
/var/lib/update-rc.d/apache2
/var/cache/apache2
/usr/share/doc/apache2.2-common/examples/apache2
/usr/share/apache2
/usr/lib/apache2
/usr/lib/apache2/mpm-event/apache2
/usr/lib/apache2/mpm-itk/apache2
/usr/lib/apache2/mpm-worker/apache2
/usr/lib/apache2/mpm-prefork/apache2
/usr/sbin/apache2
/run/apache2
/run/lock/apache2
/etc/init.d/apache2
/etc/apache2
/etc/cron.daily/apache2
/etc/default/apache2
/etc/logrotate.d/apache2当我运行sudo /etc/init.d/apache2 start时
* Starting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.在浏览器中键入localhost之后,它将用以下方式进行响应:
Forbidden
You don't have permission to access / on this server.
Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.这些文件会干扰新的apache服务器安装吗?我都查过了,但没有发现任何身体。
编辑:上的输出是在删除服务器之后。从sudo find / -name "apache2"中删除所有文件后,我再次安装了sudo apt-get install apache2。sudo /etc/init.d/apache2输出具有:
* Starting web server apache2 Segmentation fault
Action 'start' failed.
The Apache error log may have more information.但是error.log和access.log是空的。
Apache安装:
sudo apt-get install apache2
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
apache2-mpm-worker apache2-utils apache2.2-common
Suggested packages:
apache2-doc apache2-suexec apache2-suexec-custom
The following NEW packages will be installed:
apache2 apache2-mpm-worker apache2-utils apache2.2-common
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/321 kB of archives.
After this operation, 1,240 kB of additional disk space will be used.
Do you want to continue [Y/n]? 它只要求1,240 kB空间是正常的吗?
发布于 2013-09-29 17:03:50
第一站apache:
sudo service apache2 stop然后,删除apache2包和依赖项:
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove --purge如果您手动修改或安装的东西,apt可能不会删除它。看看还剩下什么:
whereis apache2查看这些目录中的内容,如果您确信要销毁它,请手动删除目录如下:
sudo rm -Rf /etc/apache2 /usr/lib/apache2 /usr/include/apache2发布于 2020-10-31 19:36:03
在这里输入图像描述 在这里看到错误的图像
从Ubuntu中删除apache2
从本地主机中完全删除
第一次使用
service apache2 status如果它是active (运行) next
sudo apt remove apache2*同意使用y
祝你今天愉快:)
发布于 2021-12-22 06:15:05
以下列方式删除并安装apache2:
sudo apt-get purge apache2
sudo apt-get install apache2 https://stackoverflow.com/questions/19080738
复制相似问题