How to Install Apache HTTPD on Linux 6

clip_image001

To Install using YUM package:-

# yum install httpd -y

or

# up2date httpd

Install Apache From Source :-

Buy Books. Do Good. Support Local Charities

Download URL : http://www-us.apache.org/dist//httpd/httpd-2.4.29.tar.gz

https://httpd.apache.org/download.cgi#apache24

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

or

#apachetl -k start

To Stop :-

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

# /etc/init.d/httpd stop

or

#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 !

Shares
Get Weekly KBV Tips !

Learn and improve day to day Knowledge & lifestyles.