How To Install Apache web server on CentOS 7/6 with a single command

The Apache server is a most robust web server available till date, though, the Nginx is there but still, widely used Apache has its own charm. Most of the commercial web hosting services use the CentOS RHEL based Linux operating system because of the security, stability and all-time favorite word of people ‘free’. Yes, it is open source and free Linux OS that developed on the code of Red Hat, you can say it a fork of RHEL.

Most of the home & casual Linux users are pretty much familiar with popular Ubuntu and its commanding system. But if you move towards the enterprise you will see either Red Hat or CentOS servers in general. So, if you are looking for a way to install the Apache web server on CentOS 6 or CentOS 7 using the command terminal, then here are the commands:

  1. Open the command terminal, if you are using the server edition CLI interface then by default you there,
  2. You should have access to the root user. Because when you type sudo before the command it requires the root password.
  3. Now type the below single command to install the Apache web server.
    sudo yum install httpd
  4. Once the Apache web server installed just use the below command to start the Apache web server services on the Centos server.
    sudo systemctl start httpd.service
  5. Open the browser to test the Apache web server is up & running. For that type your Centos server IP Address: http:// server_IP_address/Install Apche web server on CentOS 6 and centos 7

 

See Also :