How to install and start the Apache or httpd service under Linux
Q. How do I install and start the Apache or httpd web server under Fedora core or Cent OS?
A. Apache HTTP Server is a free software/open source web server for Unix-like systems and other oses.
Apache features configurable error messages, DBMS-based authentication databases, and content negotiation. It is also supported by several graphical user interfaces (GUIs) which permit easier, more intuitive configuration of the server.
Use rpm command to install Apache under Linux. You can also use up2date or yum command to install the same.
Task: Install Apache/httpd under Fedroa Core/Cent OS Linux
Type the following command if you are using Fedora or Cent OS Linux:
# yum install httpd
Now, start the Apache/httpd
# chkconfig httpd on
# /etc/init.d/httpd start
Task: Install Apache/httpd under Red Hat Enterprise Linux
Type the following command
# up2date httpd
Start the Apache/httpd
# chkconfig httpd on
# /etc/init.d/httpd start
Task: Debian Linux httpd/Apache installation
Use apt-get command:
# apt-get install apache2
# /etc/init.d/apache2 start
Task: Verify that port 80 is open
# netstat -tulpn | grep :80
You can also install httpd from CDROM with rpm command:
# rpm -ivh httpd*
Configuration
Your server is started but you need to configure and use Apache as per your requirement. /etc/httpd/conf/httpd.conf (RHEL/Cent OS/Fedora Core Linux) or /etc/apache2/httpd.conf (Debian / Ubuntu Linux) configuration file. Use text editor such as vi to edit file. This file is very well documented or read official Apache configuration documentation for more information.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Apache Address already in use: make_sock: could not bind to port 80 or 443 error and solution
- Use sudo or sudoers to start, stop & restart Apache
- How do I find out syntax errors in my Apache web server configuration file?
- Restart Httpd Server
- How do I find the url for my cgi-bin?
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!


Recent Comments
Today ~ 32 Comments
Yesterday ~ 1 Comment
Yesterday ~ 3 Comments
Yesterday ~ 2 Comments
Yesterday ~ 3 Comments