{"id":1688,"date":"2013-08-30T15:27:39","date_gmt":"2013-08-30T07:27:39","guid":{"rendered":"http:\/\/www.huzs.top\/?page_id=1688"},"modified":"2014-10-05T13:50:33","modified_gmt":"2014-10-05T05:50:33","slug":"%e9%85%8d%e7%bd%ae%e4%b8%80%e5%8f%b0centos%e6%9c%8d%e5%8a%a1%e5%99%a8%ef%bc%88lnmpftppptpfirewall%e5%ae%89%e5%85%a8%e8%ae%be%e7%bd%ae%ef%bc%89","status":"publish","type":"page","link":"https:\/\/www.huzs.top\/?page_id=1688","title":{"rendered":"\u914d\u7f6e\u4e00\u53f0CentOS\u670d\u52a1\u5668\uff08LNMP+FTP+PPTP+Firewall+\u5b89\u5168\u8bbe\u7f6e\uff09"},"content":{"rendered":"<p>\u73b0\u5728\u6709\u4e00\u53f0centos-6.4-x86-min\u5df2\u7ecf\u5b89\u88c5\u597d\u4e86\u3002\u6211\u4eec\u9700\u8981\u5f00\u59cb\u5bf9\u5979\u8fdb\u884c\u76f8\u5173\u7684\u914d\u7f6e\u3002<\/p>\n<p><strong>\u4e00\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e<\/strong><\/p>\n<p>1\u3001\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u7cfb\u7edf\u7684\u5bc6\u7801\uff0c\u53ef\u4ee5\u53c2\u8003<a href=\"http:\/\/www.huzs.top\/?p=1657\" target=\"_blank\">\u300aLinux\u7cfb\u7edf\u7684root\u5bc6\u7801\u91cd\u7f6e\uff08\u5fd8\u8bb0\u5bc6\u7801\uff09\u300b<\/a>\u8fdb\u884c\u4fee\u6539\u3002<br \/>\u8bbe\u7f6e\u8bed\u8a00<\/p>\n<pre>mv \/etc\/sysconfig\/i18n \/etc\/sysconfig\/i18n.default<br>vim \/etc\/sysconfig\/i18n<\/pre>\n<p><\/p>\n<pre>LANGUAGE=\"zh_CN.GB18030:zh_CN.GB2312:zh_CN\"<br>SUPPORTED=\"zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en\"<br>SYSFONT=\"latarcyrheb-sun16\"<br>export LC_ALL=\"zh_CN.GB18030\"<\/pre>\n<p>\u6216\u8005<br \/><code>LANG=\"zh_CN.UTF-8\"<\/code><br \/>\u8bbe\u7f6e\u65f6\u533a<\/p>\n<pre>rm -rf \/etc\/localtime<br>ln -s \/usr\/share\/zoneinfo\/Asia\/Shanghai \/etc\/localtime<\/pre>\n<p>2\u3001\u6e05\u7a7a\u9632\u706b\u5899(iptables)\u91cc\u7684\u8bbe\u7f6e\u3002<\/p>\n<pre>iptables -L -n<br>iptables -F<br>iptables -X<br>service iptables save<\/pre>\n<p>3\u3001\u8bbe\u7f6eSSH\u7684\u7aef\u53e3\uff08\u9ed8\u8ba4\u662f\uff1a22\uff09\u4e3a\u5176\u4ed6\u7aef\u53e3<\/p>\n<pre>vi \/etc\/ssh\/sshd_config<\/pre>\n<p>\u4fee\u6539\u201c#port 22\u201d\u4e3a\u201cport 8899\u201d\uff0c\u8bbe\u7f6e\u4e00\u4e2a\u4f60\u559c\u6b22\u6216\u8005\u719f\u77e5\u7684\u7aef\u53e3\u3002\u91cd\u542f\u670d\u52a1\uff0c\u4f7f\u5176\u7acb\u5373\u751f\u6548<\/p>\n<pre>service sshd restart<\/pre>\n<p>4\u3001\u66f4\u65b0\u7cfb\u7edf<\/p>\n<pre>yum update -y<\/pre>\n<p>5\u3001\u7981\u7528SELinux\uff0cSELinux\u662f\u4e00\u4e2a\u5b89\u5168\u7684\u6269\u5c55\uff0cCentOS\u7684\uff0c\u5e94\u63d0\u4f9b\u6269\u5c55\u7684\u5b89\u5168\u6027\u3002\u5728\u6211\u770b\u6765\uff0c\u4f60\u5e76\u4e0d\u9700\u8981\u5b83\u6765\u914d\u7f6e\u4e00\u4e2a\u5b89\u5168\u7684\u7cfb\u7edf\uff0c\u5b83\u901a\u5e38\u4f1a\u5bfc\u81f4\u66f4\u591a\u7684\u95ee\u9898\u6bd4\u7684\u4f18\u52bf\uff08\u8ba4\u4e3a\u4f60\u505a\u4e86\u4e00\u4e2a\u661f\u671f\u540e\uff0c\u6545\u969c\u6392\u9664\uff0c\u56e0\u4e3a\u6709\u4e9b\u670d\u52a1\u4e0d\u80fd\u6b63\u5e38\u5de5\u4f5c\u7684\uff0c\u7136\u540e\u4f60\u53d1\u73b0\u4e00\u5207\u6b63\u5e38\uff0c\u53ea\u6709SELinux\u662f\u9020\u6210\u95ee\u9898\u7684\u539f\u56e0\uff09\u3002\u56e0\u6b64\uff0c\u6211\u5c06\u5176\u7981\u7528\uff08\u8fd9\u662f\u5fc5\u987b\u7684\uff0c\u5982\u679c\u4f60\u60f3\uff0c\u5b89\u88c5ISPConfig\u4ee5\u540e\uff09\u3002<\/p>\n<pre>cat \/etc\/selinux\/config<br>setenforce 0<br>sed -i 's\/SELINUX=enforcing\/SELINUX=disabled\/g' \/etc\/selinux\/config<\/pre>\n<p>\u4e4b\u540e\uff0c\u6211\u4eec\u5fc5\u987b\u91cd\u65b0\u542f\u52a8\u7cfb\u7edf\uff1a<\/p>\n<pre>reboot<\/pre>\n<p>6\u3001\u5b89\u88c5\u5e38\u7528\u5de5\u5177<\/p>\n<pre>yum install -y vim rsync zip unzip ntsysv wget setuptool system-config-network-tui system-config-firewall-tui<\/pre>\n<p>\u4f7f\u7528ntsysv\u5de5\u5177\u5173\u95ed\u542f\u52a8\u9879\u670d\u52a1\uff0c\u4fdd\u7559\uff1acrond\u3001iptables\u3001network\u3001sshd\u3001rsyslog<\/p>\n<p>7\u3001\u7528top\u547d\u4ee4\u67e5\u770b\u865a\u62df\u5185\u5b58\uff08\u4ea4\u6362\u5206\u533a\uff09\u662f\u5426\u5b58\u5728\u4e0e\u5408\u7406\u3002\u53c2\u8003\u5982\u4e0b\u6587\u7ae0\u8c03\u6574\uff1a<br \/><a href=\"http:\/\/www.huzs.top\/?p=1683\" target=\"_blank\">\u300aCentOS \u624b\u52a8\u589e\u52a0\u3001\u5220\u9664swap\u533a\u300b<\/a><\/p>\n<p>8\u3001\u8bbe\u7f6e\u4e2d\u56fd\u65f6\u533a\u8bf7\u53c2\u9605\uff1a<a title=\"\u901a\u8fc7SSH\u4fee\u6539\u8c03\u6574Linux VPS \u65f6\u95f4\u548c\u65f6\u533a\" href=\"http:\/\/www.huzs.top\/?p=618\" target=\"_blank\">\u300a\u901a\u8fc7SSH\u4fee\u6539\u8c03\u6574Linux VPS \u65f6\u95f4\u548c\u65f6\u533a\u300b<\/a><\/p>\n<p>9\u3001\u66f4\u591a\u4f18\u5316\u8bf7\u53c2\u9605\uff1a<a title=\"\u300aLinux\u670d\u52a1\u5668\u5b89\u88c5\u597d\u540e\u5982\u4f55\u8fdb\u884c\u4f18\u5316\u300b\" href=\"http:\/\/www.huzs.top\/?p=1420\" target=\"_blank\">\u300aLinux\u670d\u52a1\u5668\u5b89\u88c5\u597d\u540e\u5982\u4f55\u8fdb\u884c\u4f18\u5316\u300b<\/a><\/p>\n<p><strong>\u4e8c\u3001\u5404\u9879\u7f51\u7edc\u670d\u52a1\u914d\u7f6e<\/strong><br \/>1\u3001<a title=\"yum\u642d\u5efalnmp\u73af\u5883\uff08CentOS)V2013-12-30\" href=\"http:\/\/www.huzs.top\/?p=1110\" target=\"_blank\">\u300ayum\u642d\u5efalnmp\u73af\u5883\uff08CentOS)V2013-12-30\u300b<\/a><\/p>\n<p>2\u3001<a title=\"CentOS\u4e0a\u642d\u5efaFTP\uff08vsftpd\uff09\u670d\u52a1\uff0c\u4f7f\u7528MYSQL\u9a8c\u8bc1\u7528\u6237\u3002\" href=\"http:\/\/www.huzs.top\/?p=1691\" target=\"_blank\">\u300aCentOS\u4e0a\u642d\u5efaFTP\uff08vsftpd\uff09\u670d\u52a1\uff0c\u4f7f\u7528MYSQL\u9a8c\u8bc1\u7528\u6237\u3002\u300b<\/a><\/p>\n<p>3\u3001\u300a<a title=\"Linux CentOS VPS\u642d\u5efaPPTP VPN\u7684\u65b9\u6cd5\" href=\"http:\/\/www.huzs.top\/?p=629\" target=\"_blank\">Linux CentOS VPS\u642d\u5efaPPTP VPN\u7684\u65b9\u6cd5\u300b<\/a><\/p>\n<p>4\u3001<a title=\"VPS\u4e0aiptables\u9632\u706b\u5899\u7684\u57fa\u672c\u8bbe\u7f6e\" href=\"http:\/\/www.huzs.top\/?p=975\" target=\"_blank\">\u300aVPS\u4e0aiptables\u9632\u706b\u5899\u7684\u57fa\u672c\u8bbe\u7f6e\u300b<\/a><\/p>\n<p>5\u3001<a title=\"CentOS\u547d\u4ee4\u884c\u5b89\u88c5\u684c\u9762\u73af\u5883\u5e76\u5f00\u542fVNC\u8fdc\u7a0b\u684c\u9762\" href=\"http:\/\/www.huzs.top\/?p=1570\" target=\"_blank\">\u300aCentOS\u547d\u4ee4\u884c\u5b89\u88c5\u684c\u9762\u73af\u5883\u5e76\u5f00\u542fVNC\u8fdc\u7a0b\u684c\u9762\u300b<\/a><\/p>\n<p>6\u3001<a href=\"http:\/\/www.huzs.top\/?p=920\" target=\"_blank\">\u300arsync\u7684\u6587\u4ef6\u540c\u6b65\uff0c\u590d\u5236\uff0c\u955c\u50cf\uff0c\u589e\u91cf\u5907\u4efd v1.2\u300b<\/a><\/p>\n<p>7\u3001<a href=\"https:\/\/www.huzs.top\/?p=669\">\u7b80\u5355\u7684\u6027\u80fd\u6d4b\u8bd5<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73b0\u5728\u6709\u4e00\u53f0centos-6.4-x86-min\u5df2\u7ecf\u5b89\u88c5\u597d\u4e86\u3002\u6211\u4eec\u9700\u8981\u5f00\u59cb\u5bf9\u5979\u8fdb\u884c\u76f8\u5173\u7684\u914d\u7f6e\u3002 \u4e00\u3001\u7cfb\u7edf\u57fa\u7840\u914d\u7f6e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1688","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/pages\/1688","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1688"}],"version-history":[{"count":6,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/pages\/1688\/revisions"}],"predecessor-version":[{"id":2272,"href":"https:\/\/www.huzs.top\/index.php?rest_route=\/wp\/v2\/pages\/1688\/revisions\/2272"}],"wp:attachment":[{"href":"https:\/\/www.huzs.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}