Install and configure the Apache server in Ubuntu8.10

Source: Internet
Author: User
Ubuntu provides us with the simple suapt-getinstall command, through which you can easily install some software to use, these software is placed on the servers in various places of Ubuntu, if the software you want to install is common, you can download and use it. Of course, Apache is also available on Ubuntu servers. (This section describes the first step based on the Ubuntu8.10 environment): Open the terminal and enter the following command

Ubuntu provides us with the simple su apt-get install command, through which you can easily install some software to use, these software is placed on the servers in various places of Ubuntu, if the software you want to install is common, you can download and use it.

Of course, Apache is also available on Ubuntu servers. (The following describes the Ubuntu 8.10 environment)

Step 1: Open the terminal and enter the following command to download and install Apache2 from the server (SEE)

Sudo apt-get install apache2

Procedure

Linuxidc @ linuxidc-laptop :~ $ Sudo apt-get install apache2
[Sudo] password for linuxidc:
Reading the package list... complete
Analyzing the dependency tree of the software package
Reading status information... complete
The following software packages are automatically installed and are no longer in use:
Linux-headers-2.6.27-7 linux-headers-2.6.27-7-generic
Use 'apt-get autoremove 'to delete them.
The following additional software packages will be installed:
Apache2-mpm-worker apache2-utils apache2.2-common
Libapr1 libaprutil1
Recommended software packages:
Apache2-doc apache2-suexec apache2-suexec-custom
The following [new] software packages will be installed:
Apache2 apache2-mpm-worker apache2-utils
Apache2.2-common libapr1 libaprutil1
A total of 0 software packages have been upgraded, 6 new software packages have been installed, 0 software packages have to be uninstalled, and 0 software have not been upgraded. Www.britepic.org
Download a package of 1392kB.
After decompression, the extra space of 5153kB is consumed.
Do you want to continue? [Y/n] Y


Step 2:

Configure the website directory. The Apache directory under Ubuntu is stored in a different way than the de directory under Windows. Its configuration file is stored in the etc/apache2/folder, the previous configuration files are divided into several

They are:

Etc/apache2/conf. d/charset (SEE)

This is the website encoding configuration, the content inside is very little, open to see it will know, I here will be the last line of # AddDefaultCharset UTF-8 in front of # Remove, use UTF-8 encoding, of course, you can also change the UTF-8 into another code. (See)

Etc/apache2/sites-available/default

This is the website directory configuration. If you want to change the website directory, modify this. The directory above also contains the website directory in apache2.conf.

The question is, how can I modify these files? In Linux, these files are only available to the root user, and cannot be modified in window mode.

Here we use the terminal to log on to the root

$ Su

Enter the root password

# Sudo gedit etc/apache2/conf. d/charset

Press enter to open GEDIT and the file to open. Now you can modify it. Save it after modification.

# Gedit etc/apache2/sites-available/default

Press enter.

After completing the preceding steps, restart apache2. The command is apache2-k restart.

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.