{"id":1509,"date":"2019-12-29T16:51:24","date_gmt":"2019-12-29T13:51:24","guid":{"rendered":"https:\/\/artem.services\/?p=1509"},"modified":"2019-12-29T16:51:24","modified_gmt":"2019-12-29T13:51:24","slug":"systemd-%d0%bc%d0%be%d0%bd%d1%82%d0%b8%d1%80%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-nfs-%d0%b4%d0%b8%d1%80%d0%b5%d0%ba%d1%82%d0%be%d1%80%d0%b8%d0%b8-%d1%87%d0%b5%d1%80%d0%b5%d0%b7-openvpn","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1509","title":{"rendered":"Systemd &#8212; \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 NFS \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 OpenVPN"},"content":{"rendered":"<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043e \u0432 &quot;<strong>fstab<\/strong>&quot; \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0435\u0449\u0435 \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0442\u0438, \u0442\u043e \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e &quot;<strong>_netdev<\/strong>&quot;. \u041d\u043e \u0435\u0441\u043b\u0438 <strong>NFS<\/strong> \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 <strong>VPN<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0442\u0438 \u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &quot;<strong>rc.local<\/strong>&quot; \u0438\u043b\u0438 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <strong>Systemd<\/strong>.<\/p>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ul>\n<li><strong>openvpn@vpn.service<\/strong> &#8212; \u0438\u043c\u044f OpenVPN \u0441\u0435\u0440\u0432\u0438\u0441\u0430<\/li>\n<li><strong>192.168.1.1<\/strong> &#8212; \u0430\u0434\u0440\u0435\u0441 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e NFS \u0441\u0435\u0440\u0432\u0435\u0440\u0430<\/li>\n<li><strong>\/var\/www\/html<\/strong> &#8212; \u043f\u0443\u0442\u044c \u043d\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435<\/li>\n<li><strong>\/home\/artem\/web<\/strong> &#8212; \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043b\u044f \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u044c <strong>NFS<\/strong>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nmodprobe nfs\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c <strong>Systemd mount service<\/strong> \u0441 \u0438\u043c\u0435\u043d\u0435\u043c &quot;<strong>home-artem-web.mount<\/strong>&quot;<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nvim \/usr\/lib\/systemd\/system\/home-artem-web.mount\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>\u0412\u0430\u0436\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u044f \u0431\u044b\u043b\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043e \u043d\u0430 \u043f\u0443\u0442\u0438, \u043a\u0443\u0434\u0430 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f NFS \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f, \u0438\u043d\u0430\u0447\u0435 \u0441\u0435\u0440\u0432\u0438\u0441 \u043d\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0441\u044f. \u0421\u043b\u0435\u0448\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0442\u0438\u0440\u0435.<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<p>\u0421\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n[Unit]\r\nDescription=Mount NFS Share\r\nAfter=network.target openvpn@vpn.service\r\n\r\n[Mount]\r\nWhat=192.168.1.1:\/var\/www\/html\r\nWhere=\/home\/artem\/web\r\nType=nfs\r\nOptions=_netdev,auto\r\n\r\n[Install]\r\nWantedBy=multi-user.target\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u041f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u0435\u043c\u043e\u043d\u043e\u0432:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsystemctl daemon-reload\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0438 \u0441\u0442\u0430\u0432\u0438\u043c \u0432 \u0430\u0432\u0442\u043e\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsystemctl start home-artem-web.mount\r\nsystemctl enable home-artem-web.mount\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0422\u0430\u043a \u043a\u0430\u043a \u0432\u0441\u0435 \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043e \u0432 &quot;fstab&quot; \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u0435\u0449\u0435 \u0434\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0442\u0438, \u0442\u043e \u043f\u0440\u0438\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f \u0435\u0441\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0446\u0438\u044e &quot;_netdev&quot;. \u041d\u043e \u0435\u0441\u043b\u0438 NFS \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 VPN, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0436\u0435 \u0441\u0442\u0430\u0440\u0442\u0443\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0442\u0438 \u0442\u043e \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u0430\u0440\u0438\u0430\u043d\u0442 &quot;rc.local&quot; \u0438\u043b\u0438 \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0438\u0441\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Systemd. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043e \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: openvpn@vpn.service &#8212; \u0438\u043c\u044f OpenVPN &hellip; <a href=\"https:\/\/artem.services\/?p=1509\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;Systemd &#8212; \u041c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 NFS \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0447\u0435\u0440\u0435\u0437 OpenVPN&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[164,42],"tags":[137,134,12,1185],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1509"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1509"}],"version-history":[{"count":1,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1509\/revisions"}],"predecessor-version":[{"id":1510,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1509\/revisions\/1510"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1509"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1509"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1509"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}