How to Install Httpd on CentOS 6.2

Apache HTTPD is a widely used web server renowned for its extensibility and utility across various types of websites. This tutorial will guide you through the process of installing Apache HTTPD on CentOS 6.2.

This guide assumes that you have installed CentOS 6.2 with minimal installation type and have set up your local yum repository. However, if your server has a direct internet connection, you can use the internet CentOS yum repository.

For more information on setting up a local yum repository from a CD-ROM/DVD-ROM image on CentOS 6.2, you can visit this tutorial.

Step 1: Install Apache HTTPD

To install Apache HTTPD, you will need to use the following command:

# yum install httpd

This command will trigger the yum package manager to install the Apache HTTPD package. The system will then load the plugins and determine the fastest mirrors to download the package from your repository.

Step 2: Resolve Dependencies

During the installation process, the system will resolve dependencies. These dependencies include httpd-tools, libaprutil-1.so.0, libapr-1.so.0, apr-util-ldap, and /etc/mime.types. The system will automatically process these dependencies and run a transaction check.

Step 3: Install Dependencies

The system will then install the dependencies. These include apr, apr-util, apr-util-ldap, httpd-tools, and mailcap. The system will resolve these dependencies and provide a summary of the transaction.

Step 4: Confirm Installation

The system will then ask for your confirmation to proceed with the installation. You can confirm by typing ‘y’ and pressing enter. The system will then download the packages, run rpm_check_debug, and perform a transaction test. If the transaction test is successful, the system will proceed with the transaction.

See also  How to Install Cockpit on Linux CentOS?

Step 5: Complete Installation

The system will then install the packages. Once the installation is complete, the system will provide a summary of the installed packages.

Complete System Response

[root@centos6 ~]# yum install httpd
Loaded plugins: fastestmirror
Determining fastest mirrors
CentOS6.2-Repository                                                        | 1.3 kB     00:00 ...
CentOS6.2-Repository/primary                                                | 1.2 MB     00:00 ...
CentOS6.2-Repository                                                                     3042/3042
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.i686 0:2.2.15-15.el6.centos will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: libaprutil-1.so.0 for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: libapr-1.so.0 for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.i686
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.i686
--> Running transaction check
---> Package apr.i686 0:1.3.9-3.el6_1.2 will be installed
---> Package apr-util.i686 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.i686 0:1.3.9-3.el6_0.1 will be installed
---> Package httpd-tools.i686 0:2.2.15-15.el6.centos will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================
 Package              Arch          Version                      Repository                   Size
===================================================================================================
Installing:
 httpd                i686          2.2.15-15.el6.centos         CentOS6.2-Repository        818 k
Installing for dependencies:
 apr                  i686          1.3.9-3.el6_1.2              CentOS6.2-Repository        129 k
 apr-util             i686          1.3.9-3.el6_0.1              CentOS6.2-Repository         89 k
 apr-util-ldap        i686          1.3.9-3.el6_0.1              CentOS6.2-Repository         15 k
 httpd-tools          i686          2.2.15-15.el6.centos         CentOS6.2-Repository         70 k
 mailcap              noarch        2.1.31-2.el6                 CentOS6.2-Repository         27 k

Transaction Summary
===================================================================================================
Install       6 Package(s)

Total download size: 1.1 M
Installed size: 3.4 M
Is this ok [y/N]: y
Downloading Packages:
---------------------------------------------------------------------------------------------------
Total                                                              3.8 MB/s | 1.1 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : mailcap-2.1.31-2.el6.noarch                                                     1/6
  Installing : apr-1.3.9-3.el6_1.2.i686                                                        2/6
  Installing : apr-util-1.3.9-3.el6_0.1.i686                                                   3/6
  Installing : httpd-tools-2.2.15-15.el6.centos.i686                                           4/6
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.i686                                              5/6
  Installing : httpd-2.2.15-15.el6.centos.i686                                                 6/6

Installed:
  httpd.i686 0:2.2.15-15.el6.centos

Dependency Installed:
  apr.i686 0:1.3.9-3.el6_1.2                     apr-util.i686 0:1.3.9-3.el6_0.1
  apr-util-ldap.i686 0:1.3.9-3.el6_0.1           httpd-tools.i686 0:2.2.15-15.el6.centos
  mailcap.noarch 0:2.1.31-2.el6

Complete!

Commands Mentioned

  • # yum install httpd – This command installs the Apache HTTPD package using the yum package manager.
See also  How to Install system-config-firewall-tui on Linux CentOS 6.2 Server

Conclusion

Installing Apache HTTPD on CentOS 6.2 is a straightforward process that involves using the yum package manager to install the httpd package and its dependencies.

This tutorial has guided you through each step of the process, from initiating the installation to resolving dependencies and confirming the installation. By following these steps, you can successfully install Apache HTTPD on your CentOS 6.2 system and start serving web pages.

Remember, this is just the beginning of your journey with Apache HTTPD. There are many more features and configurations to explore to get the most out of this powerful web server.

This tutorial is part of a series of tutorials on the best web servers, including Apache, Nginx and LiteSpeed. You can also learn more about different types of hosting, such as dedicated server, VPS server, cloud hosting, and shared hosting.

See also  How to Setup Secure SSH Without Password on Linux CentOS

FAQ

  1. What is Apache HTTPD?

    Apache HTTPD is a widely used, open-source web server software developed and maintained by the Apache Software Foundation. It is known for its power, flexibility, and wide range of features, making it suitable for many different types of websites.

  2. What is CentOS?

    CentOS, which stands for Community Enterprise Operating System, is a free, open-source platform that is functionally compatible with its upstream source, Red Hat Enterprise Linux (RHEL). It is one of the most popular Linux distributions for web servers.

  3. What is a yum repository?

    A yum repository is a directory of RPM package files and metadata readable by the yum package manager. Yum repositories allow for the installation of software on CentOS and other Linux distributions.

  4. What are dependencies in the context of software installation?

    Dependencies are additional software packages that a software package requires to run correctly. These could be libraries, compilers, or other software. During the installation process, these dependencies are often installed automatically.

  5. What is the purpose of the ‘yum install httpd’ command?

    The ‘yum install httpd’ command is used to install the Apache HTTPD web server on a CentOS system. The ‘yum’ part of the command refers to the package manager used by CentOS, and ‘httpd’ is the package name for the Apache HTTPD web server.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *