Installation: Difference between revisions

From Alpine Linux
(The page was difficult to read. It's easier now. I'm not done yet!)
(32 intermediate revisions by 17 users not shown)
Line 4: Line 4:


== Installation Quick-Start in 3 Easy Steps ==
== Installation Quick-Start in 3 Easy Steps ==
These steps are meant for x86_64 builds. For ARM, see [[Alpine_on_ARM|Alpine on ARM]]
<div style="float:left; font-size:30px; font-weight:bold;">
<div style="float:left; font-size:30px; font-weight:bold;">
1st
1st
</div>
</div>
<div style="margin-left:65px; background-color:#EDF2F2; border-style:solid; border-color:#6F7C91; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
<div style="margin-left:65px; background-color:#EDF2F2; border-style:solid; border-color:#6F7C91; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
[http://alpinelinux.org/downloads Download] the latest stable-release ISO.
[http://alpinelinux.org/downloads Download] one of the latest stable-release ISOs. Then compare the image's checksum to the one in the corresponding checksum file (<code>*.sha256</code>) and verify its GPG signature.
</div>
</div>


Line 16: Line 18:
</div>
</div>
<div style="margin-left:65px; background-color:#E0E9E9; border-style:solid; border-color:#606A82; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
<div style="margin-left:65px; background-color:#E0E9E9; border-style:solid; border-color:#606A82; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
[[Burning ISOs|Burn the ISO onto a blank CD]] using your favorite CD burning software.
If you have a CD drive from which you can boot, then [[Burning ISOs|burn the ISO onto a blank CD]] using your favorite CD burning software. Otherwise, [[Create a Bootable USB|create a bootable USB drive]].
</div>
</div>


Line 24: Line 26:
</div>
</div>
<div style="margin-left:65px; background-color:#9faecc; border-style:solid; border-color:#324065; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
<div style="margin-left:65px; background-color:#9faecc; border-style:solid; border-color:#324065; border-width:0px; border-left-width:5px; min-height:55px; padding:5px;">
Boot from the CD, login as root with no password, and voilà! Enjoy Alpine Linux!
Boot from the CD or USB drive, login as root with no password, and voilà! Enjoy Alpine Linux!
</div>
</div>


{{Clear}}
{{Clear}}
One of the [[Installation#Post-Install|first commands you might want to use]] is <code>[[setup-alpine]]</code>.


== Installation Handbook ==
Now that Alpine is completely running from the media source, '''you can install it''' by running <code>[[setup-alpine]]</code>.
=== Basics ===
 
Alpine can be used in any of three modes:
Before running <code>[[setup-alpine]]</code>, you may want to look at other '''use cases in the [[Alpine_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine install manual for beginners]]'''
<dl>
 
<dt>diskless mode
= Installation Handbook =
<dd>You'll boot from read-only medium such as the installation CD, a [[Create a Bootable USB|USB key]], or a [[Create a Bootable Compact Flash|Compact Flash card]]. {{Tip| To prepare either a USB or Compact Flash card, you can use the <code>[[setup-bootable]]</code> script; see the pages linked above for details.}} When you use Alpine in this mode, you need to use [[Alpine local backup|Alpine Local Backup (lbu)]] to save your modifications between reboots. That requires some writable medium, usually removable. {{Note| When the <code>[[setup-alpine]]</code> script asks for a disk, say "none". It will then prompt whether you'd like to preserve modifications on any writable medium.}}
 
<dt>data mode
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_newbie_install_manual#Ways_to_install_Alpine_into_machines_or_virtuals|Alpine install manual for beginners]] for common installation cases (A Spanish version is available at [https://mckayemu.github.io/alpineinstalls/ https://mckayemu.github.io/alpineinstalls]).
<dd>As in diskless mode, your OS is run from a read-only medium. However, here a writable partition (usually on a hard disk) is used to store the data in {{Path|/var}}. That partition is accessed directly, rather than copied into a tmpfs; so this is better-suited to uses where large amounts of data need to be preserved between reboots. {{Note| The <code>[[setup-alpine]]</code> script handles installing Alpine in this mode, too, when you supply a writable partition instead of "none", and request mode "data".}} This mode may be used for mailspools, database and log servers, and so on.
 
<dt>sys mode
== Overview of the Alpine installation process ==
<dd>This is a [[Install to disk|traditional hard-disk install]] (see link for details). <!-- includes [[Installing Alpine on HDD overwriting everything]] --> Both the boot system and your modifications are written to the hard disk, in a standard Linux hierarchy. {{Note| The <code>[[setup-alpine]]</code> script handles installing Alpine in this mode, too, when you supply a writable partition instead of "none", and request mode "sys". By default, it will create three partions on your disk, for {{Path|/boot}}, {{Path|/}}, and {{Path|swap}}; however you can also [[Setting up disks manually|partition your disk manually]].
 
}} This mode may be used for desktops, development boxes, and virtual servers.
# 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.
    <!-- [[Native Harddisk Install 1.6]] Obsolete -->
# There are '''three common setups for live Alpine systems''':
</dl>
## [[Alpine_newbie_install_manual#diskless_mode|diskless mode]]: A read-only medium such as the installation CD/DVD, a [[Create a Bootable USB|USB drive]] or a [[Create a Bootable Compact Flash|Compact Flash card]] will store the system. This means that disk changes cannot be saved, and only exist in memory.
## [[Alpine_newbie_install_manual#data_mode|data mode]]: This is similar to the disk-less mode above, but a writable partition (usually on a hard disk) is used to store {{Path|/var}}.
## [[Alpine_newbie_install_manual#sys_mode|sys mode]]: This is the traditional hard-disk install; the original system and subsequent modifications are kept on a hard drive. Individual partitions for {{Path|/boot}}, {{Path|/}}, and {{Path|swap}} are automatically created.
# The installation medium is in [[Alpine_newbie_install_manual#diskless_mode|diskless mode]], and <code>[[setup-alpine]]</code> will install the new system by copying files.
# When installing in [[Alpine_newbie_install_manual#sys_mode|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 [[Create a Bootable USB|USB drive]], or a [[Create a Bootable Compact Flash|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.
 
{{Note| This document assumes you will wipe out all the hard disk of your computer to complete use Alpine as the only and the main operating system, if you want more detailed cases see the wiki page [[Alpine_newbie_install_manual]].}}


=== Advanced ===
== Configure and run the install process ==
* [[Tutorials_and_Howtos#Storage|Setting up storage with RAID, LVM, LUKS encryption, iSCSI, or suchlike]]
* [[Setting up disks manually]]
* [[Bootmanagers]]
* [[Migrating data]]
* Details about [[Alpine setup scripts]]


* [[Installing Alpine on HDD dualbooting|Install to HDD with dual-boot]]
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:
* [[Replacing non-Alpine Linux with Alpine remotely]]
<!-- [[Installing Xubuntu using Alpine boot floppy]] Obsolete -->
<!-- [[Installing Alpine Linux on USB Automated]] Obsolete -->


<!-- If you edit the following, please coordinate with Developer_Documentation#Configuring_your_system.  Note that these two sections are not exact duplicates. -->
<pre><nowiki>
* [[Installing Alpine Linux in a chroot]]
export BOOTLOADER=grub


* Install Alpine on [[Install Alpine on VirtualBox|VirtualBox]], [[Install Alpine on VMware|VMware]], [[Install Alpine on coLinux|coLinux]], [[Qemu]], <!-- includes [[Install Alpine in Qemu]], [[Running Alpine in Qemu Live mode]], [[Running Alpine Linux As a QEMU networked Guest]] -->, [[Install Alpine on Amazon EC2|Amazon EC2]], or [[Install Alpine on Rackspace|RackSpace]]
setup-alpine -f /root/autofile
</nowiki></pre>


* [[Xen Dom0]] ''(Setting up Alpine as a dom0 for Xen hypervisor)''
A few questions will be asked, be care of questions and root password questions in the
* [[Xen Dom0 on USB or SD]]
process due will be used later and must be mandatory.
* [[Create Alpine Linux PV DomU]]
* 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.
* [[Xen LiveCD]]
* 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 8.8.8.8 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".


* [[Setting up a basic vserver]]
After a while, process starts and will format the hard disk device, this will make the disk layout as:
* [[Setting up the build environment on HDD]]
 
* [[Setting up a compile vserver]] for official or for [[Setting up a compile vserver for third party packages|third party]] packages
* `/dev/sda1` como BOOT en 500Mb en `/boot`
<!-- [[Create an Alpine 1.9 vserver template]] -->
* `/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_newbie_apk_packages|Alpine post install packages and setup configurations for new users]] where you can follow steps to customize your new system.
 
= Further Documentation =


=== Post-Install ===
=== Post-Install ===
<!-- If you edit this, please coordinate with and Tutorials_and_Howtos#Post-Install and Developer_Documentation#Package_management. Note that these three sections are not exact duplicates. -->
<!-- If you edit this, please coordinate with and Tutorials_and_Howtos#Post-Install and Developer_Documentation#Package_management. Note that these three sections are not exact duplicates. -->


* [[Alpine_newbie_apk_packages|Alpine post install packages and setup configurations for new users]]
<!-- [[Configure Networking]] -->
<!-- [[Configure Networking]] -->
* [[Tutorials_and_Howtos#Networking|Setting up Networking]]
* [[Tutorials_and_Howtos#Networking|Setting up Networking]]
Line 79: Line 122:
   <!-- [[Alpine Linux package management#Local_Cache|How to enable APK caching]] -->
   <!-- [[Alpine Linux package management#Local_Cache|How to enable APK caching]] -->
* [[Alpine local backup|Alpine local backup (lbu)]] ''(Permanently store your modifications in case your box needs reboot)''
* [[Alpine local backup|Alpine local backup (lbu)]] ''(Permanently store your modifications in case your box needs reboot)''
** [[Back Up a Flash Memory Installation]]
** [[Back Up a Flash Memory Installation|Back Up a Flash Memory ("diskless mode") Installation]]
** [[Manually editing a existing apkovl]]
** [[Manually editing a existing apkovl]]
* [[Alpine Linux Init System|Init System (OpenRC)]] ''(Configure a service to automatically boot at next reboot)''
* [[Alpine Linux Init System|Init System (OpenRC)]] ''(Configure a service to automatically boot at next reboot)''
** [[Multiple Instances of Services]]
** [[Multiple Instances of Services]]
   <!-- [[Writing Init Scripts]] -->
   <!-- [[Writing Init Scripts]] -->
* [[Alpine setup scripts#setup-xorg-base|Setting up Xorg]]


* [[Upgrading Alpine]]
* [[Upgrading Alpine]]
Line 99: Line 143:


<!-- [[Running glibc programs]] Installation and Dev -->
<!-- [[Running glibc programs]] Installation and Dev -->
* [[Setting the timezone]] ''(Not needed for the default musl- or uClibc-based installs)''


=== Install based on eglibc ===
* [[Setting up a new user]]
* [[Setting the timezone]]


=== Further Help and Information ===
=== Further Help and Information ===
* [[FAQ|FAQs]]
* [[FAQ|FAQs]]
* [[Tutorials and Howtos]]
* [[Tutorials and Howtos]]
* [[Contribute|How to Contribute]]
* [[Contribute|How to Contribute]]
* [[Developer Documentation]]
* [[Developer Documentation]]
= See Also =
# [[Newbie_Alpine_Ecosystem]]
# [[Alpine newbie install manual]]
# [https://mckayemu.github.io/alpineinstalls/ https://mckayemu.github.io/alpineinstalls/ All informatin for Spanish users]


[[Category:Installation]]
[[Category:Installation]]

Revision as of 10:36, 25 February 2020

The following information will assist you with the installation of Alpine Linux.


Installation Quick-Start in 3 Easy Steps

These steps are meant for x86_64 builds. For ARM, see Alpine on ARM

1st

Download one of the latest stable-release ISOs. Then compare the image's checksum to the one in the corresponding checksum file (*.sha256) and verify its GPG signature.


2nd

If you have a CD drive from which you can boot, then burn the ISO onto a blank CD using your favorite CD burning software. Otherwise, create a bootable USB drive.


3rd

Boot from the CD or USB drive, login as root with no password, and voilà! Enjoy Alpine Linux!


Now that Alpine is completely running from the media source, you can install it by running setup-alpine.

Before running setup-alpine, you may want to look at other use cases in the Alpine install manual for beginners

Installation Handbook

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

  1. 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.
  2. There are three common setups for live Alpine systems:
    1. 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.
    2. 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.
    3. 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.
  3. The installation medium is in diskless mode, and setup-alpine will install the new system by copying files.
  4. 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.

Note: This document assumes you will wipe out all the hard disk of your computer to complete use Alpine as the only and the main operating system, if you want more detailed cases see the wiki page Alpine_newbie_install_manual.

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 8.8.8.8 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.

Further Documentation

Post-Install

Further Help and Information

See Also

  1. Newbie_Alpine_Ecosystem
  2. Alpine newbie install manual
  3. https://mckayemu.github.io/alpineinstalls/ All informatin for Spanish users