Install and uninstall apache2 in ubuntu

Source: Internet
Author: User
1 install apache2 installation command: sudoapt-getinstallapache2 start stop restart apache2: serviceapache2startstoprestart2 uninstall apache2 uninstall and reinstall before the unfind the apache2conf configuration file, test the use of the method

1. install apache2

Installation Command: sudo apt-get install apache2

Start/stop/restart apache2: service apache2 start/stop/restart

2. uninstall apache2

You cannot find the apache2.conf configuration file after uninstalling and reinstalling it. you can use the following method to unmount the file and then use it.

(1) $ sudo apt-get -- purge remove apache2
$ Sudo apt-get -- purge remove apache2.2-common
$ Sudo apt-get autoremove

(2) (key step) find and delete the configuration file that has not been deleted.
$ Sudo find/etc-name "* apache *"-exec rm-rf {}\;
$ Sudo rm-rf/var/www

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.