在win10上用wsl通过docker安装并启动elasticsearch
安装wsl2
1. 启用子系统和虚拟机功能,然后重启
Win+x 管理员打开PowerShell,并运行:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
2. 下载Linux内核更新包并安装
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi
3. 设置wsl默认版本为 2
wsl --set-default-version 2
3.1 查看wsl版本和状态
wsl -l -v
4. 安装Ubuntu
打开Microsoft Store,搜索ubuntu并安装,启动。