{"id":1625,"date":"2012-01-10T18:24:59","date_gmt":"2012-01-10T10:24:59","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=1625"},"modified":"2023-05-10T21:29:35","modified_gmt":"2023-05-10T21:29:35","slug":"how-to-enable-autostart-httpd-on-centos-6-2","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-enable-autostart-httpd-on-centos-6-2\/","title":{"rendered":"How to Enable Autostart httpd on CentOS 6.2"},"content":{"rendered":"<p>Apache HTTP Server, commonly referred to as httpd, is an open-source web server software that is widely used to host websites on the internet. On CentOS 6.2, httpd may not start automatically after a system reboot. This can cause inconvenience and downtime if the server needs to be restarted for maintenance or updates.<\/p>\n<p>In this how-to, we will show you how to enable httpd to start automatically when the server boots up.<\/p>\n<h2>Step 1: Check if httpd is installed<\/h2>\n<p>Before proceeding, it&#8217;s important to check if httpd is installed on your CentOS 6.2 server. To check if httpd is installed, you can run the following command in the terminal:<\/p>\n<pre>rpm -qa | grep httpd<\/pre>\n<p>If httpd is installed, you should see the output similar to this:<\/p>\n<pre>httpd-2.2.15-69.el6.centos.x86_64<\/pre>\n<p>If you don&#8217;t see any output, it means that httpd is not installed on your server, and you should install it first before proceeding.<\/p>\n<h2>Step 2: Enable httpd to start automatically<\/h2>\n<p>To enable httpd to start automatically on boot, you can use the chkconfig command. The chkconfig command is used to manage system services in CentOS. To enable httpd to start automatically, run the following command:<\/p>\n<pre>sudo chkconfig httpd on<\/pre>\n<p>This will set httpd to start automatically at system boot time.<\/p>\n<h2>Step 3: Verify that httpd is enabled to start automatically<\/h2>\n<p>To verify that httpd is now enabled to start automatically, you can use the chkconfig command again. Run the following command:<\/p>\n<pre>sudo chkconfig --list httpd<\/pre>\n<p>You should see the output similar to this:<\/p>\n<pre>\r\nhttpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off\r\n<\/pre>\n<p>This output indicates that httpd is now enabled to start automatically at system boot time for runlevels 2, 3, 4, and 5.<\/p>\n<h2>Step 4: Start httpd<\/h2>\n<p>Now that you have enabled httpd to start automatically at boot time, you can start the httpd service using the following command:<\/p>\n<pre>sudo service httpd start<\/pre>\n<p>This will start the httpd service, and your website will be accessible via a web browser.<\/p>\n<h2>Commands Mentioned:<\/h2>\n<ul>\n<li><span class=\"fw-bold\">rpm<\/span> &#8211; RPM Package Manager<\/li>\n<li><span class=\"fw-bold\">chkconfig<\/span> &#8211; System service manager<\/li>\n<li><span class=\"fw-bold\">service<\/span> &#8211; Command to manage system services<\/li>\n<\/ul>\n<h2>Conclusion:<\/h2>\n<p>In this tutorial, we have shown you how to enable httpd to start automatically on CentOS 6.2. This will ensure that your website is accessible even after a system reboot. By following the steps outlined in this guide, you can ensure that your httpd service is always available to your users.<\/p>\n<p>If you have any comments or suggestions for improvements, please let us know in the comments section below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apache HTTP Server, commonly referred to as httpd, is an open-source web server software that is widely used to host websites on the internet. On CentOS 6.2, httpd may not&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1554,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055],"tags":[2090,1253,2089,1473,1536],"class_list":["post-1625","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","tag-autostart","tag-centos-6-2","tag-configuration","tag-httpd","tag-linux"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=1625"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/1625\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1554"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=1625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=1625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=1625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}