AlpineQuickNotes - henk52/knowledgesharing GitHub Wiki
Alpine Linux Quick Notes
Installation
Adding Edge repo
See: https://wiki.alpinelinux.org/wiki/Edge
Running scap in an Alpine docker image
You need at least Alpine 3.10 to install openscap.
Getting an XML file See: https://nvd.nist.gov/ncp/checklist/769/download/2284
- http://dl-cdn.alpinelinux.org/alpine/v3.10/main
- vi /etc/apk/repositories
- wget https://github.com/OpenSCAP/scap-security-guide/releases/download/v0.1.33/scap-security-guide-0.1.33.zip
- unzip scap-security-guide-0.1.33.zip
- oscap oval eval --results tst.xml scap-security-guide-0.1.33/ssg-centos7-ds.xml
http://dl-cdn.alpinelinux.org/alpine/v3.10/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
http://dl-cdn.alpinelinux.org/alpine/edge/testing
Building
multicast
Building mrouted
- wget https://github.com/troglobit/mrouted/releases/download/4.0/mrouted-4.0.tar.gz
- wget https://github.com/troglobit/mrouted/releases/download/4.0/mrouted-4.0.tar.gz.md5
- https://github.com/troglobit/mrouted/releases/download/4.0/mrouted-4.0.tar.gz.md5
- tar -xf mrouted-4.0.tar.gz
- cd mrouted-4.0
- ./configure --prefix=/usr
- make -j5
Building mcjoin
- get the tar
- docker run -it alpine sh
- docker cp mcjoin-2.6.tar.xz pedantic_saha:/artifacts
- in docker
- apk add g++
- tar -xf mcjoin-2.6.tar.xz
- cd mcjoin-2.6
- ./configure --prefix=/usr
- make -j5
- outside:
- docker cp pedantic_saha:/artifacts/mcjoin-2.6/src/mcjoin .
Installation
package management
See: https://wiki.alpinelinux.org/wiki/Alpine_Linux_package_management
- apk fetch
Installing alpine in a VM
See: https://wiki.alpinelinux.org/wiki/Installation
- Boot from cd-rom
- login as root
- run: setup-alpine
- disk:
- sda
- sys
Installing a router
- apk add vlan
- modprobe 8021q
Troubleshooting
Troubleshooting pkg installation
http://dl-cdn.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature
ERROR:Fix: apk add -X https://dl-cdn.alpinelinux.org/alpine/v3.16/main -u alpine-keys
See:
- https://alpinelinux.org/posts/Alpine-edge-signing-keys-rotated.html
- https://gitlab.alpinelinux.org/alpine/aports/-/issues/14043
Step 3/5 : RUN apk add wabt --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
---> Running in 7a5391f77a55
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
ERROR: http://dl-cdn.alpinelinux.org/alpine/edge/testing: UNTRUSTED signature
WARNING: Ignoring http://dl-cdn.alpinelinux.org/alpine/edge/testing: No such file or directory
ERROR: unable to select packages:
wabt (no such package):
required by: world[wabt]
The command '/bin/sh -c apk add wabt --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing' returned a non-zero code: 1
make: *** [Makefile:2: all] Error 1
Troubleshooting networking
Troubleshooting networking interfaces
nic does not come up after running service networking restart
It turns out there has to be an 'auto INTERFACE' in the /etc/networking/interfaces e.g. auto eth1
OpenScap
scap-docker
Compiling
configure: error: C compiler cannot create executables
apk add g++