How to Install Apache HTTPD on Linux 6


To Install using YUM package:-

# yum install httpd -y


# up2date httpd

Install Apache From Source :-

Buy Books. Do Good. Support Local Charities

Download URL :

1. Extract the gz file using tar command

# tar -xvzf httpd-2.2.31.tar.gz

# cd httpd-2.2.31

2. Configure the files

#./configure –prefix=PREFIX

3. Compile

# make

Compile the package using make command

4. Install

# make install

finally install using make install command

Start the Apache:-

To Start the httpd server we can use both the following ways

# /etc/init.d/httpd start


#apachetl -k start

To Stop :-

Similarly for stopping the apache server, we can use the stop command

# /etc/init.d/httpd stop


#apachetl -k stop

Permanent chkconfig Configuration:-

# chkconfig httpd on

To check whether Apache is running or not:-

Below command will check for the port 80 which is the default configured port for Apache HTTPD.

# netstat -tulpn | grep :80

If apache is running we will see the response like below

tcp 0 0 :::80 ::* LISTEN 0 2710371 7760/httpd

Click to rate this post!
[Total: 1 Average: 5]

Share and Enjoy !

Get Weekly KBV Tips !

Learn and improve day to day Knowledge & lifestyles.