Windows 部署宝塔面板完整教程
本文详细介绍在 Windows 系统下通过 WSL 部署宝塔面板的完整流程,包括安装、权限问题解决、常见错误处理以及完整卸载方法。
一、前言宝塔面板是一款简单好用的服务器管理面板,支持 Linux 和 Windows 系统。但在 Windows 上直接安装宝塔面板会有诸多限制,最佳实践是通过 WSL(Windows Subsystem for Linux)来部署,既能享受宝塔的完整功能,又不影响 Windows 系统的正常运行。
二、环境准备2.1 启用 WSL 功能首先,需要在 Windows 中启用 WSL 功能。以管理员身份打开 PowerShell,执行以下命令:
12# 启用 WSL 和虚拟机平台wsl --install
执行完毕后,重启计算机使配置生效。
2.2 安装 Ubuntu 发行版重启后,打开 Microsoft Store,搜索 Ubuntu,推荐安装 Ubuntu 22.04 LTS 或 Ubuntu 24.04 LTS。
安装完成后,首次启动会要求设置用户名和密码,请牢记此密码。
2.3 配置 WSL 为 root ...
Operation Log
Unread
OverviewThis document records the blog operation process from the beginning, including problems encountered, solutions, and experience summary.
Day 1: Blog Setup and First Deploy1.1 Environment ConfigurationLocal Environment:
OS: Windows 11
WSL: Ubuntu (WSL2)
Hexo Version: 8.1.1
Theme: anzhiyu
Blog Path: D:\2\blog-demo
Remote Environment:
GitHub Pages
Custom Image Host
1.2 Initial DeployFirst time deploying the blog:
1234cd D:\2\blog-demonpx hexo cleannpx hexo generatenpx hexo deploy
Resu ...
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
12345//本地预览hexo cl; hexo s//推送更新上线hexo cl; hexo g; hexo ...

