The following information will assist you with the installation of Alpine Linux.
- 1 Installation Quick-Start in 3 Easy Steps
- 2 Installation Handbook
- 3 Further Documentation
- 4 See Also
Installation Quick-Start in 3 Easy Steps
These steps are meant for x86_64 builds. For ARM, see Alpine on ARM
Now that Alpine is completely running from the media source, you can install it by running
Alpine can be used even when when its not the actual distribution in place. The installation is so minimal that it can be inserted within the filesystems of other Linux distributions, which can be useful for fixing a broken system. Alpine can even be installed without a DVD disk or a USB drive, unlike most other Linux distributions. However, the more exquisite the setup, the more complicated the installation procedure. Beginners probably want to look to the Alpine install manual for beginners for common installation cases (A Spanish version is available at https://mckayemu.github.io/alpineinstalls).
Overview of the Alpine installation process
- Like any Linux installation, begin by booting an "install/running medium" from an external device (CD/DVD, USB Drive, etc...). Storage devices or optical drives can also be the target medium to install into.
- There are three common setups for live Alpine systems:
- diskless mode: A read-only medium such as the installation CD/DVD, a USB drive or a Compact Flash card will store the system. This means that disk changes cannot be saved, and only exist in memory.
- data mode: This is similar to the disk-less mode above, but a writable partition (usually on a hard disk) is used to store /var.
- sys mode: This is the traditional hard-disk install; the original system and subsequent modifications are kept on a hard drive. Individual partitions for /boot, /, and swap are automatically created.
- The installation medium is in diskless mode, and
setup-alpinewill install the new system by copying files.
- When installing in sys mode, the post-installation procedure allows configuring a root password.
Requirements for Alpine
- A machine to install onto: Alpine supports phones, laptops, desktops, embedded, Raspberry Pis, Arduinos, etc.
- Most architecture, such as i386, amd64, arm, ppc, and x390.
- At least 100 MB of RAM is necessary. A complete desktop system can require up to 1 GB.
- For "sys" or "data" modes, a storage device is needed.
Media source to install and/or run
Those source "install/running" medium are downloaded from https://alpinelinux.org/downloads/; named "images", all the images will need network internet connection present and available except the image named `extended` due comes with minimal need packages but are x86/x64 based only.
To use those media files, must be dumped in a USB or burned into a CD/DVD, are "iso hybrid" that means can be just copied as "cd media.iso /dev/sdb", please check USB drive, or a Compact Flash card for details.
Booting the media source
After flash the USB media or burn a CD-ROM media, put the media source on respective drive bay of the computer and turn on the computer.
Select proper boot media, this depends on each computer device; by example on DELL's computers almost always are the `F12` key, press at the boot screen and when menu shows select the proper media, on the VirtualBox software are same `F12` key too, by hitting that key a boot selection media will be displayed, boot screen depends on each computer.
This document makes no sense which media was used after this step, rest of the document are same for all cases.
Configure and run the install process
More easy than you think, will just run as any other Linux, and ask for a login screen, just input "root" and then a console prompt will be show. Here just type and run the following commands to fast install automatically on ALL the hard disk of your computer device:
export BOOTLOADER=grub setup-alpine -f /root/autofile
A few questions will be asked, be care of questions and root password questions in the process due will be used later and must be mandatory.
- Keyboard map, such like us and variant of us-nodeadkeys for Canada or es and variant of es-winkeys for Spanish speaking users and Latin American people.
- Hostname: just push enter, it's the human computer name.
- Network options: will as the method to grap the internet connection in wired cases, just enter the suggested values, an network internet connection present are required in most cases.
- DNS options: recommended to use 22.214.171.124 and none for search domain
- Timezone options: just use the default values suggested.
- Proxy options: use "none" if you connect directly to the internet; this are a special filed that permits use the "proxy service" of your network, as to your admins.
- SSH options: use openssh, the default that comes with media.
- NTP options: use chrony, the default that comes with media.
- Mode: select "sys" to install as described previously.
- Disk options: the destination media to install, as we assumed are only one disk in the computer device, use "sda".
After a while, process starts and will format the hard disk device, this will make the disk layout as:
- `/dev/sda1` como BOOT en 500Mb en `/boot`
- `/dev/sda2` como SWAP en 4Gb
- `/dev/sda3` como ROOT en 200Gb en `/`
And then will copy files to your hard disk device, after a while the system will be installed.
Booting and using the new system
After process of coping files is completed, the installation media must be removed from the USB/CARD reader or CD/DVD bay of the computer
Then the new system can be booted by removing the boot media where was installed; after boot you must read Alpine post install packages and setup configurations for new users where you can follow steps to customize your new system.
- Alpine post install packages and setup configurations for new users
- Setting up Networking
- Package Management (apk) (How to add/remove packages on your Alpine)
- Alpine local backup (lbu) (Permanently store your modifications in case your box needs reboot)
- Init System (OpenRC) (Configure a service to automatically boot at next reboot)
- Setting up Xorg
- Setting up a ssh-server (Using ssh is a good way to administer your box remotely)
- setup-acf (Configures ACF (webconfiguration) so you can manage your box through https)
- Hosting services on Alpine(Links to several mail/web/ssh server setup pages)
- Changing passwords
- Setting the timezone (Not needed for the default musl- or uClibc-based installs)