{"id":633,"date":"2024-06-05T20:39:29","date_gmt":"2024-06-05T12:39:29","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/4288.html"},"modified":"2024-06-05T20:39:29","modified_gmt":"2024-06-05T12:39:29","slug":"linux%e5%ae%89%e8%a3%85%e4%bd%bf%e7%94%a8%e5%90%8e%e5%9f%ba%e6%9c%ac%e4%bc%98%e5%8c%96%e6%95%99%e7%a8%8b%ef%bc%88%e4%b8%8a%ef%bc%89","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/knowledge\/633.html","title":{"rendered":"linux\u5b89\u88c5\u4f7f\u7528\u540e\u57fa\u672c\u4f18\u5316\u6559\u7a0b\uff08\u4e0a\uff09"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>\u4e00\u822c\u6765\u8bf4\uff0c\u6211\u4eec\u5728<strong><a href=\"https:\/\/cn.raksmart.com\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"\u72ec\u7acb\u670d\u52a1\u5668\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\">\u72ec\u7acb\u670d\u52a1\u5668<\/a><\/strong>\u4e0a\u914d\u7f6e\u5b8c\u6210Linux\u64cd\u4f5c\u7cfb\u7edf\u540e\uff0c\u9700\u8981\u505a\u4e00\u4e9b\u57fa\u672c\u7684\u4f18\u5316\u64cd\u4f5c\uff0c\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u4e00\u4e0bLinux\u5b89\u88c5\u4e4b\u540e\uff0c\u5982\u4f55\u914d\u7f6eyum\u6e90\u53ca\u5b89\u88c5\u4e00\u4e9b\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305\u3002<\/p>\n<p class=\"has-text-color has-vivid-red-color\">1. \u914d\u7f6eyum\u6e90<\/p>\n<p>1.1. \u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528su-root\u6dfb\u52a0\u666e\u901a\u7528\u6237\u6765\u767b\u5f55\u5230root<\/p>\n<p class=\"has-text-color has-vivid-red-color\">2. \u8bbe\u7f6e\u66f4\u65b0\u6e90<\/p>\n<p>\u5728Linux\u4e0b\u8f7b\u677e\u5b89\u88c5\u8f6f\u4ef6\u7684\u4f18\u79c0\u5de5\u5177\u79f0\u4e3ayum\u5de5\u5177\uff0cLinux\u7684\u4e8c\u8fdb\u5236\u5305\u901a\u5e38\u662fRPM\u5305\uff0c\u4e0e\u4e4b\u7c7b\u4f3cWindows\u4e0b\u7684exe\u7a0b\u5e8f\u3002\u53ef\u4ee5\u901a\u8fc7yum\u5de5\u5177\u5b89\u88c5\u8be5\u8f6f\u4ef6\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cRPM\u5305\u7684\u8f6f\u4ef6\u914d\u7f6e\u662f\u4ece\u56fd\u5916centos\u7684\u5b98\u65b9\u6765\u6e90\u4e0b\u8f7d\u3002yum\u7684\u5b89\u88c5\u901f\u5ea6\u4f1a\u5f88\u6162\uff0c\u6240\u4ee5\u6211\u4eec\u9700\u8981\u5c06\u9ed8\u8ba4RPM\u5305\u7684\u914d\u7f6e\u4ece\u5b98\u65b9\u6e90\u66f4\u6539\u4e3a\u56fd\u5bb6\u5728\u91cc\u9762\u3002<\/p>\n<p class=\"has-text-color has-vivid-red-color\">Centos 5.8 64\u4f4dyum\u6e90\u4ee3\u7801<\/p>\n<p>http:\/\/mirrors.sohu.com\/help\/CentOS-Base-sohu.repo<\/p>\n<p class=\"has-text-color has-vivid-red-color\">Centos 6.4 64\u4f4dyum\u6e90\u4ee3\u7801<\/p>\n<p>http:\/\/mirrors.163.com\/.help\/CentOS6-Base-163.repo<\/p>\n<p>CD \/etc\/yum.repos.d\/ \/\/ \u8f93\u5165yum\u6e90<\/p>\n<p> \/bin\/mv centos-Base.repo centos-base.repo.Ori \/\/ backup yum\u6e90\u7801<\/p>\n<p>HTTP: \/\/ http:\/\/mirrors.sohu.com\/help\/CentOS-Base-sohu.repo \/\/\u4e0b\u8f7dsoho\u6e90<\/p>\n<p>\/ bin\/mv CentOS \u2013 Base \u2013 sohurepo CentOS-Base.repo<\/p>\n<p>\u6ce8\u610f:\u6211\u4eec\u73b0\u5728\u4f7f\u7528\u7684\u662fyum source\u63d0\u4f9b\u7684\u4e92\u8054\u7f51\u95e8\u6237\u7f51\u7ad9\uff0c\u4ee5\u540e\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528iso\u955c\u50cf\u6216CD\u4f5c\u4e3a\u4e00\u4e2ayum\u6e90\uff0c\u8fd8\u53ef\u4ee5\u914d\u7f6e\u95e8\u6237\u63d0\u4f9b\u7684\u8fd9\u6837\u4e00\u4e2ayum\u6e90\u914d\u7f6eyum\u6e90\u5e76\u751f\u6210RPM\u5305.<\/p>\n<p class=\"has-text-color has-vivid-red-color\">3.\u6211\u4eec\u4f7f\u7528yum upgrade\u3002<\/p>\n<p>\u8fd9\u76f8\u5f53\u4e8e\u5728Windows\u4e0b\u6253\u8865\u4e01\u3002\u8fd9\u4e2a\u51fd\u6570\u4f7f\u7528yum source\uff0c\u8fd9\u6837\u4f1a\u66f4\u5feb\u3002<\/p>\n<p class=\"has-text-color has-vivid-red-color\">4. \u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u5305<\/p>\n<p>\u5b89\u88c5LRZSZ<\/p>\n<p>4.1. \u5173\u95edselinux<\/p>\n<p>\u7531\u4e8e\u5728\u5b89\u88c5\u670d\u52a1\u548c\u8f6f\u4ef6\u65f6\u7ecf\u5e38\u4e0eselinux\u53d1\u751f\u51b2\u7a81\uff0cselinux\u5728\u56fd\u5185\u751f\u4ea7\u73af\u5883\u4e2d\u603b\u662f\u5904\u4e8e\u5173\u95ed\u72b6\u6001\u3002<\/p>\n<p>Vi \/etc\/selinux\/config \/\/\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>4.2. \u8bbe\u7f6e\u8fd0\u884c\u7ea7\u522b3<\/p>\n<p>Runlevel\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u8fd0\u884c\u7ea7\u522b<\/p>\n<p>Vi \/etc\/inittab \/\/\u8fd0\u884c\u7ea7\u914d\u7f6e\u6587\u4ef6<\/p>\n<p>4.3.\u7b80\u5316\u542f\u52a8\u670d\u52a1<\/p>\n<p>a. \u53ef\u4ee5\u4f7f\u7528setup-system\u670d\u52a1\u6765\u8c03\u6574\u5b83\uff0c\u56e0\u6b64\u8c03\u6574\u5b83\u662f\u4f4e\u6548\u7684<\/p>\n<p>b. \u6216ntsysv<\/p>\n<p>c.\u4f7f\u7528\u811a\u672c\u5173\u95ed<\/p>\n<p># LANG = en<\/p>\n<p>http:\/\/showmecode.cn\/links\/book<\/p>\n<p>Linux\u7684\u6ce8\u610f<\/p>\n<p>#\u663e\u793a\u6240\u6709\u670d\u52a1\u7684\u6240\u6709\u8fd0\u884c\u7ea7\u522b\u7684\u542f\u52a8\u72b6\u6001<\/p>\n<p>chkconfig \u2013list<\/p>\n<p>\u5728\u8fd0\u884c\u7ea7\u522b3\u505c\u6b62\u542f\u52a8\u65f6\u542f\u52a8\u7684\u6240\u6709\u670d\u52a1<\/p>\n<p>for \u2018chkconfig -list|grep3:on |awk \u2018{print $1} \u201c;do chkconfig \u2013 level 3<\/p>\n<p>$oldboyoff;done<\/p>\n<p>\u5728\u5f00\u653e\u516c\u5171\u670d\u52a1\uff0ccrond\uff0cnetwork\uff0crsyslog, SSHD<\/p>\n<p>for oldboy in crond netwrok rsyslogsshd;do chkconfig\u2014\u2014level 3 $oldboy on;done<\/p>\n<p>#\u663e\u793a\u6240\u67093\u4e2a\u8fd0\u884c\u7ea7\u522b\u4e0a\u7684\u6240\u6709\u670d\u52a1(\u53d6\u51b3\u4e8e\u51b3\u5b9a\u542f\u52a8\u54ea\u4e2a\u670d\u52a1\u7684\u9700\u6c42)<\/p>\n<p>chkconfig\u2013list| grep3: on<\/p>\n<p>\u6211\u4eec\u53ea\u662f\u5b89\u88c5\u4e86\u64cd\u4f5c\u7cfb\u7edf\uff0c\u53ea\u9700\u8981\u6253\u5f00\u51e0\u4e2a\u670d\u52a1\uff0c\u5176\u4f59\u7684\u4ee5\u540e\u6253\u5f00\uff0c\u8fd9\u6837\u5b89\u5168\uff0c\u9075\u5faa\u6700\u5c0f\u5316\u7684\u539f\u5219\uff0c\u6ca1\u7528\u7684\u4e0d\u542f\u52a8\u3002\u66f4\u591a\u76f8\u5173\u5185\u5bb9\u53ef\u4ee5\u53c2\u8003\u4e86\u89e3 <a href=\"https:\/\/cn.raksmart.com\/blog\/host\/88.html\">\u5982\u4f55\u4f7f\u7528XSHELL\u5de5\u5177\u8fde\u63a5\u5230Linux VPS\u4e3b\u673a\u4e0a<\/a>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u822c\u6765\u8bf4\uff0c\u6211\u4eec\u5728\u72ec\u7acb\u670d\u52a1\u5668\u4e0a\u914d\u7f6e\u5b8c\u6210Linux\u64cd\u4f5c\u7cfb\u7edf\u540e\uff0c\u9700\u8981\u505a\u4e00\u4e9b\u57fa\u672c\u7684\u4f18\u5316\u64cd\u4f5c\uff0c\u672c\u6587\u4e3b\u8981\u4ecb\u7ecd\u4e00\u4e0b\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[738,905,35],"class_list":["post-633","post","type-post","status-publish","format-standard","hentry","category-knowledge","tag-linux","tag-905","tag-35"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=633"}],"version-history":[{"count":0,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/633\/revisions"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}