{"id":304,"date":"2011-12-31T11:35:38","date_gmt":"2011-12-31T03:35:38","guid":{"rendered":"http:\/\/www.kiccleaf.com\/?p=304"},"modified":"2011-12-31T11:40:41","modified_gmt":"2011-12-31T03:40:41","slug":"%e5%ae%89%e8%a3%85centos%e7%b3%bb%e7%bb%9f%e5%90%8e%e5%b9%b6%e5%81%9a%e7%ae%80%e5%8d%95%e7%9a%84%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"http:\/\/www.kiccleaf.com\/?p=304","title":{"rendered":"\u5b89\u88c5CentOS\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e"},"content":{"rendered":"<p>\u56fd\u5185\u8fd8\u662f\u8f83\u591a\u7684\u955c\u50cf\u670d\u52a1\u5668\u7684\uff0c163\u7684\u901f\u5ea6\u8fd8\u662f\u4e0d\u9519\u7684\uff0c\u6240\u4ee5\u672c\u4eba\u4e00\u822c\u90fd\u91c7\u7528163\u4e0b\u8f7d\u66f4\u65b0\u3002<\/p>\n<p>\u6700\u65b0\u7684CentOS6.2 \u5f00\u673a\u901f\u5ea6\u8d5e\u4e00\u4e2a\uff01\u5f3a\u5927\u7684\u3002<br \/>\nISO\u4e0b\u8f7d\u5730\u4e0b\uff1a<br \/>\n<a href=\"http:\/\/mirrors.163.com\/centos\/6.2\/isos\/\" target=\"_blank\">http:\/\/mirrors.163.com\/centos\/6.2\/isos\/<\/a><br \/>\n\u6709\u4e24\u4e2a\u76ee\u5f55\uff0c\u53ef\u81ea\u5df1\u9009\u62e932\u4f4d\u7684\uff0c\u6216\u662f64\u4f4d\u7684\uff0c\u672c\u4eba\u4e00\u822c\u4f7f\u752864\u4f4d\uff0c\u597d\u5904\u5730\u7403\u4eba\u90fd\u77e5\u9053\u3002<br \/>\ni386\/<br \/>\nx86_64\/<\/p>\n<p>OK\uff0c\u5982\u679c\u7cfb\u7edf\u521a\u5b89\u88c5\u597d\uff0c\u597d\u4e48\u9996\u5148\u7b2c\u4e00\u4ef6\u8981\u505a\u7684\u662f\u914d\u7f6e\u597d\u7f51\u5361<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvi \/etc\/resolv.conf\r\n#\u6dfb\u52a0\u672c\u5730\u7701\u4efd\u7684DNS\uff0c\u5982\u6211\u5728\u6d59\u6c5f\u676d\u5dde\u4f7f\u7528\u7684\u662f\r\nnameserver 202.101.172.35\r\nnameserver 202.101.172.47\r\n<\/pre>\n<p>\u7b2c\u4e8c\u6b65\u662f\u914d\u7f6e\u597d\u7f51\u5361IP\uff08\u5728CentOS6.1\uff0c6.2\u7248\u672c\u4e2d\u5982\u679c\u9009\u62e9\u6700\u5c0f\u5b89\u88c5\uff0c\u5b89\u88c5\u65f6\u6ca1\u6709\u914d\u7f6e\u7f51\u5361\u529f\u80fd\uff0c\u9700\u8981\u767b\u9646\u540e\u518d\u505a\u4fee\u6539\uff09<br \/>\nDEVICE \u7f51\u5361\u540d\u79f0<br \/>\nHWADDR \u7f51\u5361MAC\u5730\u5740<br \/>\nONBOOT \u914d\u7f6e\u542f\u52a8<br \/>\nBOOTPROTO \u914d\u7f6e\u9759\u6001\u5316<br \/>\nBROADCAST \u5e7f\u64ad\u5730\u5740<br \/>\nIPADDR= ip\u5730\u5740<br \/>\nNETMASK \u63a9\u7801<br \/>\nGATEWAY \u7f51\u5173<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvi \/etc\/sysconfig\/network-scripts\/ifcfg-eth0\r\n#\u4fee\u6539\u6216\u662f\u6dfb\u52a0\r\nDEVICE=&quot;eth0&quot;\r\nHWADDR=&quot;00:0C:29:14:36:62&quot;\r\nONBOOT=&quot;yes&quot;\r\nBOOTPROTO=static\r\nBROADCAST=192.168.1.255\r\nIPADDR=192.168.1.2\r\nNETMASK=255.255.0.0\r\nGATEWAY=192.168.1.1\r\n<\/pre>\n<p>\u7b2c\u4e09\u6b65\uff0c\u5173\u6389selinux\uff0c\u5426\u5219\u914d\u7f6e80\uff0c21\u8bbf\u95ee\u65f6\u9700\u8981\u64cd\u4f5c\u53d7\u6743\u914d\u7f6e<br \/>\n<span style=\"color: #0000ff;\">SELINUX=enforcing<\/span> \u4fee\u6539\u6210 <span style=\"color: #ff0000;\">SELINUX=disabled<\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvi \/etc\/selinux\/config\r\n\r\n# This file controls the state of SELinux on the system.\r\n# SELINUX= can take one of these three values:\r\n#     enforcing - SELinux security policy is enforced.\r\n#     permissive - SELinux prints warnings instead of enforcing.\r\n#     disabled - No SELinux policy is loaded.\r\nSELINUX=disabled\r\n# SELINUXTYPE= can take one of these two values:\r\n#     targeted - Targeted processes are protected,\r\n#     mls - Multi Level Security protection.\r\nSELINUXTYPE=targeted\r\n\r\n<\/pre>\n<p>\u7b2c\u56db\u6b65\u4fee\u6539\u4e00\u4e0b\u54b1\u4eec\u7684\u955c\u50cf\u4e0b\u8f7d\u5730\u5740<\/p>\n<p>\u9996\u5148\u5907\u4efd\/etc\/yum.repos.d\/CentOS-Base.repo<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n    mv \/etc\/yum.repos.d\/CentOS-Base.repo \/etc\/yum.repos.d\/CentOS-Base.repo.backup\r\n<\/pre>\n<p>wget \u4e0b\u8f7d\u5de5\u5177\u5982\u679c\u6ca1\u6709\u5b89\u88c5\u7b80\u5355\u7684\u53ef\u4ee5\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nyum install -y wget\r\n<\/pre>\n<p>\u4e0b\u8f7d\u540e\u53ef\u4ee5\u6539\u6210\u4e3aCentOS-Base.repo\u6587\u4ef6<br \/>\nCentOS4 \u4e0b\u8f7d\u5730\u5740<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwget http:\/\/mirrors.163.com\/.help\/CentOS4-Base-163.repo\r\n<\/pre>\n<p>CentOS5<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwget http:\/\/mirrors.163.com\/.help\/CentOS5-Base-163.repo\r\n<\/pre>\n<p>CentOS6<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwget http:\/\/mirrors.163.com\/.help\/CentOS6-Base-163.repo\r\n<\/pre>\n<p>\u8fd0\u884cyum makecache\u751f\u6210\u7f13\u5b58<\/p>\n<p>\u7b2c\u4e94\u6b65\uff0c\u53ef\u4ee5\u66f4\u65b0\u7cfb\u7edf\u4e86<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nyum update -y\r\n<\/pre>\n<p>\u6709\u5173\u9632\u706b\u5899\u7684\u914d\u7f6e\u53ef\u4ee5\u53c2\u8003\u6211\u4e4b\u524d\u5199\u7684\u6587\u7ae0<\/p>\n<blockquote><p><a title=\"Iptables \u6307\u5357\" href=\"http:\/\/www.kiccleaf.com\/?p=21\" target=\"_blank\">Iptables \u6307\u5357<\/a><br \/>\n<a title=\"\u9632\u706b\u5899\u65e5\u5e38\u64cd\u4f5c\u8bb0\u5f55\" href=\"http:\/\/www.kiccleaf.com\/?p=34\" target=\"_blank\">\u9632\u706b\u5899\u65e5\u5e38\u64cd\u4f5c\u8bb0\u5f55<\/a><br \/>\n<a title=\"iptables\u9632\u706b\u5899\u914d\u7f6e\u811a\u672c\" href=\"http:\/\/www.kiccleaf.com\/?p=26\" target=\"_blank\">iptables\u9632\u706b\u5899\u914d\u7f6e\u811a\u672c<\/a><br \/>\n<a title=\"IPTABLES\u914d\u7f6e\u8fc7\u8651\u8815\u866b\u75c5\u6bd2\" href=\"http:\/\/www.kiccleaf.com\/?p=24\" target=\"_blank\">IPTABLES\u914d\u7f6e\u8fc7\u8651\u8815\u866b\u75c5\u6bd2<\/a><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u56fd\u5185\u8fd8\u662f\u8f83\u591a\u7684\u955c\u50cf\u670d\u52a1\u5668\u7684\uff0c163\u7684\u901f\u5ea6\u8fd8\u662f\u4e0d\u9519\u7684&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"http:\/\/www.kiccleaf.com\/?p=304\">Continue reading<span class=\"screen-reader-text\">\u5b89\u88c5CentOS\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-linux-","entry"],"views":3512,"_links":{"self":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=304"}],"version-history":[{"count":0,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=\/wp\/v2\/posts\/304\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.kiccleaf.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}