{"id":338,"date":"2010-06-14T11:38:53","date_gmt":"2010-06-14T02:38:53","guid":{"rendered":"https:\/\/blog.eldhrimnir.com?p=338"},"modified":"2010-06-14T14:41:13","modified_gmt":"2010-06-14T05:41:13","slug":"serversmanvps%e3%81%ae%e5%88%9d%e6%9c%9f%e8%a8%ad%e5%ae%9a%e3%81%a8%e3%81%8b","status":"publish","type":"post","link":"https:\/\/blog.eldhrimnir.com\/?p=338","title":{"rendered":"ServersMan@VPS\u306e\u521d\u671f\u8a2d\u5b9a"},"content":{"rendered":"<p><strong>1.\u65b0\u3057\u3044\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210<\/strong><br \/>\n<strong><span style=\"color: #000080;\">useradd -G wheel<\/span> <\/strong><em>&lt;\u65b0\u3057\u3044\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u540d&gt;<\/em><\/p>\n<p><span style=\"color: #000080;\"><strong>passwd<\/strong><\/span> <em>&lt;\u65b0\u3057\u3044\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u540d&gt;<\/em><br \/>\nChanging password for user <em>&lt;\u65b0\u3057\u3044\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u540d&gt;<\/em><br \/>\nNew UNIX password: <em>&lt;\u30d1\u30b9\u30ef\u30fc\u30c9&gt;<br \/>\n<\/em>Retype new UNIX password: <em>&lt;\u30d1\u30b9\u30ef\u30fc\u30c9&gt;<br \/>\n<\/em>passwd: all authentication tokens updated successfully.\u3000<strong><span style=\"color: #ff0000;\">\u2190 \u30b3\u30ec\u304c\u3067\u308c\u3070\u30d1\u30b9\u30ef\u30fc\u30c9\u5909\u66f4\u5b8c\u4e86<\/span><\/strong><\/p>\n<p><strong>2.vi\u306eUnicode\u5bfe\u5fdc<\/strong><br \/>\n\u30d7\u30e9\u30b9\u3067\u3001\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u306e\u30db\u30fc\u30e0\u306b\u300c.vimrc\u300d\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u3063\u3066Unicode\u5bfe\u5fdc\u3055\u305b\u307e\u3059\u3002<\/p>\n<p>$<span style=\"color: #000080;\"><strong>vi ~\/.vimrc<\/strong><\/span><\/p>\n<blockquote><p>set fileencoding=japan<br \/>\nset fileencodings=iso-2022-jp,utf-8,euc-jp,ucs-2le,ucs-2,cp932<\/p><\/blockquote>\n<p><strong>3.root\u30ed\u30b0\u30a4\u30f3\u4e0d\u53ef\u306b\u8a2d\u5b9a<\/strong><\/p>\n<p><strong><span style=\"color: #000080;\">$<\/span><span style=\"color: #888888;\"><span style=\"color: #000080;\">vi \/etc\/ssh\/sshd_config<\/span><\/span><\/strong><\/p>\n<blockquote><p>===\u3000\u7701\u7565\u3000===<br \/>\nPermitRootLogin no\u3000\u2190\u300cno\u300d\u306b\u8a2d\u5b9a\u5909\u66f4\uff08\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\uff09<\/p><\/blockquote>\n<p><span style=\"color: #ff0000;\"><strong>\u30fb\u5ff5\u306e\u305f\u3081\u306b\u300c1.\u300d\u3067\u4f5c\u6210\u3057\u305f\u30e6\u30fc\u30b6\u30fc\u3067\u30ed\u30b0\u30a4\u30f3\u3057\u3066root\u306b\u306a\u308c\u308b\u3053\u3068\u3092\u78ba\u8a8d<\/strong><\/span><\/p>\n<p>\u66f8\u304d\u63db\u3048\u3068\u30ed\u30b0\u30a4\u30f3\u78ba\u8a8d\u304c\u7d42\u308f\u3063\u305f\u3089sshd\u3092\u518d\u8d77\u52d5<br \/>\n<span style=\"color: #000080;\"><strong>$\/etc\/init.d\/sshd restart<\/strong><\/span><\/p>\n<p><strong><span style=\"color: #000080;\"><!--more--><br \/>\n<\/span>4.\u5916\u90e8\u304b\u3089\u306e\u30a2\u30bf\u30c3\u30af\u5bfe\u7b56\uff08DenyHosts\uff09<\/strong><\/p>\n<p>\u30ea\u30dd\u30b8\u30c8\u30ea\u306e\u8ffd\u52a0\u3068\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<span style=\"color: #000080;\"><strong>yum install yum-priorities<br \/>\nrpm import <\/strong><\/span><a href=\"http:\/\/dag.wieers.com\/rpm\/packages\/RPM-GPG-KEY.dag.txt\"><span style=\"color: #000080;\"><strong>http:\/\/dag.wieers.com\/rpm\/packages\/RPM-GPG-KEY.dag.txt<\/strong><\/span><\/a><br \/>\n<span style=\"color: #000080;\"><strong>rpm -ivh <\/strong><\/span><a href=\"http:\/\/apt.sw.be\/redhat\/el5\/en\/i386\/RPMS.dag\/rpmforge-release-0.5.1-1.el5.rf.i386.rpm\"><span style=\"color: #000080;\"><strong>http:\/\/apt.sw.be\/redhat\/el5\/en\/i386\/RPMS.dag\/rpmforge-release-0.5.1-1.el5.rf.i386.rpm<\/strong><\/span><\/a><\/p>\n<p><span style=\"color: #000080;\"><strong>yum enablerepo=rpmforge search denyhosts<br \/>\nyum install denyhosts<\/strong><\/span><\/p>\n<p>DenyHosts\u306e\u8d77\u52d5<br \/>\n<span style=\"color: #000080;\"><strong>$service denyhosts start<\/strong><\/span><\/p>\n<p>\u8a2d\u5b9a\u53ef\u80fd\u60c5\u5831\u306f\u4e0b\u8a18\u3001\u53d6\u308a\u6562\u3048\u305a\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3082\u554f\u984c\u306a\u3044\u304b\u3082\u2026\u3002<\/p>\n<p>DenyHosts\u3092\u81ea\u52d5\u3067\u8d77\u52d5<br \/>\n<span style=\"color: #000080;\"><strong>$chkconfig denyhosts on<\/strong><\/span><\/p>\n<p><span style=\"text-decoration: underline;\"><em>\u30ed\u30b0\u30d5\u30a1\u30a4\u30eb\u306f\u300c\/var\/log\/denyhosts\u300d\u306b\u51fa\u529b\u3055\u308c\u308b\u3002<\/em><\/span><\/p>\n<p><em>\u00a0<\/em><br \/>\n<strong><span style=\"color: #ff6600;\">\u8a2d\u5b9a\u53ef\u80fd\u60c5\u5831\uff08\/etc\/denyhosts\/denyhosts.cfg\uff09<\/span><\/strong><\/p>\n<blockquote>\n<table border=\"1\" cellspacing=\"2\" cellpadding=\"2\">\n<tbody>\n<tr>\n<td><small>SECURE_LOG = \/ver\/log\/secure\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09<br \/>\n\u76e3\u8996\u3059\u308bLog\u30d5\u30a1\u30a4\u30eb\u540d\u79f0HOSTS_DENY = \/etc\/hosts.deny\uff08\u30c7\u30d5\u30a9\u30eb\u30c8\uff09<br \/>\n\u62d2\u5426\u30a2\u30c9\u30ec\u30b9\u8a18\u8f09\u5834\u6240PURGE_DENY<br \/>\n\u81ea\u52d5\u7684\u306b\u62d2\u5426\u5bfe\u8c61\u304b\u3089\u89e3\u9664\u3059\u308b\u307e\u3067\u306e\u6642\u9593<br \/>\n\u203b\uff1a24h (m,h,d,w,y\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002)PURGE_THRESHOLD<br \/>\n\u62d2\u5426\u89e3\u9664\u56de\u6570\uff08\u3053\u306e\u56de\u6570\u3092\u8d85\u308b\u3068\u624b\u52d5\u89e3\u9664\u3057\u306a\u3044\u3068\u89e3\u9664\u3055\u308c\u307e\u305b\u3093\u3002\uff09<br \/>\n\u203b\uff1a\u306a\u306b\u3082\u8a2d\u5b9a\u3057\u306a\u3044\u3068\u3001\u81ea\u52d5\u7684\u306b\u89e3\u9664\u3055\u308c\u306a\u304f\u306a\u308b\u3002\uff080\u3067\u89e3\u9664\u306e\u56de\u6570\u5236\u9650\u7121\u3057\uff09BLOCK_SERVICE<br \/>\n\u30d6\u30ed\u30c3\u30af\u3092\u3059\u308b\u30b5\u30fc\u30d3\u30b9\u540d\u79f0<br \/>\n\u203b\uff1ahosts.allow\/deny\u3067\u6307\u5b9a\u51fa\u6765\u308b\u30b5\u30fc\u30d3\u30b9\u3092\u8a18\u8ff0\u3057\u307e\u3059\u3002\uff08\u5168\u90e8\u306a\u3089ALL\uff09DENY_THRESHOLD_INVALID<br \/>\n\u30b5\u30fc\u30d0\u306b\u767b\u9332\u3055\u308c\u3066\u3044\u306a\u3044\u30e6\u30fc\u30b6\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u5931\u6557\u6642\u306e\u95be\u5024<\/p>\n<p>DENY_THRESHOLD_VALID<br \/>\n\u30b5\u30fc\u30d0\u306b\u767b\u9332\u3055\u308c\u3066\u308b\u30e6\u30fc\u30b6\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u5931\u6557\u6642\u306e\u95be\u5024<\/p>\n<p>DENY_THRESHOLD_ROOT<br \/>\nroot\u3067\u306e\u30ed\u30b0\u30a4\u30f3\u5931\u6557\u6642\u306e\u95be\u5024\u3002<\/p>\n<p>SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS = [Yes\/No]<br \/>\n\u602a\u3057\u3044\u30ed\u30b0\u30a4\u30f3\u3092\u76e3\u8996\u3059\u308b\u304b\u3002<\/p>\n<p>&#8212;&#8212;&#8212;-\u30e1\u30fc\u30eb\u95a2\u9023\u8a2d\u5b9a<br \/>\nADMIN_EMAIL<br \/>\n\u30a4\u30d9\u30f3\u30c8\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u5148\uff08\u300c,\u300d\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u6307\u5b9a\u53ef\u80fd\uff09<\/p>\n<p>SMTP_HOST<br \/>\nSMTP\u30b5\u30fc\u30d0\u306e\u6307\u5b9a<\/p>\n<p>SMTP_PORT<br \/>\nSMTP\u30b5\u30fc\u30d0\u306e\u30dd\u30fc\u30c8\u756a\u53f7<\/p>\n<p>SMTP_FROM<br \/>\n\u30e1\u30fc\u30eb\u306e\u9001\u4fe1\u5143<\/p>\n<p>SMTP_SUBJECT<br \/>\n\u30e1\u30fc\u30eb\u306e\u4ef6\u540d<br \/>\n&#8212;&#8212;&#8212;-\u540c\u671f\u95a2\u9023\u8a2d\u5b9a<br \/>\nSYNC_SERVER<br \/>\nDenyhosts\u30e6\u30fc\u30b6\u304b\u3089\u9001\u4fe1\u3055\u308c\u305f\u308a\u3057\u3066\u96c6\u3081\u3089\u308c\u305f\u3001\u4e0d\u6b63\u30a2\u30af\u30bb\u30b9\u5143\u306eIP\u30a2\u30c9\u30ec\u30b9\u30ea\u30b9\u30c8\u3092\u540c\u671f\u3055\u305b\u308b\u30b5\u30fc\u30d0<\/p>\n<p>SYNC_INTERVAL<br \/>\n\u540c\u671f\u9593\u9694<\/p>\n<p>SYNC_UPLOAD = [Yes\/No]<br \/>\n\u540c\u671f\u3059\u308b\u6642\u306b\u3001\u81ea\u5206\u306e\u30c7\u30fc\u30bf\u3092UP\u3059\u308b\u3002<\/p>\n<p>SYNC_DOWNLOAD = [Yes\/No]<br \/>\n\u540c\u671f\u3059\u308b\u6642\u306b\u3001\u81ea\u5206\u306e\u30c7\u30fc\u30bf\u3092DownLoad\u3059\u308b\u3002<\/p>\n<p>SYNC_DOWNLOAD_THRESHOLD<br \/>\n\u3053\u3053\u3067\u6307\u5b9a\u3057\u305f\u6570\u4ee5\u4e0a\u306e\u30b5\u30fc\u30d0\u3067\u62d2\u5426\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3092Download\u30ea\u30b9\u30c8\u306e\u4e2d\u304b\u3089\u8a2d\u5b9a\u3059\u308b\u3002<\/p>\n<p><\/small><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/blockquote>\n<p>\u53c2\u8003\u30b5\u30a4\u30c8<\/p>\n<p><a href=\"http:\/\/temog.info\/archives\/vps\/serversmanvps-%e9%96%8b%e9%80%9a%e5%be%8c%e3%81%ab%e3%82%84%e3%81%a3%e3%81%a6%e3%81%8a%e3%81%8f%e3%81%93%e3%81%a8.html\">ServersMan@VPS \u958b\u901a\u5f8c\u306b\u3084\u3063\u3066\u304a\u304f\u3053\u3068 &#8211; \u3066\u3082\u3050<br \/>\n<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.\u65b0\u3057\u3044\u30e6\u30fc\u30b6\u30fc\u306e\u4f5c\u6210 useradd -G wheel &lt;\u65b0\u3057\u3044\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u540d&gt; passwd &lt;\u65b0\u3057\u3044\u30ed\u30b0\u30a4\u30f3\u30e6\u30fc\u30b6\u30fc\u540d&gt; Changing password for user &lt; [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=\/wp\/v2\/posts\/338"}],"collection":[{"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=338"}],"version-history":[{"count":0,"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=\/wp\/v2\/posts\/338\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eldhrimnir.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}