{"id":103,"date":"2022-06-30T10:25:46","date_gmt":"2022-06-30T02:25:46","guid":{"rendered":"http:\/\/blog.naspro.cc\/?p=103"},"modified":"2022-06-30T18:08:19","modified_gmt":"2022-06-30T10:08:19","slug":"linux-%e4%bd%bf%e7%94%a8-systemctl-%e5%90%af%e5%8a%a8frp%e5%b9%b6%e8%ae%be%e7%bd%ae%e5%bc%80%e6%9c%ba%e8%87%aa%e5%90%af","status":"publish","type":"post","link":"http:\/\/blog.naspro.cc\/?p=103","title":{"rendered":"Linux \u4f7f\u7528 systemctl \u542f\u52a8frp\u5e76\u8bbe\u7f6e\u5f00\u673a\u81ea\u542f"},"content":{"rendered":"<h3><span class=\"ez-toc-section\" id=\"systemctl%e8%af%b4%e6%98%8e\"><\/span>systemctl\u8bf4\u660e<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Linux \u670d\u52a1\u7ba1\u7406\u4e24\u79cd\u65b9\u5f0fservice\u548csystemctl<br \/>\nsystemd\u662fLinux\u7cfb\u7edf\u6700\u65b0\u7684\u521d\u59cb\u5316\u7cfb\u7edf(init),\u4f5c\u7528\u662f\u63d0\u9ad8\u7cfb\u7edf\u7684\u542f\u52a8\u901f\u5ea6\uff0c\u5c3d\u53ef\u80fd\u542f\u52a8\u8f83\u5c11\u7684\u8fdb\u7a0b\uff0c\u5c3d\u53ef\u80fd\u66f4\u591a\u8fdb\u7a0b\u5e76\u53d1\u542f\u52a8\u3002<br \/>\nsystemd\u5bf9\u5e94\u7684\u8fdb\u7a0b\u7ba1\u7406\u547d\u4ee4\u662fsystemctl<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%e5%ae%89%e8%a3%85systemctl\"><\/span>\u5b89\u88c5systemctl<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre class=\"prettyprint linenums\" ><code>yum install systemd-sysv &amp;&amp; reboot\napt install systemd-sysv &amp;&amp; reboot<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%e9%a6%96%e5%85%88%e5%88%9b%e5%bb%ba%e6%9c%8d%e5%8a%a1%ef%bc%88_frpsservice%ef%bc%89%ef%bc%9a\"><\/span>\u9996\u5148\u521b\u5efa\u670d\u52a1\uff08 frps.service\uff09\uff1a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre class=\"prettyprint linenums\" ><code>\/lib\/systemd\/system\/frps.service<\/code><\/pre>\n<p>\u5728frps.service\u91cc\u5199\u5165\u4ee5\u4e0b\u5185\u5bb9<\/p>\n<pre class=\"prettyprint linenums\" ><code>[Unit]\nDescription=fraps service\nAfter=network.target network-online.target syslog.target\nWants=network.target network-online.target\n\n[Service]\nType=simple\n\n#\u542f\u52a8\u670d\u52a1\u7684\u547d\u4ee4\uff08\u6b64\u5904\u5199\u4f60\u7684frps\u7684\u5b9e\u9645\u5b89\u88c5\u76ee\u5f55\uff09\nExecStart=[\/your\/path]\/frps -c [\/your\/path]\/frps.ini\n\n[Install]\nWantedBy=multi-user.target<\/code><\/pre>\n<p>\u542f\u52a8<\/p>\n<pre class=\"prettyprint linenums\" ><code>frps sudo systemctl start frps<\/code><\/pre>\n<p>\u6253\u5f00\u81ea\u542f\u52a8<\/p>\n<pre class=\"prettyprint linenums\" ><code>sudo systemctl enable frps<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%e7%9b%b8%e5%85%b3%e5%91%bd%e4%bb%a4\"><\/span>\u76f8\u5173\u547d\u4ee4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre class=\"prettyprint linenums\" ><code class=\"language-html\">#\u542f\u52a8 frps\nsudo systemctl start frps\n#\u91cd\u542f\nsudo systemctl restart frps\n#\u505c\u6b62 \nsudo systemctl stop frps\n#\u67e5\u770b\u5e94\u7528\u65e5\u5fd7\nsudo systemctl status frps<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"systemd%e7%9a%84unit%e6%94%be%e5%9c%a8%e7%9b%ae%e5%bd%95\"><\/span>systemd\u7684Unit\u653e\u5728\u76ee\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"centos\"><\/span>Centos<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\/usr\/lib\/systemd\/system<\/p>\n<h4><span class=\"ez-toc-section\" id=\"ubuntu_debian\"><\/span>Ubuntu debian<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\/etc\/systemd\/system<\/p>\n<p><a href=\"https:\/\/www.boxmoe.com\/610.html\" title=\"\u8f6c\u8f7d\">\u8f6c\u8f7d<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>systemctl\u8bf4\u660e Linux \u670d\u52a1\u7ba1\u7406\u4e24\u79cd\u65b9\u5f0fservice\u548csystemctl systemd\u662fLinux\u7cfb\u7edf\u6700\u65b0\u7684\u521d\u59cb\u5316\u7cfb\u7edf(init),\u4f5c\u7528\u662f\u63d0\u9ad8\u7cfb\u7edf\u7684\u542f\u52a8\u901f\u5ea6\uff0c\u5c3d\u53ef\u80fd\u542f\u52a8\u8f83\u5c11\u7684\u8fdb\u7a0b\uff0c\u5c3d\u53ef\u80fd\u66f4\u591a\u8fdb\u7a0b\u5e76\u53d1\u542f\u52a8\u3002 systemd\u5bf9\u5e94\u7684\u8fdb\u7a0b\u7ba1\u7406\u547d\u4ee4\u662fsystemctl \u5b89\u88c5systemctl yum install systemd-sysv &amp;&amp; reboot apt ins [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":105,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[22],"class_list":["post-103","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-22"],"_links":{"self":[{"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=\/wp\/v2\/posts\/103","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=103"}],"version-history":[{"count":0,"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=\/wp\/v2\/posts\/103\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=\/wp\/v2\/media\/105"}],"wp:attachment":[{"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=103"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=103"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.naspro.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=103"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}