{"id":839,"date":"2020-09-08T23:14:46","date_gmt":"2020-09-08T15:14:46","guid":{"rendered":"https:\/\/www.iotch.xyz\/?p=839"},"modified":"2020-09-08T23:14:46","modified_gmt":"2020-09-08T15:14:46","slug":"linux-%e5%b0%86-sakura-frp-%e8%ae%be%e7%bd%ae%e4%b8%ba%e6%9c%8d%e5%8a%a1%ef%bc%8c%e5%bc%80%e6%9c%ba%e8%87%aa%e5%8a%a8%e5%90%af%e5%8a%a8","status":"publish","type":"post","link":"https:\/\/www.iotch.xyz\/?p=839","title":{"rendered":"Linux \u5c06 Sakura Frp \u8bbe\u7f6e\u4e3a\u670d\u52a1\uff0c\u5f00\u673a\u81ea\u52a8\u542f\u52a8"},"content":{"rendered":"\n<p>\u9996\u5148\u6253\u5f00\u7ec8\u7aef\uff0c\u6267\u884c\u547d\u4ee4\uff1a<br><code>vim \/etc\/systemd\/system\/sakurafrp.service<\/code><br>\u6309\u4e0b A \u8fdb\u5165\u7f16\u8f91\u6a21\u5f0f\uff0c\u590d\u5236\u4ee5\u4e0b\u5185\u5bb9\u5e76\u7c98\u8d34\u5230 SSH\uff0cXShell \u7684\u5feb\u6377\u952e\u662f Shift + Insert ( \u952e\u76d8\u53f3\u4e0a\u89d2\u504f\u5de6\u8fb9 )<br><code>[Unit]<\/code><br><code>Description=Sakura Frp Client<\/code><br><code>Wants=network-online.target<\/code><br><code>After=network-online.target<\/code><br><code>[Service]<\/code><br><code>User=root<\/code><br><code>WorkingDirectory=\/\u4f60\u7684\u5ba2\u6237\u7aef\u50a8\u5b58\u4f4d\u7f6e\/<\/code><br><code>LimitNOFILE=4096<\/code><br><code>PIDFile=\/var\/run\/sakurafrp\/client.pid<\/code><br><code>ExecStart=\/\u4f60\u7684\u5ba2\u6237\u7aef\u50a8\u5b58\u4f4d\u7f6e\/\u5ba2\u6237\u7aef\u6587\u4ef6\u540d --su=\u4f60\u7684\u8d26\u53f7 --sp=\u4f60\u7684\u5bc6\u7801 --sid=\u4f60\u8981\u9009\u62e9\u7684\u670d\u52a1\u5668\u7684ID(\u5c31\u662f\u670d\u52a1\u5668\u5217\u8868\u5de6\u4fa7\u7684\u6570\u5b57)<\/code><br><code>Restart=on-failure<\/code><br><code>StartLimitInterval=600<\/code><br><code>[Install]<\/code><br><code>WantedBy=multi-user.target<\/code><br>\u4f8b\u5982\u6211\u7684\u5ba2\u6237\u7aef\u50a8\u5b58\u5728 \/root\/sakurafrp\/\uff0c\u6587\u4ef6\u540d\u662f Sakura_frpc_linux_amd64\uff0c\u8d26\u53f7\u662f 233\uff0c\u5bc6\u7801\u662f 888\uff0c\u9009\u62e9\u7684\u670d\u52a1\u5668\u662f\u5b81\u6ce2\u7535\u4fe1\uff0cID \u4e3a 0\uff0c\u90a3\u4e48\u6211\u5c31\u586b\u5199\u4ee5\u4e0b\u5185\u5bb9<br><code>[Unit]<\/code><br><code>Description=Sakura Frp Client<\/code><br><code>[Service]<\/code><br><code>User=root<\/code><br><code>WorkingDirectory=\/root\/sakurafrp\/<\/code><br><code>LimitNOFILE=4096<\/code><br><code>PIDFile=\/var\/run\/sakurafrp\/client.pid<\/code><br><code>ExecStart=\/root\/sakurafrp\/Sakura_frpc_linux_amd64 --su=233 --sp=888 --sid=0<\/code><br><code>Restart=on-failure<\/code><br><code>StartLimitInterval=600<\/code><br><code>[Install]<\/code><br><code>WantedBy=multi-user.target<\/code><br>\u7136\u540e\u6309 Esc\uff0c\u63a5\u7740\u8f93\u5165 :wq \u4fdd\u5b58\uff0c\u5982\u679c\u63d0\u793a\u4fdd\u5b58\u5931\u8d25\u5c31\u8bd5\u8bd5 :wq! \u6ce8\u610f ! \u662f\u82f1\u6587\u7684\u611f\u53f9\u53f7\u4e0d\u662f\u4e2d\u6587\u7684\uff01\u611f\u53f9\u53f7\u3002<br>\u63a5\u7740\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<br><code>systemctl daemon-reload<\/code><br>\u670d\u52a1\u5c31\u521b\u5efa\u6210\u529f\u4e86\uff0c\u63a5\u4e0b\u6765\u542f\u52a8\u670d\u52a1\uff1a<br><code>systemctl start sakurafrp<\/code><br>\u5c06\u670d\u52a1\u8bbe\u7f6e\u4e3a\u5f00\u673a\u542f\u52a8<br><code>systemctl enable sakurafrp<\/code><br>\u5982\u679c\u8981\u505c\u6b62\u8fd0\u884c\u5ba2\u6237\u7aef\uff0c\u53ea\u9700\u8981\u8f93\u5165<br><code>systemctl stop sakurafrp<\/code><br>\u5982\u679c\u8981\u7981\u6b62\u5f00\u673a\u542f\u52a8\uff0c\u8f93\u5165<br><code>systemctl disable sakurafrp<\/code><\/p>\n\n\n\n<p>\u539f\u6587\u94fe\u63a5:<a href=\"https:\/\/blog.csdn.net\/qq_29334133\/article\/details\/89301491\" target=\"_blank\" rel=\"noreferrer noopener\" rel=\"nofollow\" >https:\/\/blog.csdn.net\/qq_29334133\/article\/details\/89301491<\/a><\/p>\n<button class=\"simplefavorite-button\" data-postid=\"839\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u9996\u5148\u6253\u5f00\u7ec8\u7aef\uff0c\u6267\u884c\u547d\u4ee4\uff1avim \/etc\/systemd\/system\/sakurafrp.service\u6309\u4e0b A \u8fdb\u5165\u7f16\u8f91\u6a21\u5f0f\uff0c &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-839","post","type-post","status-publish","format-standard","hentry","category-10"],"_links":{"self":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/839","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=839"}],"version-history":[{"count":0,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=\/wp\/v2\/posts\/839\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=839"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=839"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iotch.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=839"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}