{"id":635,"date":"2015-12-07T15:44:10","date_gmt":"2015-12-07T07:44:10","guid":{"rendered":"http:\/\/www.yusian.com\/blog\/?p=635"},"modified":"2016-07-16T14:32:16","modified_gmt":"2016-07-16T06:32:16","slug":"linux%e4%b8%8b%e6%9c%80%e7%ae%80%e5%8d%95%e7%9a%84%e5%8a%a8%e6%80%81%e5%9f%9f%e5%90%8d%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/www.yusian.com\/blog\/centos\/2015\/12\/07\/154410635.html","title":{"rendered":"Linux\u4e0b\u6700\u7b80\u5355\u7684\u52a8\u6001\u57df\u540d\u89e3\u6790"},"content":{"rendered":"<p><strong>\u4e00\u3001\u51c6\u5907\u6750\u6599<\/strong><\/p>\n<p>1\u3001\u5728\u56fd\u5185\u52a8\u6001\u57df\u540d\u89e3\u6790\u4e00\u822c\u4f7f\u7528\u82b1\u751f\u58f3\uff0c\u5373oray.com\u8fd9\u4e2a\u5bb6\u4f19\uff0c\u53ef\u4ee5\u514d\u8d39\u7533\u8bf7\u4e00\u4e2a\u4e8c\u7ea7\u57df\u540d\uff08oray\u5e10\u53f7\u4e00\u4e2a\uff09\uff1b<br \/>\n2\u3001\u6ce8\u518c\u4e86oray\u5e10\u53f7\u4f60\u5c31\u80fd\u7533\u8bf7\u5230\u4e00\u4e2a\u514d\u8d39\u7684\u652f\u6301\u52a8\u6001\u57df\u540d\u89e3\u6790\u7684\u4e8c\u7ea7\u57df\u540d\uff08\u652f\u6301\u52a8\u6001\u57df\u540d\u89e3\u6790\u7684\u57df\u540d\u4e00\u4e2a\uff09\uff1b<br \/>\n3\u3001\u5982\u679c\u4f60\u6709\u81ea\u5df1\u7684\u9876\u7ea7\u57df\u540d\uff0c\u89c9\u5f97\u4f7f\u7528\u522b\u4eba\u7684\u4e8c\u7ea7\u57df\u540d\u4e0d\u591f\u5c4c\uff0c\u53ef\u4ee5\u5440\uff0c\u505a\u522b\u540d\u5904\u7406\u7b80\u5355\u641e\u5b9a\uff08\u9876\u7ea7\u57df\u540d\u4e00\u4e2a\uff0c\u8fd9\u4e2a\u6ca1\u6709\u6ca1\u5173\u7cfb\uff09\uff1b<br \/>\n4\u3001Linux\u6216Unix\u6216\u7c7bUnix\u4e3b\u673a\u4e00\u53f0\uff08\u6211\u5728\u8fd9\u91cc\u9488\u5bf9\u5c0f\u7c73\u8def\u7531\u5668\u505a\u6d4b\u8bd5\uff0c\u524d\u63d0\u662f\u5c0f\u7c73\u8def\u7531\u5668\u5df2\u7ecfroot\u4e86\uff0c\u80fd\u591fssh\u767b\u5f55\u540e\u53f0\uff09\uff1b<\/p>\n<p><strong>\u4e8c\u3001\u57fa\u672c\u539f\u7406<\/strong><\/p>\n<p>1\u3001\u5047\u5982\u5bb6\u91cc\u4f7f\u7528\u7684ADSL\u62e8\u53f7\u4e0a\u7f51\uff0c\u8def\u7531\u5668\u4e0a\u4f1a\u83b7\u5f97\u4e00\u4e2a\u516c\u7f51ip\u5730\u5740\uff1b<br \/>\n2\u3001\u6211\u60f3\u901a\u8fc7\u67d0\u4e2a\u57df\u540d\u5bf9\u5e94\u8fd9\u4e2aip\u5730\u5740\uff0c\u4f46\u8fd9\u4e2aip\u5730\u5740\u968f\u7740\u6bcf\u6b21\u7684\u62e8\u53f7\u90fd\u4f1a\u53d1\u751f\u53d8\u5316\uff1b<br \/>\n3\u3001\u901a\u8fc7\u67d0\u79cd\u673a\u5236\uff0c\u5f53ip\u53d1\u751f\u53d8\u5316\u65f6\u544a\u8bc9DNS\u670d\u52a1\u5668\uff0c\u8ba9\u4ed6\u5373\u65f6\u66f4\u65b0\uff1b<br \/>\n4\u3001\u95ee\u9898\u6765\u4e86\uff0c\u8c01\u6765\u544a\u8bc9DNS\u670d\u52a1\u5668ip\u53d8\u4e86\uff1f\u8fd9\u662f\u6211\u4eec\u4eca\u5929\u7684\u91cd\u70b9\uff01<\/p>\n<p><strong>\u4e09\u3001\u89e3\u51b3\u65b9\u6848<\/strong><!--more--><\/p>\n<p>1\u3001\u5c0f\u7c73\u8def\u7531\u5668\u5728\u8def\u7531\u6a21\u5f0f\u4e0b\u652f\u6301DDNS\uff0c\u76f4\u63a5\u8f93\u5165\u82b1\u751f\u58f3\u7684\u7528\u6237\u540d\u53ca\u5bc6\u7801\uff0c\u5bf9\u5e94\u57df\u540d\uff0c\u8def\u7531\u5668\u4f1a\u81ea\u52a8\u4e0a\u62a5ip\u7ed9oray\u7684DNS\u670d\u52a1\u5668\u66f4\u65b0\uff1b<br \/>\n2\u3001\u5982\u679c\u5728\u6865\u63a5\u6a21\u5f0f\u4e0b\uff0c\u8def\u7531\u5668\u7684DDNS\u529f\u80fd\u65e0\u6cd5\u4f7f\u7528\uff0c\u81f3\u5c11\u754c\u9762\u4e0a\u65e0\u6cd5\u64cd\u4f5c\u5230\u4e86\uff0c\u5b9e\u9645\u4e0a\u5e94\u8be5\u662f\u80fd\u7528\u7684\uff0c\u56e0\u4e3a\u5c0f\u7c73\u8def\u7531\u5668\u672c\u8eab\u4e0d\u4e5f\u8981\u5347\u7ea7\u5417\uff1f<br \/>\n3\u3001oray\u662f\u6709PC\u5ba2\u6237\u7aef\u7684\uff0c\u4f46\u603b\u4e0d\u80fd\u4e3a\u4e86\u4e00\u4e2a\u52a8\u6001ip\u641e\u53f0\u7535\u811124\u5c0f\u65f6\u5f85\u673a\uff0c\u4e0d\u5b9e\u5728\uff0c\u6709\u5d4c\u5165\u5f0f\u7684\u5ba2\u6237\u7aef\u90a3\u53ef\u63a5\u53d7\uff0c\u5c0f\u7c73\u8def\u7531\u5668\u652f\u6301\u8be5\u529f\u80fd\u5b9e\u9645\u4e0a\u5c31\u662f\u5b89\u88c5\u4e86\u8fd9\u79cd\u5d4c\u5165\u5f0f\u7684\u5c0f\u5ba2\u6237\u7aef\uff1b<br \/>\n4\u3001\u5982\u679c\u6ca1\u6709\uff0c\u8fd8\u6709\u4e00\u4e2a\u529e\u6cd5\u53ef\u4ee5\u89e3\u51b3\uff0c\u5570\u55e6\u4e86\u8fd9\u4e48\u591a\u603b\u7b97\u8c08\u5230\u91cd\u70b9\u4e0a\u4e86\uff0c\u5148\u770b\u770b\u82b1\u751f\u58f3\u5b98\u7f51\u7684 <a href=\"http:\/\/hsk.oray.com\/download\/#type=http|wlan\" target=\"_blank\">\u8bf4\u660e<\/a><\/p>\n<pre line=\"1\">\u65b9\u5f0f1\uff1a\u4f7f\u7528URL\u9a8c\u8bc1     \u9002\u7528\u4e8e\u6d4f\u89c8\u5668\u6216\u5e94\u7528\u7a0b\u5e8f\uff08fetch, curl, lwp-request\uff09\n\u8bbf\u95ee\u5730\u5740\uff1ahttp:\/username:password@ddns.oray.com\/ph\/update?hostname=yourhostname&myip=ipaddress\n\n\u65b9\u5f0f2\uff1a\u539f\u59cbHTTP GET\u8bbf\u95ee    \u5982\u4f55\u5728ROS\u4e2d\u8bbe\u7f6e\u82b1\u751f\u58f3ddns\nGET \/ph\/update?hostname=yourhostname&myip=ipaddress HTTP\/1.0\nHost: ddns.oray.com\nAuthorization: Basic base-64-authorization\nUser-Agent: Oray\n\u6ce8\uff1a\u5176\u4e2d base-64-authorization \u8bf7\u4f7f\u7528 Base64 \u52a0\u5bc6 username:password \u540e\u7684\u5b57\u7b26\u66ff\u6362<\/pre>\n<p><strong>\u56db\u3001\u5b9e\u73b0\u65b9\u5f0f<\/strong><\/p>\n<p>1.1\u3001vi \/etc\/rc.local<br \/>\n1.2\u3001\u5728exit 0\u524d\u9762\u6dfb\u52a0\u4e00\u884c\u5185\u5bb9\u5982\u4e0b\uff0c\u5b9e\u73b0\u5f00\u673a\u5373\u81ea\u52a8\u5237\u65b0\u4e00\u6b21\uff1b<\/p>\n<pre line=\"1\">wget -q -O \/tmp\/log\/oray.log 'http:\/\/\u7528\u6237\u540d:\u5bc6\u7801@ddns.oray.com\/ph\/update?domain= \u52a8\u6001\u57df\u540d'<\/pre>\n<p>\u4e2d\u6587\u90e8\u5206\u6839\u636e\u5b9e\u9645\u66ff\u6362<br \/>\n2.1\u3001vi \/etc\/crontabs\/root<br \/>\n2.2\u3001\u5728\u6700\u540e\u9762\u6dfb\u52a0\u4e00\u884c\uff0c\u5b9e\u73b0\u6bcf10\u5206\u949f\u81ea\u52a8\u5237\u65b0\u4e00\u6b21\uff1b<\/p>\n<pre line=\"1\">*\/10 * * * * wget -q -O \/tmp\/log\/oray.log 'http:\/\/\u7528\u6237\u540d:\u5bc6\u7801@ddns.oray.com\/ph\/update?domain=\u52a8\u6001\u57df\u540d'<\/pre>\n<p>\u53c2\u8003\u94fe\u63a5\uff1a<a href=\"http:\/\/www.yusian.com\/blog\/centos\/2015\/06\/30\/175606.html\" target=\"_blank\">Linux\u5982\u4f55\u8bbe\u7f6e\u5b9a\u65f6\u4efb\u52a1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u51c6\u5907\u6750\u6599 1\u3001\u5728\u56fd\u5185\u52a8\u6001\u57df\u540d\u89e3\u6790\u4e00\u822c\u4f7f\u7528\u82b1\u751f\u58f3\uff0c\u5373oray.com\u8fd9\u4e2a\u5bb6\u4f19\uff0c\u53ef\u4ee5\u514d\u8d39\u7533\u8bf7\u4e00\u4e2a\u4e8c\u7ea7\u57df\u540d\uff08oray\u5e10\u53f7\u4e00\u4e2a\uff09\uff1b 2\u3001\u6ce8\u518c\u4e86oray\u5e10\u53f7\u4f60\u5c31\u80fd\u7533\u8bf7\u5230\u4e00\u4e2a\u514d\u8d39\u7684\u652f\u6301\u52a8\u6001\u57df\u540d\u89e3\u6790\u7684\u4e8c\u7ea7\u57df\u540d\uff08\u652f\u6301\u52a8\u6001\u57df\u540d\u89e3\u6790\u7684\u57df\u540d\u4e00\u4e2a\uff09\uff1b 3\u3001\u5982\u679c\u4f60\u6709\u81ea\u5df1\u7684\u9876\u7ea7\u57df\u540d\uff0c\u89c9\u5f97\u4f7f\u7528\u522b\u4eba\u7684\u4e8c\u7ea7\u57df\u540d\u4e0d\u591f\u5c4c\uff0c\u53ef\u4ee5\u5440\uff0c\u505a\u522b\u540d\u5904\u7406\u7b80\u5355\u641e\u5b9a\uff08\u9876\u7ea7\u57df\u540d\u4e00\u4e2a\uff0c\u8fd9\u4e2a\u6ca1\u6709\u6ca1\u5173\u7cfb\uff09\uff1b 4\u3001Linux\u6216Unix\u6216\u7c7bUnix\u4e3b\u673a\u4e00\u53f0\uff08\u6211\u5728\u8fd9\u91cc\u9488\u5bf9\u5c0f\u7c73\u8def\u7531\u5668\u505a\u6d4b\u8bd5\uff0c\u524d\u63d0\u662f\u5c0f\u7c73\u8def\u7531\u5668\u5df2\u7ecfroot\u4e86\uff0c\u80fd\u591fssh\u767b\u5f55\u540e\u53f0\uff09\uff1b \u4e8c\u3001\u57fa\u672c\u539f\u7406 1\u3001\u5047\u5982\u5bb6\u91cc\u4f7f\u7528\u7684ADSL\u62e8\u53f7\u4e0a\u7f51\uff0c\u8def\u7531\u5668\u4e0a\u4f1a\u83b7\u5f97\u4e00\u4e2a\u516c\u7f51ip\u5730\u5740\uff1b 2\u3001\u6211\u60f3\u901a\u8fc7\u67d0\u4e2a\u57df\u540d\u5bf9\u5e94\u8fd9\u4e2aip\u5730\u5740\uff0c\u4f46\u8fd9\u4e2aip\u5730\u5740\u968f\u7740\u6bcf\u6b21\u7684\u62e8\u53f7\u90fd\u4f1a\u53d1\u751f\u53d8\u5316\uff1b 3\u3001\u901a\u8fc7\u67d0\u79cd\u673a\u5236\uff0c\u5f53ip\u53d1\u751f\u53d8\u5316\u65f6\u544a\u8bc9DNS\u670d\u52a1\u5668\uff0c\u8ba9\u4ed6\u5373\u65f6\u66f4\u65b0\uff1b 4\u3001\u95ee\u9898\u6765\u4e86\uff0c\u8c01\u6765\u544a\u8bc9DNS\u670d\u52a1\u5668ip\u53d8\u4e86\uff1f\u8fd9\u662f\u6211\u4eec\u4eca\u5929\u7684\u91cd\u70b9\uff01 \u4e09\u3001\u89e3\u51b3\u65b9\u6848<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[8],"class_list":["post-635","post","type-post","status-publish","format-standard","hentry","category-centos","tag-linux"],"_links":{"self":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/comments?post=635"}],"version-history":[{"count":0,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/posts\/635\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/media?parent=635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/categories?post=635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yusian.com\/blog\/wp-json\/wp\/v2\/tags?post=635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}