﻿{"id":225,"date":"2014-09-28T11:56:36","date_gmt":"2014-09-28T03:56:36","guid":{"rendered":"http:\/\/blog.sway.com.cn\/?p=225"},"modified":"2014-09-28T11:56:36","modified_gmt":"2014-09-28T03:56:36","slug":"centos%e8%ae%be%e7%bd%ae%e6%9c%8d%e5%8a%a1%e5%bc%80%e6%9c%ba%e5%90%af%e5%8a%a8%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/blog.sway.com.cn\/?p=225","title":{"rendered":"CentOS\u8bbe\u7f6e\u670d\u52a1\u5f00\u673a\u542f\u52a8\u7684\u65b9\u6cd5"},"content":{"rendered":"<p>CentOS\u8bbe\u7f6e\u670d\u52a1\u5f00\u673a\u542f\u52a8\u7684\u4e24\u79cd\u65b9\u6cd5<\/p>\n<p>1\u3001\u5229\u7528 chkconfig \u6765\u914d\u7f6e\u542f\u52a8\u7ea7\u522b<br \/>\n\u5728CentOS\u6216\u8005RedHat\u5176\u4ed6\u7cfb\u7edf\u4e0b\uff0c\u5982\u679c\u662f\u540e\u9762\u5b89\u88c5\u7684\u670d\u52a1\uff0c\u5982httpd\u3001mysqld\u3001postfix\u7b49\uff0c\u5b89\u88c5\u540e\u7cfb\u7edf\u9ed8\u8ba4\u4e0d\u4f1a\u81ea\u52a8\u542f\u52a8\u7684\u3002\u5c31\u7b97\u624b\u52a8\u6267\u884c \/etc\/init.d\/mysqld start \u542f\u52a8\u4e86\u670d\u52a1\uff0c\u53ea\u8981\u670d\u52a1\u5668\u91cd\u542f\u540e\uff0c\u7cfb\u7edf\u4ecd\u7136\u4e0d\u4f1a\u81ea\u52a8\u542f\u52a8\u670d\u52a1\u3002 \u5728\u8fd9\u4e2a\u65f6\u5019\uff0c\u6211\u4eec\u5c31\u9700\u8981\u5728\u5b89\u88c5\u540e\u505a\u4e2a\u8bbe\u7f6e\uff0c\u8ba9\u7cfb\u7edf\u81ea\u52a8\u542f\u52a8\u8fd9\u4e9b\u670d\u52a1\uff0c\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u635f\u5931\u548c\u9ebb\u70e6\u3002 \u5176\u5b9e\u547d\u4ee4\u5f88\u7b80\u5355\u7684\uff0c\u4f7f\u7528chkconfig\u5373\u53ef\u3002<br \/>\n[\u5929\u6dafPHP\u535a\u5ba2]-[http:\/\/blog.phpha.com]<br \/>\n\u6bd4\u5982\u8981\u5c06mysqld\u8bbe\u7f6e\u4e3a\u5f00\u673a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n<pre class=\"lang:sh decode:true \">chkconfig\u00a0mysqld\u00a0on<\/pre>\n<p>\u8981\u53d6\u6d88\u6389\u67d0\u4e2a\u670d\u52a1\u81ea\u52a8\u542f\u52a8\uff0c\u53ea\u9700\u8981\u5c06\u6700\u540e\u7684\u53c2\u6570 \u201con\u201d \u53d8\u66f4\u4e3a \u201coff\u201d \u5373\u53ef\u3002<\/p>\n<p>\u6bd4\u5982\u8981\u53d6\u6d88 postfix \u7684\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n<pre class=\"lang:sh decode:true \">chkconfig\u00a0postfix\u00a0off<\/pre>\n<p>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5982\u679c\u8fd9\u4e2a\u670d\u52a1\u5c1a\u672a\u88ab\u6dfb\u52a0\u5230 chkconfig \u5217\u8868\u4e2d\uff0c\u5219\u73b0\u9700\u8981\u4f7f\u7528 \u2013-add \u53c2\u6570\u5c06\u5176\u6dfb\u52a0\u8fdb\u53bb\uff1a<\/p>\n<pre class=\"lang:sh decode:true \">chkconfig\u2013-add\u00a0postfix<\/pre>\n<p>\u5982\u679c\u8981\u67e5\u8be2\u5f53\u524d\u6240\u6709\u81ea\u52a8\u542f\u52a8\u7684\u670d\u52a1\uff0c\u53ef\u4ee5\u8f93\u5165\uff1a<\/p>\n<pre class=\"lang:sh decode:true \">chkconfig-\u2013list<\/pre>\n<p>\u5982\u679c\u53ea\u60f3\u770b\u6307\u5b9a\u7684\u670d\u52a1\uff0c\u53ea\u9700\u8981\u5728 \u201c\u2013-list\u201d \u4e4b\u540e\u52a0\u4e0a\u670d\u52a1\u540d\u5c31\u597d\u4e86\uff0c\u6bd4\u5982\u67e5\u770bhttpd\u670d\u52a1\u662f\u5426\u4e3a\u81ea\u52a8\u542f\u52a8\uff1a<\/p>\n<pre class=\"lang:sh decode:true\">chkconfig\u2013-listhttpd\r\nhttpd\u00a00:off\u00a01:off\u00a02:off\u00a03:off\u00a04:off\u00a05:off\u00a06:off<\/pre>\n<p>\u6b64\u65f60~6\u5747\u4e3aoff\uff0c\u5219\u8bf4\u660ehttpd\u670d\u52a1\u4e0d\u4f1a\u5728\u7cfb\u7edf\u542f\u52a8\u7684\u65f6\u5019\u81ea\u52a8\u542f\u52a8\u3002\u6211\u4eec\u8f93\u5165\uff1a<\/p>\n<pre class=\"lang:sh decode:true\">chkconfig\u00a0httpd\u00a0on<\/pre>\n<p>\u5219\u6b64\u65f6\u4e3a\uff1a<\/p>\n<pre class=\"lang:sh decode:true \">httpd0:off1:off2:on3:on4:on5:on6:off<\/pre>\n<p>\u8fd9\u4e2a\u65f6\u50192~5\u90fd\u662fon\uff0c\u5c31\u8868\u660e\u4f1a\u81ea\u52a8\u542f\u52a8\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>2\u3001\u4fee\u6539 \/etc\/rc.d\/rc.local \u8fd9\u4e2a\u6587\u4ef6\uff1a<br \/>\n\u4f8b\u5982\u5c06 apache\u3001mysql\u3001samba\u3001svn \u7b49\u8fd9\u4e9b\u670d\u52a1\u7684\u5f00\u673a\u81ea\u542f\u52a8\u95ee\u9898\u4e00\u8d77\u641e\u5b9a\uff1a<\/p>\n<pre class=\"lang:sh decode:true\">[\u5929\u6dafPHP\u535a\u5ba2]-[http:\/\/blog.phpha.com]\r\nvi\/etc\/rc.d\/rc.local\r\n#\u6dfb\u52a0\u4ee5\u4e0b\u547d\u4ee4\r\n\/usr\/sbin\/apachectl start\r\n\/etc\/rc.d\/init.d\/mysqld start\r\n\/etc\/rc.d\/init.d\/smb start\r\n\/usr\/local\/subversion\/bin\/svnserve-d<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS\u8bbe\u7f6e\u670d\u52a1\u5f00\u673a\u542f\u52a8\u7684\u4e24\u79cd\u65b9\u6cd5 1\u3001\u5229\u7528 chkconfig \u6765\u914d\u7f6e\u542f\u52a8 &hellip; <a href=\"http:\/\/blog.sway.com.cn\/?p=225\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,11],"tags":[23,234,102,103],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-7","category-11","tag-centos","tag-linux","tag-service","tag-103"],"_links":{"self":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=225"}],"version-history":[{"count":1,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":226,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/225\/revisions\/226"}],"wp:attachment":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}