Cài LEMP stack (Linux, Nginx, MariaDB, PHP) trên Windows thông qua WSL (Windows Subsystem for Linux) rất dễ dàng. Dưới đây là hướng dẫn từng bước, dành cho người dùng Windows 10/11 cài đặt Ubuntu trên WSL
Cài đặt trên VPS với Ubuntu 22.04
curl -o wordpress-manager.sh https://raw.githubusercontent.com/accnet/VPS/refs/heads/main/wootify-script.sh && \ chmod +x wordpress-manager.sh && \ sudo mv wordpress-manager.sh /usr/local/bin/wpmanager && \ echo "alias wpmanager='/usr/local/bin/wpmanager'" >> ~/.bashrc && \ source ~/.bashrc && \ wpmanager
Cài đặt Với Ubuntu 22.04 trên Windows với WSL
Để cài đặt Ubuntu 22.04 trên Windows bằng WSL (Windows Subsystem for Linux), bạn chỉ cần làm theo các bước sau. Hướng dẫn này áp dụng cho Windows 10 (bản 2004 trở lên) hoặc Windows 11.
Cài đặt WSL2 & Ubuntu
Mở PowerShell (admin):
wsl --install
Mở Microsoft Store, tìm Ubuntu 22.04
Sau khi cài đặt, khởi động lại máy.
Cài đặt wpmanager script
Chạy script
curl -o wordpress-manager.sh https://raw.githubusercontent.com/accnet/VPS/refs/heads/main/wordpress-manager.sh && \ chmod +x wordpress-manager.sh && \ sudo mv wordpress-manager.sh /usr/local/bin/wpmanager && \ echo "alias wpmanager='/usr/local/bin/wpmanager'" >> ~/.bashrc && \ source ~/.bashrc && \ wpmanager
——————————————————————————————————————
Khôi phục như mới mà không cần xóa và cài lại (reset thủ công)
# Xóa mọi gói đã cài thêm sudo apt-get purge $(comm -23 <(apt-mark showmanual | sort) <(gzip -dc /var/log/installer/initial-status.gz | awk '/^Package: / { print $2 }' | sort)) -y # Dọn dẹp hệ thống sudo apt autoremove -y sudo apt autoclean sudo apt clean # Reset cấu hình shell rm -rf ~/.bashrc ~/.profile ~/.bash_aliases ~/.zshrc ~/.config cp /etc/skel/.bashrc ~/ cp /etc/skel/.profile ~/