Skip to content

Instantly share code, notes, and snippets.

@gilleyj
Created August 29, 2021 00:10
Show Gist options
  • Save gilleyj/14a514ac49d232756a74ea96556d47ac to your computer and use it in GitHub Desktop.
Save gilleyj/14a514ac49d232756a74ea96556d47ac to your computer and use it in GitHub Desktop.
Alpine Linux Install
Assuming 64bit x86 architecture (most common), download the "Standard" x86_64 from here:
https://alpinelinux.org/downloads/
Direct Link:
https://dl-cdn.alpinelinux.org/alpine/v3.14/releases/x86_64/alpine-standard-3.14.2-x86_64.iso
It's a very small iso, <200MB.
Booting should be quick in a VM and it'll prompt you to `login:`
Login with `root`, it will not ask for a password. next you will want to run `setup-alpine`. I'll follow this
with the questions and most obvious answers, assume no quotes and to hit enter after the answer unless otherwise noted:
1. Available Keyboard Layouts (and a big list)
- type "us"
2. Select Variant or abort:
- type "us"
3. System Hostname:
- "localhost" <= this is fine but you can name it anything you want "mqtt-poc-01" might be a good alternative
4. Available Interfaces are : eth0 (or some logical variant)
- just hit enter to accept the default, this assumes the first logical interface that exists
5. Ip address for eth0?
- we want to use dhcp as it is the simplest setup and should be the default
6. Any manual network configuration?
- "n" we do not
At this point it should send a DHCP discover packet and get an IP. no worries if this takes a moment.
7. change root password:
- type a secret root password here twice
8. what timezone are you in?
- "UTC"
9. HTTP/FTP Proxy URL?
- "none"
10. Which NTP client to run?
- "chrony"
11. It will list a WHOLE bunch of mirrors and ask which to use:
- "1"
12. which ssh server?
- "openssh"
13. it will list whatever partitions/disks that it has available, and ask which to install on. The default here is "none"
- "sda" <= so we want to choose the first logical partition available to install
14. how would you like to use it?
- "sys"
15. next it will ask to erase the disk and continue
- "y"
it will go off and format the disk and install the system on it.
now... "reboot". don't forget to remove the iso as the boot drive if you still have it.
Once you have rebooted, log in as `root` with the password you set above.
first lets update the system with `apk update` and press enter
next lets update any packages with `apk upgrade` and press enter
Now lets install a couple required packages with `apk add sudo` and press enter, and Y to any questions that follow
add a user, if you wanted to add gilleyj as a user you'd type `adduser -g gilleyj gilleyj` and press enter
followed by a password.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment