Install Apache under Ubuntu

Source: Internet
Author: User

Ubuntu offers us su apt-Getwith the install command, you can easily install some software that is placed on the server where Ubuntu is placed in various places, and if the software you want to install is more common, it can usually be downloaded. sudo apt-Getinstall apache2 Apache on Ubuntu in two ways:1Use packaged services for development packages, such as using the Apt-get command;2build Apache from the source code. This article describes the two different installation methods in detail. Method One: Use packaged services for the development package--APT-Getto install Apache, enter the command in the command line terminal: $ sudo apt-GetInstall apache2 Restart Apache, sudo service apache2 Restart can also sudo/etc/init.d/apache2 Restart Test:
Enter HTTP in the browser://localhost or http://127.0.0.1, if you see the IT works!, it means that Apache installed successfully, Apache default installation, will be in/var under a directory called WWW, this is the Web directory, All Web files that can be accessed by the browser are placed in this directory.

If you feel you don't need Apache anymore, you can uninstall it:1. Delete Apache on the command line type: $ sudo apt-Get--purge Remove apache-common$ sudo apt-Get--purge Remove Apache2. Locate the configuration file that is not removed, and remove the code: $ sudo find/etc-name"*apache*"|xargs RM-RF $ sudo rm-RF/var/Www$sudo RM-rf/etc/libapache2-mod-JK3Delete the association so that you can use apt-again.GetInstall apache2 re-installed #dpkg-L |grep Apache2|awk'{print $}'|xargs dpkg-phttp://blog.csdn.net/xysnake/article/details/5993467http//www.linuxidc.com/Linux/2013-06/85827.htm

Install Apache under Ubuntu

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.