{"id":6674,"date":"2017-05-08T12:35:16","date_gmt":"2017-05-08T04:35:16","guid":{"rendered":"http:\/\/rmohan.com\/?p=6674"},"modified":"2017-05-08T12:35:16","modified_gmt":"2017-05-08T04:35:16","slug":"centos-rhel-how-to-install-and-start-the-apache-httpd-service","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=6674","title":{"rendered":"CentOS \/ RHEL : How to install and start the Apache httpd service"},"content":{"rendered":"<p>Question: How to install Apache and configure Apache httpd to run as a service?<\/p>\n<p>Answer:<\/p>\n<p>Installing the Apache package<\/p>\n<p>If you have the apache package downloaded, you can install it using rpm command as root user.<\/p>\n<p># rpm -ivh httpd<br \/>\nIf you have yum repository configured, use the recommended way of installing Apache httpd, i.e. with \u201cyum install\u201d command.<\/p>\n<p># yum install httpd<br \/>\nNOTE: To get a specific version replace httpd with the version you would like. Example: httpd-2.2.14-1.2.6.jdk6.ep5.el5.x86_64<br \/>\nInstalling httpd as a service<\/p>\n<p>Enable the http service on startup with the below command. This will enable it for runlevels 2,3,4 &#038; 5 :<\/p>\n<p># chkconfig httpd on<br \/>\nTo start the httpd service :<\/p>\n<p># service httpd start<br \/>\nFor RHEL 7<\/p>\n<p>With RHEL 7 you use the systemctl command to enable the service:<\/p>\n<p># systemctl enable httpd.service<br \/>\nWith RHEL 7 you use the systemctl command to start the service:<\/p>\n<p># systemctl start httpd.service<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question: How to install Apache and configure Apache httpd to run as a service?<\/p>\n<p>Answer:<\/p>\n<p>Installing the Apache package<\/p>\n<p>If you have the apache package downloaded, you can install it using rpm command as root user.<\/p>\n<p># rpm -ivh httpd If you have yum repository configured, use the recommended way of installing Apache httpd, i.e. [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6674"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6674"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6674\/revisions"}],"predecessor-version":[{"id":6675,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/6674\/revisions\/6675"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}