ãã®ãã¼ã¸ã¯ä»¥ä¸ã«ç§»åãã¾ããã
https://github.com/rfriends/rfriends_wsl/wiki
Â
ãWindows ãµãã·ã¹ãã (WSL) ã§ã¯ç°¡åã«Ubuntuãå©ç¨ã§ãã¾ããããã«rfriendsãã¤ã³ã¹ãã¼ã«ãã¦ã©ã¸ãªé²é³ã楽ãããã¨ããä¼ç»ã§ãã
åçï¼2024/11/15
æ¹çï¼2024/12/14
ï¼ï¼ã·ã¹ãã è¦ä»¶
ãPCãWindows 10 22H2以ä¸ãã¾ãã¯ãWindows 11ã§ãããã¨ã
ãã¾ã¾ã§ãWSLãå
¨ãã¤ã³ã¹ãã¼ã«ãã¦ããªãç°å¢ã§ãããã¨ã
Â
ãä»å¾å¯¾å¿ç¯å²ãåºãã¦ããã¾ãããã¾ãã¯ä¸è¨ã®å¶éãè¨ãã¾ãã
ãã§ã«wslãã¤ã³ã¹ãã¼ã«æ¸ã®ç°å¢ã§ãã»ã¼åé¡ãªãã¨ã¯ãããã¾ããã
Â
ï¼ï¼æºå
ï¼ï¼PCã®biosã§ä»®æ³åãæå¹ã«ããã
ï¼ï¼Windows Updateã§ã·ã¹ãã ãææ°ã«ããã
ãææ°ã§ãªãã¨ãã¤ã³ã¹ãã¼ã«ã«å¤±æãããã¨ãããã¾ãã
ãã·ã¹ãã ãææ°ã«ããã®ãä¸å®ãªæ¹ã¯ã¤ã³ã¹ãã¼ã«ãä¸æ¢ãã¦ãã ããã
Â
以ä¸ãæ··ä¹±ããã¡ãªã®ã§
PowerShellã®æ㯠PS>
Ubuntuã®ã¿ã¼ããã«æã¯ã$Â
ã¨ãã¾ãã
ã¾ããwslãå®è¡ãã¦ããPCã"ãã¹ãPC"ãwslä¸ã§å®è¡ãã¦ããLinuxãåã«"Ubuntu"ã¨ãã¾ãã
ï¼ï¼wslã¨ubuntuã®ã¤ã³ã¹ãã¼ã«
3.1 wslã®ã¤ã³ã¹ãã¼ã«
PowerShell(管çè
)ãèµ·åãã以ä¸ã®ã³ãã³ããå®è¡ãã¾ãã( - ã¯2å)
PS> wsl --update
PS> wsl --install
Â
Â
ä¸æ¦ãWindowsãåèµ·åãã¦ãã ããã
3.2 ubuntuã®ã¤ã³ã¹ãã¼ã«
åèµ·åããã¨ãèªåçã«ubuntuã®ã¤ã³ã¹ãã¼ã«ãå§ã¾ãã¾ãã
ã¤ã³ã¹ãã¼ã«ã®çµäºãå¾
ã¡ã¾ãã
ã¦ã¼ã¶ã¼ã®ä½æãä¿ãããã®ã§ãuser/passwordãå
¥åãã¦ãã ããã
Ubuntu ã¯æ¢ã«ã¤ã³ã¹ãã¼ã«ããã¦ãã¾ãã
Ubuntu ãèµ·åãã¦ãã¾ã...
(ç¥)
Enter new UNIX username: user
New password:
Retype new password:
(ç¥)
Welcome to Ubuntu 24.04.1 LTSÂ
Â
WSLã¨Ubuntuã®ã¤ã³ã¹ãã¼ã«ã¯ããã§å®äºã§ãã
3.3 ã¤ã³ã¹ãã¼ã«çµæã®ç¢ºèª
ã¤ã³ã¹ãã¼ã«ãæ£ããè¡ããã¦ãããã確èªãã¾ãã
PowerShell(管çè
)ãèµ·åãããã¤Ubuntuã®ã¿ã¼ããã«ãéããç¶æ
ã«ãã¦ãã ããã
Â
ï¼ï¼PowerShellã«ä»¥ä¸ã®ã³ãã³ããå
¥åãã¾ãã
PS> wsl --version
WSL ãã¼ã¸ã§ã³: 2.3.26.0
(ç¥)
Windows ãã¼ã¸ã§ã³: 10.0.19045.5131
2024/11/16 æç¹ã§ã2.3.26.0 ã§ãã
Â
2ï¼PowerShellã«ä»¥ä¸ã®ã³ãã³ããå
¥åãã¾ãã
PS> wsl -l -v
NAME Â Â Â STATE Â Â Â Â Â VERSION
* Ubuntu   Running     2
wsl version2ã§Ubuntuãå®è¡ããã¦ãã¾ãã
Â
3ï¼Ubuntuã®ã¿ã¼ããã«ã«ä»¥ä¸ãå
¥åãã¾ãã
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
(以ä¸ç¥)
Ubunutu 24.04 ãå®è¡ããã¦ãã¾ãã
Â
4ï¼Ubuntuã®ã¿ã¼ããã«ã«ä»¥ä¸ãå
¥åãã¾ãã
$ df
Â
C:\ ã /mnt/c ã«ãã¦ã³ãããã¦ãã¾ãããã¼ã¸ã§ã³ã«ãã£ã¦ã¯/media/c ã®å ´åãããã¾ãããã®å ´åã¯rfriendsã®é²é³ãã£ã¬ã¯ããªã®å¤æ´ãå¿
è¦ã§ãã
Â
4ï¼Ubuntuã®ã¿ã¼ããã«ã«ä»¥ä¸ãå
¥åãã¾ãã
systemdãæå¹ã«ãªã£ã¦ãããã©ããããããã¾ãã
$ cat /etc/wsl.conf
[boot]
systemd = true
Â
wsl.confã®å
容ãä¸è¨ã¨éãå ´åãã¾ãã¯ãã¡ã¤ã«ãåå¨ããªãå ´åã¯ãããã§ã¤ã³ã¹ãã¼ã«ãä¸æ¢ãã¦ç°å¢ã®è¦ç´ããè¡ã£ã¦ãã ããã
Â
ï¼ï¼rfriends3ã®ã¤ã³ã¹ãã¼ã«
4.1 ã¤ã³ã¹ãã¼ã«
ã¿ã¹ã¯ãã¼ã®æ¤ç´¢çªã«ubuntuã¨å
¥åãã¦ã¤ã³ã¹ãã¼ã«ããUbuntuãéãã以ä¸ãå
¥åãã¾ãã
ã以ä¸ã® a) ã¾ã㯠b) ã®æ¹æ³ãå®æ½ãã¦ãã ãããå°æ¥ã¯ b) ã«ç§»è¡ãã¾ãããç¾å¨ã¯ a) ã®ã»ããå®å®ãã¦ãã¾ãã
a) å¾æ¥ã®ããæ¹
$ sudo apt update && sudo apt upgrade -y
$ sudo apt install unzip -y
$ wget http://rfriends.s1009.xrea.com/storage/rfriends3_wsl_full.zip
$ unzip rfriends3_wsl_full.zip
$ cd rfriends3_wsl_full
$ sh rfriends3_wsl_full.sh
b) githubãçµç±ããããæ¹
$ cd ~/
$ sudo apt install -y git
$ git clone https://github.com/rfriends/rfriends_wsl.git
$ cd rfriends_wsl
$ sh rfriends3_wsl.sh
4.2 ã¤ã³ã¹ãã¼ã«çµäº
(éä¸ç¥)
ip address is lo UNKNOWN 127.0.0.1/8 eth0 UP 172.19.148.3/20 .
visit rfriends at http://xxx.xxx.xxx.xxx:8000
finished
Â
finishedã¨è¡¨ç¤ºããã¦ã¤ã³ã¹ãã¼ã«ã¯å®äºã§ãã表示ãããIPã¢ãã¬ã¹ãã¡ã¢ãã¦ãã ãããããã§ã¯ã172.19.148.3 ã§ãã
次ã«ãubuntuãçµäºãã¾ãã
PS> wsl --shutdown
Â
ï¼ï¼rfriends3ã®è¨å®
5.1 Ubuntuã®å®è¡
ã¿ã¹ã¯ãã¼ã®æ¤ç´¢ããã¯ã¹ã«"ubuntu"ã¨å
¥åãã¦Ubuntu ãå®è¡ãã¾ãã
5.2 rfriends3ã®Webãµã¼ãã¸ã®ã¢ã¯ã»ã¹
ã4.ã§ã¡ã¢ãããIPã¢ãã¬ã¹ã使ã£ã¦rfriends3ã«ã¢ã¯ã»ã¹ãã¾ãã
ãã¹ãï¼°ï¼£ããWEBãã©ã¦ã¶ï¼chrome,edge,firefoxçï¼ã§ä¸è¨ã§è¡¨ç¤ºããã
xxx.xxx.xxx.xxx:8000
ã¨å
¥åãã以ä¸ã®ãããªç»é¢ãåºããæåã§ããããã¯ãã¼ã¯ããã¨ä¾¿å©ã§ãã
5.3 rfrirnds3ãææ°ã«ã¢ãããã¼ã
ãã«ã - ã·ã¹ãã æ´æ°(SYS)
ã«ãããrfriends3ãéçºçï¼1.1.2-a03以ä¸ï¼ã«updateãã¾ãã
以éããã¼ã¸ã§ã³ã«ããã¡ãã¥ã¼çªå·ãç°ãªã£ã¦ããå¯è½æ§ãããã¾ãã
5.4 ãã¤ãªã¼å¦çã®ç»é²
ã¹ãªã¼ããåæã¨ããPCã®å ´åã¯ãã¤ãªã¼å¦çã®ç»é²ã¯è¡ããªãã§ãã ããã
Â
è¨å® - å®æå®è¡ - ç»é²
ãé¸æããcrontabç»é²ãã¯ãªãã¯ãã¾ããããã«ãããæå®ããæå»ã«äºç´ã»é²é³ãã§ããããã«ãªãã¾ãã
ãWindowsã®å ´åã24æé稼åãæ³å®ãã¦ããªããã¨ãå¤ãã®ã§ãããã«ã¹ãªã¼ãããªãè¨å®ãå¿
è¦ã§ãã
Â
ãã¹ãPC - è¨å® > ã·ã¹ãã > é»æº > ç»é¢ããã³ã¹ãªã¼ãã®ã¿ã¤ã ã¢ã¦ã
次ã®æéã®çµéå¾ã«ããã¤ã¹ãã¹ãªã¼ãç¶æ
ã«ãã - ãªã
Â
6ï¼ç¢ºèªãã¹ã
Timefree - é²é³ã»è´å
ã§ãï¼ï¼ï¼å試ãã«é²é³ãã¦ã¿ã¦ãã ããã
ãé²é³ãçµäºãããããã¹ãPCã®ãã£ã¬ã¯ããªC:\rf3\usrãåç
§ãã¦ãã ãããé²é³ãããã¡ã¤ã«ãtimefree以ä¸ã«è¦ã¤ããã¨ãããã¾ãã
ã以ä¸ã§ãrfriendsã®ã¤ã³ã¹ãã¼ã«ã¯çµäºã§ãã
ï¼ï¼ãã®ä»
7.1 å¤é¨PCããã®webã¢ã¯ã»ã¹
ãåä¸LANå
ã®å¤é¨PCããrfriendsã¸ã®ã¢ã¯ã»ã¹ãè¡ãããã®è¨å®ã¯ä»¥ä¸ã®ã¨ããã§ããé常ã¯ããã®è¨å®ã¯è¡ããªãã»ããããã¨æãã¾ãã
Â
ãå¤é¨PCããWebã¢ã¯ã»ã¹ããããã«ã¯ä»¥ä¸ã®2ã¤ã®è¨å®ãå¿
è¦ã«ãªãã¾ãã
Â
ï¼ï¼ãã¹ãPCã®firewallã®è¨å®ã§ããã¼ã8000ãéæ¾ããã
ããã¹ãPCã§"ã»ãã¥ãªãã£ãå¼·åãããWindows Defender ãã¡ã¤ã¢ã¦ã©ã¼ã«"
ãéãã¾ãã
åä¿¡ã®è¦å - ãã¼ã - 次㸠- ç¹å®ã®ãã¼ã«ã«ãã¼ã 8000 - æ¥ç¶ã許å¯ãã - 次㸠-ãã©ã¤ãã¼ã -次㸠- ååãå
¥åã㦠- å®äº
Â
ï¼ï¼ãã¹ãPC ->Ubuntu ã¸ã®ãã¼ããã©ã¯ã¼ãã£ã³ã°ãè¨å®ããã
PS> netsh.exe interface portproxy add v4tov4 listenaddress=ï¼å¤é¨PCã®ipã¢ãã¬ã¹ï¼listenport=8000 connectaddress=ï¼ãã¹ãPCã®ipã¢ãã¬ã¹ï¼ connectport=8000
ï¼ï¼æå¾ã«
ãããè¯ããã®ã«ããããã«ããã°å ±åã»æ¹åææ¡çããå¾
ã¡ãã¦ãã¾ãã
ã§ã¯ãç´ æµãªã©ã¸ãªã©ã¤ããï¼
Â
以ä¸