Download
https://www.alpinelinux.org/downloads/
Check the image with sha256sum
.
sha256sum -c alpine-standard-3.12.0-x86_64.iso.sha256
Check the image with GPG.
wget https://www.alpinelinux.org/keys/ncopa.asc
gpg2 --import ncopa.asc
gpg2 --verify alpine-standard-3.12.0-x86_64.iso.asc
Install
- Boot the image.
- Login as
root
. - Run
setup-alpine
. - Keyboard, hostname, network, timezone, proxy, NTP, mirrors, SSH.
- To setup the storage choose the disk and select
sys
for using the entire drive as system storage. - Reboot.
A diskless mode is available.
https://wiki.alpinelinux.org/wiki/Tutorials_and_Howtos#Post-Install https://wiki.alpinelinux.org/wiki/Alpine_newbie_apk_packages
Manual network via iproute2
Add an IP
ip addr add 10.0.0.2/24 dev eth0
ip addr add 10.0.0.2 mask 255.255.255.0 dev eth0
Bring up the interface
ip link set eth0 up
Add a route
ip route add default via 10.0.0.1 dev eth0
ip route add 0.0.0.0/0 via 10.0.0.1 dev eth0
Add a DNS server
echo "nameserver 1.1.1.1" > /etc/resolv.conf
Test
ping alpinelinux.org
Network via ifupdown
vim /etc/network/interfaces
---
auto eth0
allow-hotplug eth0
iface eth0 inet static
address 10.0.12.30/24
gateway 10.0.12.1
dns-nameservers 1.1.1.1 8.8.8.8
pre-up echo "search home.local\nnameserver 1.1.1.1\nnameserver 8.8.8.8" > /etc/resolv.conf
#post-down ifconfig $IFACE down
echo -e "\n" | setup-dns 8.8.8.8
rc-service networking restart
Manually setup repos
setup-apkrepos
apk package manager
List installed packages
pkg list -I
Packages contents
pkg info -L <package>
Add community repo
vim /etc/apk/repositories
---
http://mirror.domain.com/alpine/v3.16/community
Other
apk add terminus-font
ls -la /usr/share/consolefont
setfont /usr/share/consolefonts/ter-132n.psf.gz
echo 'consolefont="ter-132n.psf.gz"' >> /etc/conf.d/consolefont
rc-update add consolefont boot
rc-service consolefont start