跳转至

Alpine is a lightweight & safe server system.

Install System

Download: https://alpinelinux.org/downloads/

Bash
1
2
3
# Boot into CD live system and execute this command
# Then the installation wizard will appear
setup-alpine

Install Packages

Set source:

Bash
1
2
3
4
5
6
7
8
vim /etc/apk/repositories
---
#/media/cdrom/apks
http://mirrors.aliyun.com/alpine/v3.15/main
http://mirrors.aliyun.com/alpine/v3.15/community
http://mirrors.aliyun.com/alpine/edge/main
http://mirrors.aliyun.com/alpine/edge/community
#http://mirrors.aliyun.com/alpine/edge/testing

Apk:

Bash
1
2
3
4
# Install a package
apk add <package-name>
# Update db
apk update

Install zsh & OhMyZsh

Bash
1
2
3
apk add zsh
vim /etc/passwd
root:x:0:0:root:/root:/bin/zsh
Bash
1
2
3
4
# Install OhMyZsh
git clone https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git
cd ohmyzsh/tools
REMOTE=https://mirrors.tuna.tsinghua.edu.cn/git/ohmyzsh.git sh install.sh

Service Management

Bash
1
2
3
4
# Start a service
systemctl <service-name>  start
# Enable autostart
rc-update add <service-name>