云服务器安装 AlpineLinux 系统(第三方LiveCD版)
各大云厂商提供了种类繁多的系统镜像,但唯独这个小巧可爱的Alpine无人问津。不过也难不倒咱们这些具有折腾精神的极客们。
本教程支持且不限于阿里云、腾讯云、微软云、谷歌云。
1、重置为Debian10
系统,通过VNC/Console
登录服务器控制台
2、由于AlpineLinux
无法作为LiveCD
启动,故使用TinyCoreLinux
作为中介
apt install -y grub-imageboot
mkdir /boot/images && cd /boot/images
wget http://tinycorelinux.net/13.x/x86/release/Core-current.iso
update-grub2
reboot
3、选择从TinyCoreLinux
启动,然后将AlpineLinux
安装盘写入硬盘
wget -O- http://dl-cdn.alpinelinux.org/alpine/v3.15/releases/x86_64/alpine-virt-3.15.0-x86_64.iso | dd of=/dev/vda
reboot
4、将安装文件复制到内存中(防止系统磁盘无法使用)
tar cf /sys.tar /.modloop /media/vda
/etc/init.d/modloop stop
umount /dev/vda
tar xf /sys.tar -C /
5、执行安装脚本,接下来就需要看你自己的啦~
setup-alpine
其他安装方法
- 从网络安装 https://www.rehiy.com/post/439
- 直接从ISO安装 https://www.rehiy.com/post/307
AlpineLinux 国内镜像
- 南京大学 http://mirrors.nju.edu.cn/alpine/
- 清华大学 https://mirrors.tuna.tsinghua.edu.cn/alpine/
- 中国科学技术大学 http://mirrors.ustc.edu.cn/alpine/
sed -i 's/dl-cdn.alpinelinux.org/mirrors.nju.edu.cn/g' /etc/apk/repositories