{"id":33,"date":"2019-05-13T13:45:16","date_gmt":"2019-05-13T05:45:16","guid":{"rendered":"https:\/\/thereisno.top:4430\/?p=33"},"modified":"2019-05-13T13:45:16","modified_gmt":"2019-05-13T05:45:16","slug":"debian%e6%a0%91%e8%8e%93%e6%b4%be%e5%bc%80%e6%9c%ba%e5%90%af%e5%8a%a8%e8%84%9a%e6%9c%ac%e8%ae%be%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/thereisno.top\/?p=33","title":{"rendered":"Debian(\u6811\u8393\u6d3e)\u5f00\u673a\u542f\u52a8\u811a\u672c\u8bbe\u7f6e"},"content":{"rendered":"\n<p>\u4e3a\u4e86\u66f4\u597d\u7684\u7406\u89e3\u542f\u52a8\u811a\u672c\u7684\u8bbe\u7f6e\uff0c\u6211\u4eec\u9700\u8981\u5148\u4e86\u89e3\u4e0bDebian\u7cfb\u7edf\u4e2d\u7684\u8fd0\u884c\u7ea7\u522b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>0 &#8211; \u505c\u673a\uff08\u5343\u4e07\u4e0d\u8981\u628ainitdefault\u8bbe\u7f6e\u4e3a0 \uff09<\/li><li>1 &#8211;\n     \u5355\u7528\u6237\u6a21\u5f0f(\u5355\u7528\u6237\u6a21\u5f0f\uff0c\u53ea\u5141\u8bb8root\u7528\u6237\u5bf9\u7cfb\u7edf\u8fdb\u884c\u7ef4\u62a4\u3002)<\/li><li>2 &#8211; \u591a\u7528\u6237\uff0c\u4f46\u662f\u6ca1\u6709NFS<\/li><li>3 &#8211; \u5b8c\u5168\u591a\u7528\u6237\u6a21\u5f0f(\u5b57\u7b26\u754c\u9762)<\/li><li>4 &#8211; \u57fa\u672c\u4e0d\u7528<\/li><li>5 &#8211; X11(\u56fe\u5f62\u754c\u9762)<\/li><li>6 &#8211; \u91cd\u65b0\u542f\u52a8\uff08\u5343\u4e07\u4e0d\u8981\u628ainitdefault\u8bbe\u7f6e\u4e3a6 \uff09<\/li><\/ul>\n\n\n\n<p>\u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u7684\u8fd0\u884c\u7ea7\u522b<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  runlevel\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p><strong>\/etc\/rcN.d<\/strong><strong>\u76ee\u5f55<\/strong><\/p>\n\n\n\n<p>\u901a\u5e38\u7cfb\u7edf\u542f\u52a8\u540e\u5148\u6267\u884c\/etc\/rcS.d\/\u76ee\u5f55\u4e0b\u7684\u811a\u672c\uff0c\u7136\u540e\u6839\u636e\u8fd0\u884c\u7ea7\u522b\uff0c\u6267\u884c\u5bf9\u5e94\/etc\/rcN.d\/\u76ee\u5f55\u4e0b\u7684\u811a\u672c(N\u4e3a\u7cfb\u7edf\u8fd0\u884c\u7ea7\u522b)\u3002<\/p>\n\n\n\n<p>\u4e0b\u9762\u662f\/etc\/rc5.d\u76ee\u5f55\u4e0b\u7684\u5185\u5bb9<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  lrwxrwxrwx 1 root root&nbsp; 24 Dec 30 15:56 K02gmediarenderer -&gt;\n  ..\/init.d\/gmediarenderer\n  lrwxrwxrwx 1 root root&nbsp; 16 Jan 24 23:52 K02mopidy -&gt;\n  ..\/init.d\/mopidy\n  lrwxrwxrwx 1 root root&nbsp; 18 Jan 24 23:55 K02upmpdcli -&gt;\n  ..\/init.d\/upmpdcli\n  -rw-r&#8211;r&#8211; 1 root root 677 Apr&nbsp; 7&nbsp;\n  2015 README\n  lrwxrwxrwx 1 root root&nbsp; 18 Sep 24 21:21 S01bootlogs -&gt;\n  ..\/init.d\/bootlogs\n  lrwxrwxrwx 1 root root&nbsp; 16 Sep 24 22:33 S01dhcpcd -&gt;\n  ..\/init.d\/dhcpcd\n  lrwxrwxrwx 1 root root&nbsp; 17 Oct 21 13:27 S01hd-idle -&gt;\n  ..\/init.d\/hd-idle\n  lrwxrwxrwx 1 root root&nbsp; 17 Sep 24 21:33 S01ifplugd -&gt;\n  ..\/init.d\/ifplugd\n  lrwxrwxrwx 1 root root&nbsp; 14 Jan 14 14:37 S02dbus -&gt;\n  ..\/init.d\/dbus\n  lrwxrwxrwx 1 root root&nbsp; 21 Mar&nbsp;\n  3 16:04 S02ddns-dnspod -&gt; ..\/init.d\/ddns-dnspod\n  . . . . . .\n  . . . . . .\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u6709K\u548cS\u5f00\u5934\u7684\u6587\u4ef6\uff0cK\u4ee3\u8868\u5173\u95ed\uff0cS\u4ee3\u8868\u542f\u52a8\uff0c\u540e\u9762\u7d27\u8ddf\u7684\u6570\u5b57\u4ee3\u8868\u542f\u52a8\u987a\u5e8f\uff0c\u6570\u5b57\u8d8a\u5927\u542f\u52a8\u6216\u5173\u95ed\u5c31\u8d8a\u9760\u540e\u3002\u76ee\u5f55\u4e0b\u7684\u6bcf\u4e00\u4e2a\u6587\u4ef6\u90fd\u6307\u5411\u4e86\/etc\/init.d\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\uff0c\u5f00\u673a\u542f\u52a8\u811a\u672c\u5c31\u662f\u653e\u5728\u8fd9\u4e2a\u76ee\u5f55\u4e0b\u7684\u3002<\/p>\n\n\n\n<p>\u6587\u4ef6\u4e2d\u4ee3\u8868\u542f\u52a8\u987a\u5e8f\u7684\u6570\u5b57\u662f\u6839\u636e\u4f9d\u8d56\u5173\u7cfb\u81ea\u52a8\u8bbe\u7f6e\u7684\uff0c\u5728\u65b0\u7248\u7684update-rc.d\u547d\u4ee4\u4e2d\u65e0\u6cd5\u624b\u52a8\u8bbe\u7f6e\u8fd9\u4e2a\u6570\u5b57\u3002\u67e5\u770b\u662f\u5426\u53ef\u4ee5\u624b\u52a8\u8bbe\u7f6e\u53c2\u770bman update-rc.d\u8bf4\u660e\u3002<\/p>\n\n\n\n<p><strong>\u6dfb\u52a0\u65b0\u7684\u542f\u52a8\u811a\u672c<\/strong><\/p>\n\n\n\n<p>\u5728\/etc\/init.d\u76ee\u5f55\u4e0b\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\uff0c\u5e76\u6dfb\u52a0\u6267\u884c\u6743\u9650sudo\nchmod a+x xxx_script\u3002<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  #!\/bin\/sh\n  ### BEGIN INIT INFO\n  # Provides:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ddns-dnspod\n  # Required-Start:&nbsp;&nbsp;&nbsp; $local_fs $remote_fs $network $syslog\n  # Required-Stop:&nbsp;&nbsp;&nbsp;&nbsp; $local_fs $remote_fs $network $syslog\n  # Default-Start:&nbsp;&nbsp;&nbsp;&nbsp; 2 3 4 5\n  # Default-Stop:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 1 6\n  # Short-Description: starts the ddns-dnspod\n  service\n  # Description:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; starts the ddns-dnspod service\n  ### END INIT INFO\n  &nbsp;\n  case &#8220;$1&#8221; in\n  start)\n  echo &#8220;start\n  ddns-dnspod&#8221;\n  sudo\n  \/home\/pi\/work\/projects\/dnspod_ddns\/dnspod_ddns.py -d start\n  ;;\n  stop)\n  sudo\n  \/home\/pi\/work\/projects\/dnspod_ddns\/dnspod_ddns.py -d stop\n  ;;\n  restart)\n  sudo\n  \/home\/pi\/work\/projects\/dnspod_ddns\/dnspod_ddns.py -d restart\n  ;;\n  *)\n  echo &#8220;Usage: $0 (start|stop)&#8221;\n  ;;\n  esac\n  exit 0\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>\u4e0a\u9762\u662f\u4e00\u4e2addns\u7684\u5f00\u673a\u542f\u52a8\u811a\u672c\u3002\u6211\u4eec\u9700\u8981\u5728\u542f\u52a8\u811a\u672c\u7684\u6ce8\u91ca\u4e2d\u5199\u660e\u542f\u52a8\u4f9d\u8d56\u548c\u5728\u90a3\u4e9b\u8fd0\u884c\u7ea7\u522b\u542f\u52a8\u3002\u5177\u4f53\u7684\u4f9d\u8d56\u540d\u5199\u6cd5\u53ef\u4ee5\u53c2\u8003<a href=\"https:\/\/wiki.debian.org\/LSBInitScripts\">\u8fd9\u91cc<\/a>\u3002<\/p>\n\n\n\n<p>\u5f53\u5728\/etc\/init.d\u76ee\u5f55\u4e0b\u6dfb\u52a0\u65b0\u7684\u542f\u52a8\u811a\u672c\u540e\uff0c\u6211\u4eec\u6700\u597d\u5148\u8fdb\u884c\u4e0b\u6d4b\u8bd5\uff0c\u6267\u884c\u4e0b\u5404\u79cd\u9009\u9879\u786e\u4fdd\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  \/etc\/init.d\/xxx_script start\n  \/etc\/init.d\/xxx_script stop\n  \u4ee5git\u7528\u6237\u8fd0\u884c\uff0c\u540e\u53f0\u8fd0\u884c\n  su &#8211; git -c nohup -c\n  \/home\/git\/gitea-1.7-linux-arm-7 web &amp;&nbsp;\n  &nbsp;\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p><strong>update-rc.d\u547d\u4ee4<\/strong><\/p>\n\n\n\n<p>\u5728\/etc\/init.d\u76ee\u5f55\u4e0b\u6dfb\u52a0\u542f\u52a8\u811a\u672c\u540e\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528update-rc.d\u547d\u4ee4\u8bbe\u7f6e\u811a\u672c\u5f00\u673a\u542f\u52a8\u3002<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  update-rc.d\n  xxx_script defaults\n  <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>\u6267\u884c\u5b8c\u4e0a\u9762\u547d\u4ee4\u540e\uff0c\u67e5\u770b\/etc\/rcN.d\u76ee\u5f55\u4e2d\u662f\u5426\u6709\u6307\u5411xxx_script\u6587\u4ef6\u7684\u542f\u52a8\u548c\u5173\u95ed\u6587\u4ef6\u3002\u53e6\u5916\u8fd8\u4f1a\u5411\/run\/systemd\/generator.late\/\u76ee\u5f55\u6dfb\u52a0\u4e00\u4e2aservice\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528sudo\nservice xxx_script start|stop\u547d\u4ee4\u6765\u63a7\u5236\u811a\u672c\u8fd0\u884c\u3002<\/p>\n\n\n\n<p>update-rc.d\u5176\u4ed6\u53c2\u6570\u7528\u6cd5<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>\n  # \u79fb\u9664\u5f00\u673a\u542f\u52a8\u8fde\u63a5(\/etc\/rcN.d \u76ee\u5f55\u4e0b\u7684\u6587\u4ef6)\n  sudo update-rc.d xxx_script remove\n  # \u542f\u7528\u6216\u8005\u7981\u7528\u5f00\u673a\u542f\u52a8\n  sudo update-rc.d\n  xxx_script enable|disable\n  <\/td><\/tr><\/tbody><\/table>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4e86\u66f4\u597d\u7684\u7406\u89e3\u542f\u52a8\u811a\u672c\u7684\u8bbe\u7f6e\uff0c\u6211\u4eec\u9700\u8981\u5148\u4e86\u89e3\u4e0bDebian\u7cfb\u7edf\u4e2d\u7684\u8fd0\u884c\u7ea7\u522b\u3002 0 &#8211; \u505c\u673a\uff08\u5343\u4e07\u4e0d &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/thereisno.top\/?p=33\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cDebian(\u6811\u8393\u6d3e)\u5f00\u673a\u542f\u52a8\u811a\u672c\u8bbe\u7f6e\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-33","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/33","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":1,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":34,"href":"https:\/\/thereisno.top\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions\/34"}],"wp:attachment":[{"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/thereisno.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}