{"id":3015,"date":"2021-01-31T13:18:42","date_gmt":"2021-01-31T13:18:42","guid":{"rendered":"http:\/\/softbeam.cn\/hobby\/?p=3015"},"modified":"2021-01-31T13:18:42","modified_gmt":"2021-01-31T13:18:42","slug":"wsl","status":"publish","type":"post","link":"https:\/\/softbeam.net\/hobby\/?p=3015","title":{"rendered":"WSL and Fedora 33"},"content":{"rendered":"\n<p>Ubuntu\u7684\u9ed8\u8ba4root\u5bc6\u7801\u662f\u968f\u673a\u7684\uff0c\u5373\u6bcf\u6b21\u5f00\u673a\u90fd\u6709\u4e00\u4e2a\u65b0\u7684root\u5bc6\u7801\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u7ec8\u7aef\u5165\u547d\u4ee4 sudo passwd\uff0c\u7136\u540e\u8f93\u5165<\/p>\n\n\n\n<p>WSL \u5b50\u7cfb\u7edf\u662f\u57fa\u4e8e LxssManager \u670d\u52a1\u8fd0\u884c\u7684\u3002\u53ea\u9700\u8981\u5c06 LxssManager \u91cd\u542f\u5373\u53ef\uff1a\u4ee5\u7ba1\u7406\u5458\u8fd0\u884cpowershell: net stop LxssManager, net start LxssManager<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.softbeam.net\/hobby\/wp-content\/uploads\/2021\/02\/Sysvinit-systemd-1.png\" alt=\"\" class=\"wp-image-3027\" width=\"458\" height=\"295\"\/><\/figure><\/div>\n\n\n\n<p>\u5b89\u88c5wsl\u540e\u65e0\u6cd5\u901a\u8fc7ssh\u94fe\u63a5\uff0c\u63d0\u793a<code>Permission denied (publickey)<\/code>\uff1b\u5e76\u975eroot\u767b\u5f55\uff0c\u4e14ssh\u670d\u52a1\u5df2\u5f00\u542f<code>sudo service ssh start<\/code>\uff1b\u9700\u8981\u624b\u52a8\u66f4\u6539ssh\u914d\u7f6e <code>sudo vi \/etc\/ssh\/sshd_config<\/code>\uff1b \u6dfb\u52a0 <code>PasswordAuthentication yes<\/code>\uff1b\u4fdd\u5b58\u540e\u91cd\u542f\u670d\u52a1 sudo service ssh restart<\/p>\n\n\n\n<p>\u67e5\u770b\u5b89\u88c5\u7684\u8f6f\u4ef6\uff1adpkg -l | grep ftp; \u67e5\u770b\u8f6f\u4ef6\u5b89\u88c5\u8def\u5f84\uff1adpkg -L | grep ftp<\/p>\n\n\n\n<p><a href=\"https:\/\/blog.csdn.net\/qq_34039018\/article\/details\/94437355\">Ubuntu 16.04\u4e2d\u914d\u7f6enginx + php + mysql<\/a><\/p>\n\n\n\n<p><em>\u9996\u5148\u67e5\u770b\u6240\u6709\u5206\u53d1\u7248\u672c wsl -l &#8211;all -v\uff1b \u5bfc\u51fa\u5206\u53d1\u7248\u4e3atar\u6587\u4ef6\u5230d\u76d8 wsl &#8211;export Ubuntu-20.04 d:\\ubuntu20.04.tar\uff1b \u6ce8\u9500\u5f53\u524d\u5206\u53d1\u7248 wsl &#8211;unregister Ubuntu-20.04\uff1b \u91cd\u65b0\u5bfc\u5165\u5e76\u5b89\u88c5\u5206\u53d1\u7248\u5728d:\\ubuntu wsl &#8211;import Ubuntu-20.04 d:\\ubuntu d:\\ubuntu20.04.tar &#8211;version 2\uff1b \u8bbe\u7f6e\u9ed8\u8ba4\u767b\u9646\u7528\u6237\u4e3a\u5b89\u88c5\u65f6\u7528\u6237\u540d ubuntu2004 config &#8211;default-user Username<\/em> <a href=\"https:\/\/docs.microsoft.com\/zh-cn\/windows\/wsl\/install-win10#set-your-distribution-version-to-wsl-1-or-wsl-2\">https:\/\/docs.microsoft.com\/zh-cn\/windows\/wsl\/install-win10#set-your-distribution-version-to-wsl-1-or-wsl-2<\/a> <a href=\"http:\/\/www.mamicode.com\/info-detail-3049891.html\">http:\/\/www.mamicode.com\/info-detail-3049891.html<\/a><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.softbeam.net\/hobby\/wp-content\/uploads\/2021\/02\/runlevel-1-1024x606.png\" alt=\"\" class=\"wp-image-3019\" width=\"627\" height=\"370\"\/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.softbeam.net\/hobby\/wp-content\/uploads\/2021\/02\/systemctl-1.png\" alt=\"\" class=\"wp-image-3020\" width=\"330\" height=\"409\"\/><\/figure><\/div>\n\n\n\n<p>\u5728Windows\u4e3b\u673a\u4e0a\u7528Virtualbox\u642d\u5efaLinux\u865a\u62df\u673a\uff0c\u865a\u62df\u673a\u548c\u4e3b\u673a\u4e4b\u95f4\u4f20\u9012\u6587\u4ef6\u6700\u65b9\u4fbf\u7684\u65b9\u6cd5\u5c31\u662f\u5171\u4eab\u6587\u4ef6\u5939\u3002\u5047\u8bbe\u5c06Windows\u4e0b\u7684share\u6587\u4ef6\u5939\u4f5c\u4e3a\u5171\u4eab\u6587\u4ef6\u5939\u3002\u8bbe\u7f6e\u597d\u5171\u4eab\u6587\u4ef6\u5939\u4e4b\u540e\uff0c\u8fdb\u5165\u865a\u62df\u673a\uff0c\u5171\u4eab\u6587\u4ef6\u5939\u7684\u5730\u5740\u662f\/media\/sf_share\u3002\u4f46\u662f\u8fdb\u5165\u8be5\u6587\u4ef6\u5939\u65f6\uff0c\u4f1a\u53d1\u73b0\u5171\u4eab\u6587\u4ef6\u5939\u65e0\u6cd5\u8bbf\u95ee\uff0c\u7cfb\u7edf\u63d0\u793a\u7684\u539f\u56e0\u662f\u6743\u9650\u4e0d\u8db3\uff08Permission denied\uff09\u3002\u5728\u865a\u62df\u673a\u4e0b\u67e5\u770b\u5171\u4eab\u6587\u4ef6\u5939\u7684\u5c5e\u6027\uff0c\u53d1\u73b0\u8be5\u76ee\u5f55\u7684\u6240\u6709\u8005\u662f<strong>root<\/strong>\uff0c\u6240\u5c5e\u7ec4\u662f<strong>vboxsf<\/strong>\u3002\u89e3\u51b3\u6743\u9650\u4e0d\u8db3\u95ee\u9898\u7684\u65b9\u6cd5\u5c31\u662f\u5c06\u81ea\u5df1\u767b\u5f55\u7684\u7528\u6237\uff0c\u6dfb\u52a0\u5230<strong>vboxsf<\/strong>\u7ec4\u4e2d: sudo usermod -aG vboxsf $(whoami)<\/p>\n\n\n\n<p>visit from localhost: sudo systemctl stop firewalld.service; sudo systemctl disable firewalld.service<\/p>\n\n\n\n<p>setting up mariadb-server, after installation and start service, run: mysql_secure_installation. after setting up, test: mysql -uroot -p<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ubuntu\u7684\u9ed8\u8ba4root\u5bc6\u7801\u662f\u968f\u673a\u7684\uff0c\u5373\u6bcf\u6b21\u5f00\u673a\u90fd\u6709\u4e00\u4e2a\u65b0\u7684root\u5bc6\u7801\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u7ec8\u7aef\u5165\u547d\u4ee4 sudo passwd\uff0c\u7136\u540e\u8f93\u5165 WSL \u5b50\u7cfb\u7edf\u662f\u57fa\u4e8e LxssManager \u670d\u52a1\u8fd0\u884c\u7684\u3002\u53ea\u9700\u8981\u5c06 LxssManager \u91cd\u542f\u5373\u53ef\uff1a\u4ee5\u7ba1\u7406\u5458\u8fd0\u884cpowershell: net stop LxssManager, net start LxssManager \u5b89\u88c5wsl\u540e\u65e0\u6cd5\u901a\u8fc7ssh\u94fe\u63a5\uff0c\u63d0\u793aPermission denied (publickey)\uff1b\u5e76\u975eroot\u767b\u5f55\uff0c\u4e14ssh\u670d\u52a1\u5df2\u5f00\u542fsudo service ssh start\uff1b\u9700\u8981\u624b\u52a8\u66f4\u6539ssh\u914d\u7f6e sudo vi \/etc\/ssh\/sshd_config\uff1b \u6dfb\u52a0 PasswordAuthentication yes\uff1b\u4fdd\u5b58\u540e\u91cd\u542f\u670d\u52a1 sudo service ssh restart \u67e5\u770b\u5b89\u88c5\u7684\u8f6f\u4ef6\uff1adpkg -l | grep ftp; \u67e5\u770b\u8f6f\u4ef6\u5b89\u88c5\u8def\u5f84\uff1adpkg -L | grep ftp Ubuntu 16.04\u4e2d\u914d\u7f6enginx + php + mysql \u9996\u5148\u67e5\u770b\u6240\u6709\u5206\u53d1\u7248\u672c wsl -l &#8211;all -v\uff1b \u5bfc\u51fa\u5206\u53d1\u7248\u4e3atar\u6587\u4ef6\u5230d\u76d8 wsl &#8211;export &hellip; <a href=\"https:\/\/softbeam.net\/hobby\/?p=3015\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;WSL and Fedora 33&#8221;<\/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-3015","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/3015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3015"}],"version-history":[{"count":0,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=\/wp\/v2\/posts\/3015\/revisions"}],"wp:attachment":[{"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softbeam.net\/hobby\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}