
debian12 虚拟机安装 + 博客相册恢复

1. 博客相册挂了
原来的虚拟机寄了,博客相册跑在上面,跟着寄了,重新整一个
2. 镜像下载
https://cdimage.debian.org/debian-cd/current/amd64/iso-dvd/
3. 创建虚拟机
4. debian12 系统安装
5. 连接 debian 虚拟机
ip地址
修改配置
1 | su root |
允许 root 登录
1 | PermitRootLogin yes |
使修改生效
1 | systemctl restart sshd |
登录测试
6. 修改密码
1 | passwd |
7. 时区
1 | 检查时区 |
8. 常用 apt、zsh 配置
修改 apt 源
https://gist.github.com/hakerdefo/5e1f51fa93ff37871b9ff738b05ba30f
1 | cat > /etc/apt/sources.list << EOF |
或者使用清华源
https://mirrors.tuna.tsinghua.edu.cn/help/debian/
1 | cat > /etc/apt/sources.list << EOF |
更新
注:如果网络无法连到 debian 镜像源,导致 apt 更新慢,可以使用代理访问;操作参考 http://blog.megumiai.com/2024/10/21/deploy/服务器代理方法/#2-1-全局环境变量
1 | export ALL_PROXY="http://localhost:7890" |
安装软件
1 | apt install curl vim wget zsh git net-tools tree btop \ |
9. 安装 docker
1 | 加入 Docker 的 GPG 公钥和 apt 源(国内清华源) |
10. 安装 alist
官方手册: https://alist.nn.ci/zh/guide/install/docker.html#docker-compose
1 | mkdir -p /opt/alist |
注:如果镜像拉不下来,要配置 dockerd 代理,可以参考 服务器代理方法 2.2.2 docker
默认用户名 admin
初始密码查看 docker 日志,有打印
添加存储
存储
访客可见目录配置
开无痕窗口测试一下访客查看的效果,成功
11. rathole 代理 alist
1 | 创建目录 |
客户端 rathole.service 内容
1 | [Unit] |
client.toml 内容
1 | client.toml |
server.toml 内容
1 | server.toml |
nginx.conf 内容
1 | photos.megumiai.com 的 HTTPS 配置 |
测试
完成 ✅
- Title: debian12 虚拟机安装 + 博客相册恢复
- Author: sound_kanade
- Created at : 2024-10-30 00:12:00
- Updated at : 2025-01-22 14:43:14
- Link: https://blog.megumiai.com/deploy/debian12_vmware_blog_photos_recovery.html
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments