{"id":2794,"date":"2012-03-27T14:25:21","date_gmt":"2012-03-27T06:25:21","guid":{"rendered":"http:\/\/jpuyy.com\/?p=2794"},"modified":"2013-09-11T16:54:57","modified_gmt":"2013-09-11T08:54:57","slug":"centos6-basic-commands","status":"publish","type":"post","link":"https:\/\/jpuyy.com\/?p=2794","title":{"rendered":"CentOS6.2\u521d\u59cb\u5316\u64cd\u4f5c"},"content":{"rendered":"<h2>CentOS\u5b89\u88c5gcc g++\u7b49\u7f16\u8bd1\u73af\u5883\uff08\u4f7f\u7528yum\uff09<\/h2>\n<pre>yum groupinstall 'Development Tools'<\/pre>\n<h2>CentOS\u5b89\u88c5\u4e2d\u6587\u5305<\/h2>\n<pre>yum groupinstall chinese-support<\/pre>\n<h2>CentOS\u00a0\u914d\u7f6e ssh<\/h2>\n<p>\u5b89\u88c5SSH<\/p>\n<pre>yum install ssh<\/pre>\n<p>\u542f\u52a8SSH<\/p>\n<pre>service sshd start<\/pre>\n<p>\u8bbe\u7f6e\u5f00\u673a\u8fd0\u884c<\/p>\n<pre>chkconfig sshd on<\/pre>\n<p>\u5728hosts.deny\u6587\u4ef6\u5c3e\u6dfb\u52a0sshd:ALL\u00a0\u610f\u601d\u662f\u62d2\u7edd\u6240\u6709\u8bbf\u95ee\u8bf7\u6c42<\/p>\n<p>\u5728hosts.allow\u6587\u4ef6\u5c3e\u6dfb\u52a0sshd:192.168.0. \u610f\u601d\u662f\u5141\u8bb8192.168.0.1 \u5230254\u7684\u4e3b\u673a<\/p>\n<p>\u91cd\u542fssh<\/p>\n<pre>\/etc\/rc.d\/init.d\/sshd restart<\/pre>\n<h2>\u5b89\u88c5locate<\/h2>\n<pre>yum install mlocate<\/pre>\n<p>mlocate\u662fGNU locate\u7684\u4e00\u4e2a\u53d8\u79cd\u3002\u76f8\u6bd4\u539f\u59cb\u7684locate\uff0c\u5b83\u5177\u6709\u4e00\u4e2a\u5f88\u597d\u4f18\u70b9\uff1a \u6bcf\u6b21\u66f4\u65b0\u6570\u636e\u5e93\u65f6\u5e76\u4e0d\u9700\u8981\u91cd\u65b0\u8bfb\u53d6\u5168\u90e8\u76ee\u5f55\u7684\u5185\u5bb9\u3002mlocate \u5728\u6570\u636e\u5e93\u4e2d\u4fdd\u5b58\u4e86\u65f6\u95f4\u6233\u4fe1\u606f\uff0c\u65e0\u9700\u91cd\u65b0\u8bfb\u53d6\uff0c\u5c31\u80fd\u5224\u65ad\u76ee\u5f55\u5185\u5bb9\u662f\u5426\u6539\u53d8\u3002\u6240\u4ee5\u66f4\u65b0\u7684\u901f\u5ea6\u66f4\u5feb\uff0c\u5bf9\u786c\u76d8\u7684\u5360\u7528\u4e5f\u66f4\u5c11\u3002\u8fd9\u662f mlocate \u7279\u6709\u7684\u529f\u80fd\u3002\u5b89\u88c5\u597d\u540e\u5c31\u53ef\u4ee5\u7528locate\u548cupdatedb\u6765\u5feb\u901f\u67e5\u627e\u6587\u4ef6\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CentOS\u5b89\u88c5gcc g++\u7b49\u7f16\u8bd1\u73af\u5883\uff08\u4f7f\u7528yum\uff09 yum groupinstall &#8216;Development Tools&#8217; CentOS\u5b89\u88c5\u4e2d\u6587\u5305 yum groupinstall chinese-support CentOS\u00a0\u914d\u7f6e ssh \u5b89\u88c5SSH yum install ssh \u542f\u52a8SSH service sshd start \u8bbe\u7f6e\u5f00\u673a\u8fd0\u884c chkconfig sshd on \u5728hosts.deny\u6587\u4ef6\u5c3e\u6dfb\u52a0sshd:ALL\u00a0\u610f\u601d\u662f\u62d2\u7edd\u6240\u6709\u8bbf\u95ee\u8bf7\u6c42 \u5728hosts.allow\u6587\u4ef6\u5c3e\u6dfb\u52a0sshd:192.168.0. \u610f\u601d\u662f\u5141\u8bb8192.168.0.1 \u5230254\u7684\u4e3b\u673a \u91cd\u542fssh \/etc\/rc.d\/init.d\/sshd restart \u5b89\u88c5locate yum install mlocate mlocate\u662fGNU locate\u7684\u4e00\u4e2a\u53d8\u79cd\u3002\u76f8\u6bd4\u539f\u59cb\u7684locate\uff0c\u5b83\u5177\u6709\u4e00\u4e2a\u5f88\u597d\u4f18\u70b9\uff1a \u6bcf\u6b21\u66f4\u65b0\u6570\u636e\u5e93\u65f6\u5e76\u4e0d\u9700\u8981\u91cd\u65b0\u8bfb\u53d6\u5168\u90e8\u76ee\u5f55\u7684\u5185\u5bb9\u3002mlocate \u5728\u6570\u636e\u5e93\u4e2d\u4fdd\u5b58\u4e86\u65f6\u95f4\u6233\u4fe1\u606f\uff0c\u65e0\u9700\u91cd\u65b0\u8bfb\u53d6\uff0c\u5c31\u80fd\u5224\u65ad\u76ee\u5f55\u5185\u5bb9\u662f\u5426\u6539\u53d8\u3002\u6240\u4ee5\u66f4\u65b0\u7684\u901f\u5ea6\u66f4\u5feb\uff0c\u5bf9\u786c\u76d8\u7684\u5360\u7528\u4e5f\u66f4\u5c11\u3002\u8fd9\u662f mlocate \u7279\u6709\u7684\u529f\u80fd\u3002\u5b89\u88c5\u597d\u540e\u5c31\u53ef\u4ee5\u7528locate\u548cupdatedb\u6765\u5feb\u901f\u67e5\u627e\u6587\u4ef6\u4e86\u3002<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[23],"class_list":["post-2794","post","type-post","status-publish","format-standard","hentry","category-linux","tag-summary"],"_links":{"self":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/2794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2794"}],"version-history":[{"count":11,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/2794\/revisions"}],"predecessor-version":[{"id":5596,"href":"https:\/\/jpuyy.com\/index.php?rest_route=\/wp\/v2\/posts\/2794\/revisions\/5596"}],"wp:attachment":[{"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jpuyy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}