{"id":602,"date":"2007-08-03T02:02:00","date_gmt":"2007-08-03T07:02:00","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/archives\/2007\/08\/03\/embracing-chkconfig-to-auto-start-services-like-mysql-on-rhelcentosfedoraetc"},"modified":"2007-08-03T02:02:04","modified_gmt":"2007-08-03T07:02:04","slug":"embracing-chkconfig-to-auto-start-services-like-mysql-on-rhelcentosfedoraetc","status":"publish","type":"post","link":"https:\/\/www.bytebot.net\/blog\/archives\/2007\/08\/03\/embracing-chkconfig-to-auto-start-services-like-mysql-on-rhelcentosfedoraetc","title":{"rendered":"Embracing chkconfig to auto-start services (like mysql) on RHEL\/CentOS\/Fedora\/etc."},"content":{"rendered":"<p>I was at <a href=\"http:\/\/modm.wordpress.com\/\">MODM<\/a>4 yesterday, and as always, great fun was had. One common recurring theme though, was getting MySQL to start automatically upon a Linux server&#8217;s restart, something which I would have thought just came pretty naturally to sys-admin types. Upon further probing, these systems were all generally CentOS or RHEL based, and it wasn&#8217;t just MySQL that gave them problems &#8211; it was anything they&#8217;d installed out of the stock packages (<a href=\"http:\/\/www.lighttpd.net\/\">lighttpd<\/a> was a popular Apache replacement, that suffered from the same fate).<\/p>\n<p>While I didn&#8217;t recollect the exact part of the <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/\">manual<\/a> it was stored in, I was informing everyone to make use of the <tt>chkconfig<\/tt> tool. Its really as simple as making sure there exists a <tt>\/etc\/init.d\/mysql<\/tt> (it must be executable &#8211; chmod +x), doing a <tt>chkconfig --add mysql<\/tt> and making sure that it starts up at the correct runlevels (typically 3, 4 and 5). A simple <tt>chkconfig --level 345 mysql on<\/tt> and you&#8217;re ready to rock. Repeat, rinse for lighttpd or anything else, that has a startup script, really.<\/p>\n<p>And read the manual &#8211; section 2.4.16.2.2. <a href=\"http:\/\/dev.mysql.com\/doc\/refman\/5.0\/en\/unix-post-installation.html#automatic-start\">Starting and Stopping MySQL Automatically<\/a>. <a href=\"http:\/\/www.redhat.com\/docs\/manuals\/enterprise\/RHEL-5-manual\/Deployment_Guide-en-US\/s1-services-chkconfig.html\">chkconfig<\/a>&#8216;s manual page is a little sparse, so consider some of the Red Hat Knowledgebase entries: <a href=\"http:\/\/kbase.redhat.com\/faq\/FAQ_43_5943.shtm\">How do I use chkconfig to enable a script for a service that accepts start, stop, and status options?<\/a> and <a href=\"http:\/\/kbase.redhat.com\/faq\/FAQ_79_4024.shtm\">Why does an installed service, like ypbind, not show up in the chkconfig list, but I am able to start it manually?<\/a> Kudos to Red Hat&#8217;s open KB as well&#8230;<\/p>\n<p>Technorati Tags: <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/chkconfig\" rel=\"tag\">chkconfig<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/rhel\" rel=\"tag\">rhel<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/centos\" rel=\"tag\">centos<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/fedora\" rel=\"tag\">fedora<\/a>, <a class=\"performancingtags\" href=\"http:\/\/technorati.com\/tag\/mysql\" rel=\"tag\">mysql<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was at MODM4 yesterday, and as always, great fun was had. One common recurring theme though, was getting MySQL to start automatically upon a Linux server&#8217;s restart, something which I would have thought just came pretty naturally to sys-admin types. Upon further probing, these systems were all generally CentOS or RHEL based, and it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[23],"tags":[],"class_list":["post-602","post","type-post","status-publish","format-standard","hentry","category-mysql"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p4vJD-9I","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"amp_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=602"}],"version-history":[{"count":0,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/602\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}