{"id":657,"date":"2015-04-23T09:31:57","date_gmt":"2015-04-23T01:31:57","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=657"},"modified":"2016-07-16T15:05:54","modified_gmt":"2016-07-16T07:05:54","slug":"centos%e8%ae%be%e7%bd%ae%e9%9a%8f%e6%9c%ba%e5%90%af%e5%8a%a8%e9%a1%b9%e7%9a%84%e4%b8%89%e7%a7%8d%e6%96%b9%e5%bc%8f","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/centos\/2015\/04\/23\/093157657.html","title":{"rendered":"CentOS\u8bbe\u7f6e\u968f\u673a\u542f\u52a8\u9879\u7684\u4e09\u79cd\u65b9\u5f0f"},"content":{"rendered":"<p>1\u3001\u628a\u542f\u52a8\u7a0b\u5e8f\u7684\u547d\u4ee4\u6dfb\u52a0\u5230\/etc\/rc.d\/rc.local\u6587\u4ef6\u4e2d\uff0c\u5982\u968f\u673a\u542f\u52a8svn\u670d\u52a1<\/p>\n<pre line=\"1\">[root@Crayfish ~]# cd \/etc\/rc.d\/\n[root@Crayfish rc.d]# ls\ninit.d  rc  rc0.d  rc1.d  rc2.d  rc3.d  rc4.d  rc5.d  rc6.d  rc.local  rc.sysinit\n[root@Crayfish rc.d]# cat rc.local \n#!\/bin\/sh\n#\n# This script will be executed *after* all the other init scripts.\n# You can put your own initialization stuff in here if you don't\n# want to do the full Sys V style init stuff.\n\ntouch \/var\/lock\/subsys\/local\nsvnserve -d -r \/svn\/\n[root@Crayfish rc.d]# <\/pre>\n<p>2\u3001\u628a\u5199\u597d\u7684\u542f\u52a8\u811a\u672c\u6dfb\u52a0\u5230\u76ee\u5f55\/etc\/rc.d\/init.d\/\uff0c\u7136\u540e\u4f7f\u7528\u547d\u4ee4chkconfig\u8bbe\u7f6e\u5f00\u673a\u542f\u52a8\u3002<\/p>\n<p>chkconfig \u529f\u80fd\u8bf4\u660e\uff1a\u68c0\u67e5\uff0c\u8bbe\u7f6e\u7cfb\u7edf\u7684\u5404\u79cd\u670d\u52a1\u3002<br \/>\n\u8bed\u6cd5\uff1achkconfig [&#8211;add][&#8211;del][&#8211;list][\u7cfb\u7edf\u670d\u52a1] \u6216 chkconfig [&#8211;level <\u7b49\u7ea7\u4ee3\u53f7>][\u7cfb\u7edf\u670d\u52a1][on\/off\/reset]<br \/>\n&#8211;add \u6dfb\u52a0\u670d\u52a1<br \/>\n&#8211;del \u5220\u9664\u670d\u52a1<br \/>\n&#8211;list \u67e5\u770b\u5404\u670d\u52a1\u542f\u52a8\u72b6\u6001<\/p>\n<p>\u6bd4\u5982\u6211\u4eec\u8bbe\u7f6e\u81ea\u542f\u52a8mysql\uff1a<br \/>\n\u5c06mysql\u542f\u52a8\u811a\u672c\u653e\u5165\u6240\u6709\u811a\u672c\u8fd0\u884c\u76ee\u5f55\/etc\/rc.d\/init.d\u4e2d<\/p>\n<pre line=\"1\">cp \/lamp\/mysql-5.0.41\/support-files\/mysql.server \/etc\/rc.d\/init.d\/mysqld<\/pre>\n<p>#\u6539\u53d8\u6743\u9650<br \/>\nchown root.root \/etc\/rc.d\/init.d\/mysqld<\/p>\n<p>#\u6240\u6709\u7528\u6237\u90fd\u53ef\u4ee5\u6267\u884c\uff0c\u5355\u53ea\u6709root\u53ef\u4ee5\u4fee\u6539<br \/>\nchmod 755 \/etc\/rc.d\/init.d\/mysqld<\/p>\n<p>#\u5c06mysqld \u653e\u5165linux\u542f\u52a8\u7ba1\u7406\u4f53\u7cfb\u4e2d<br \/>\nchkconfig &#8211;add mysqld<\/p>\n<p>#\u67e5\u770b\u5168\u90e8\u670d\u52a1\u5728\u5404\u8fd0\u884c\u7ea7\u72b6\u6001<br \/>\nchkconfig &#8211;list mysqld<\/p>\n<p>#\u53ea\u8981\u8fd0\u884c\u7ea7\u522b3\u542f\u52a8\uff0c\u5176\u4ed6\u90fd\u5173\u95ed<br \/>\nchkconfig &#8211;levels 245 mysqld off<\/p>\n<p>\u4f8b\u5982\uff1a\u6211\u4eec\u628ahttpd\u7684\u811a\u672c\u5199\u597d\u540e\u653e\u8fdb\/etc\/rc.d\/init.d\/\u76ee\u5f55\uff0c\u4f7f\u7528<br \/>\nchkconfig &#8211;add httpd<br \/>\nchkconfig httpd on<br \/>\n\u547d\u4ee4\u5373\u8bbe\u7f6e\u597d\u4e86\u5f00\u673a\u542f\u52a8\u3002<\/p>\n<p>3\u3001\u628a\u542f\u52a8\u7a0b\u5e8f\u7684\u547d\u4ee4\u6dfb\u52a0\u5230\/etc\/rc.d\/rc.sysinit \u6587\u4ef6\u4e2d<\/p>\n<p>\u811a\u672c\/etc\/rc.d\/rc.sysinit\uff0c\u5b8c\u6210\u7cfb\u7edf\u670d\u52a1\u7a0b\u5e8f\u542f\u52a8\uff0c\u5982\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u3001\u8bbe\u7f6e\u7cfb\u7edf\u65f6\u949f\u3001\u52a0\u8f7d\u5b57\u4f53\u3001\u68c0\u67e5\u52a0\u8f7d\u6587\u4ef6\u7cfb\u7edf\u3001\u751f\u6210\u7cfb\u7edf\u542f\u52a8\u4fe1\u606f\u65e5\u5fd7\u6587\u4ef6\u7b49<br \/>\n\u6bd4\u5982\u6211\u4eec\u8bbe\u7f6e\u81ea\u542f\u52a8apache\uff1a<\/p>\n<pre line=\"1\">echo \"\/usr\/local\/apache2\/bin\/apachectl start\" >> \/etc\/rc.d\/rc.sysinit<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u628a\u542f\u52a8\u7a0b\u5e8f\u7684\u547d\u4ee4\u6dfb\u52a0\u5230\/etc\/rc.d\/rc.local\u6587\u4ef6\u4e2d\uff0c\u5982\u968f\u673a\u542f\u52a8svn\u670d\u52a1 [root@Crayfish ~]# cd \/etc\/rc.d\/ [root@Crayfish rc.d]# ls init.d rc rc0.d rc1.d rc2.d rc3.d rc4.d rc5.d rc6.d rc.local rc.sysinit [root@Crayfish rc.d]# cat rc.local #!\/bin\/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don&#8217;t # want to do the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[8],"class_list":["post-657","post","type-post","status-publish","format-standard","hentry","category-centos","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=657"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/657\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}