Alpine Linux
Alpine Linux
Post configuration
MariaDB
Installation d'Alpine Linux
Récupérer l'ISO sur le site d'Alpine :
https://www.alpinelinux.org/downloads/
Installation
localhost:~# setup-
localhost:~# setup-alpine
Choix du clavier
af at be by cn dz fi ge hu in it kr lk md mm nl pl ru sy tr uz
al az bg ca cz ee fo gh id iq jp kz lt me mt no pt se th tw vn
am ba br ch de epo fr gr ie ir ke la lv mk my ph ro si tj ua
Available variants: fr-afnor fr-azerty fr-bepo fr-bepo_afnor fr-bepo_latin9 fr-bre fr-dvorak fr-geo fr-latin9 fr-
Configuration du hostname
Enter system hostname (short form, e.g. 'foo') [localhost]: alpine
Configuration du réseaux
Comme je suis une grosse feignasse, je laisse en dhcp
Which one do you want to initialize? (or '?' or 'done') [eth0] eth0
New password:
Retype password:
Fuseau horaire
Which timezone are you in? ('?' for list) [UTC] Europe/Paris
Available mirrors:
1) dl-cdn.alpinelinux.org
2) uk.alpinelinux.org
3) dl-2.alpinelinux.org
4) dl-4.alpinelinux.org
5) dl-5.alpinelinux.org
6) dl-8.alpinelinux.org
7) mirror.yandex.ru
8) mirrors.gigenet.com
9) mirror1.hs-esslingen.de
10) mirror.leaseweb.com
11) mirror.fit.cvut.cz
12) alpine.mirror.far.fi
13) alpine.mirror.wearetriple.com
14) mirror.clarkson.edu
15) linorg.usp.br
16) ftp.yzu.edu.tw
17) mirror.aarnet.edu.au
18) speglar.siminn.is
19) mirrors.dotsrc.org
20) ftp.halifax.rwth-aachen.de
21) mirrors.tuna.tsinghua.edu.cn
22) mirrors.ustc.edu.cn
23) mirrors.xjtu.edu.cn
24) mirrors.nju.edu.cn
25) mirror.lzu.edu.cn
26) ftp.acc.umu.se
27) mirror.xtom.com.hk
28) mirror.csclub.uwaterloo.ca
29) alpinelinux.mirror.iweb.com
30) mirror.neostrada.nl
31) pkg.adfinis-sygroup.ch
32) mirror.ps.kz
33) mirror.rise.ph
34) mirror.operationtulip.com
35) mirrors.ircam.fr
36) alpine.42.fr
37) mirror.math.princeton.edu
38) mirrors.sjtug.sjtu.edu.cn
39) alpine.mirror.didstopia.com
40) ftp.icm.edu.pl
41) mirror.ungleich.ch
42) alpine.mirror.vexxhost.ca
43) sjc.edge.kernel.org
44) ewr.edge.kernel.org
45) ams.edge.kernel.org
46) download.nus.edu.sg
47) alpine.yourlabs.org
48) mirror.pit.teraswitch.com
49) mirror.reenigne.net
0.11 http://dl-cdn.alpinelinux.org/alpine/
0.05 http://uk.alpinelinux.org/alpine/
0.19 http://dl-2.alpinelinux.org/alpine/
0.06 http://dl-4.alpinelinux.org/alpine/
0.05 http://dl-5.alpinelinux.org/alpine/
0.1 http://dl-8.alpinelinux.org/alpine/
0.1 http://mirror.yandex.ru/mirrors/alpine/
0.23 http://mirrors.gigenet.com/alpinelinux/
0.06 http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/
0.07 http://mirror.leaseweb.com/alpine/
0.08 http://mirror.fit.cvut.cz/alpine/
0.11 http://alpine.mirror.far.fi/
0.31 http://alpine.mirror.wearetriple.com/
0.48 http://linorg.usp.br/AlpineLinux/
0.91 http://ftp.yzu.edu.tw/Linux/alpine/
0.63 http://mirror.aarnet.edu.au/pub/alpine
0.13 http://speglar.siminn.is/alpine/
0.11 http://mirrors.dotsrc.org/alpine/
0.08 http://ftp.halifax.rwth-aachen.de/alpine/
0.59 http://mirrors.tuna.tsinghua.edu.cn/alpine/
0.42 http://mirrors.ustc.edu.cn/alpine/
0.65 http://mirrors.nju.edu.cn/alpine/
0.64 http://mirror.lzu.edu.cn/alpine/
0.13 http://ftp.acc.umu.se/mirror/alpinelinux.org/
0.41 http://mirror.xtom.com.hk/alpine/
0.32 http://mirror.csclub.uwaterloo.ca/alpine/
0.2 http://alpinelinux.mirror.iweb.com/
0.06 http://mirror.neostrada.nl/alpine/
0.05 http://pkg.adfinis-sygroup.ch/alpine/
0.24 http://mirror.ps.kz/alpine/
0.46 http://mirror.rise.ph/alpine-linux/
0.11 http://mirror.operationtulip.com/alpine/
0.03 http://mirrors.ircam.fr/pub/alpine/
0.04 http://alpine.42.fr/
0.19 http://mirror.math.princeton.edu/pub/alpinelinux/
0.06 http://alpine.mirror.didstopia.com/
0.13 http://ftp.icm.edu.pl/pub/Linux/distributions/alpine/
0.46 http://mirror.ungleich.ch/mirror/packages/alpine/
0.19 http://alpine.mirror.vexxhost.ca/
0.31 http://sjc.edge.kernel.org/alpine/
0.18 http://ewr.edge.kernel.org/alpine/
0.06 http://ams.edge.kernel.org/alpine/
0.4 http://download.nus.edu.sg/mirror/alpine/
0.27 http://alpine.yourlabs.org
0.22 http://mirror.pit.teraswitch.com/alpine
0.21 http://mirror.reenigne.net/alpine/
Which disk(s) would you like to use? (or '?' for help or 'none') [none] sda
sys : mode d’installation traditionnel sur disk avec /boot, / (filesystem root) et swap.
data : seul seront les données stokées sur le disque, l'OS n'est pas installé car celui ci est
lancé en mémoire.
lvm : partition en lvm
lvmsys : installation sys sur un volume en lvm
lvmdata : installation data sur un volume en lvm
How would you like to use it? ('sys', 'data', 'lvm' or '?' for help) [?] ?
sys:
This mode may be used for development boxes, desktops, virtual servers, etc.
data:
This mode uses your disk(s) for data storage, not for the operating system.
Use this mode if you only want to use the disk(s) for a mailspool, databases,
logs, etc.
lvm:
Enable logical volume manager and ask again for 'sys' or 'data'.
lvmsys:
lvmdata:
How would you like to use it? ('sys', 'data', 'lvm' or '?' for help) [?] sys
Fin de l’installation
L’installation est terminer, on reboot pour démarrer sur l'OS fraîchement installé.
Comme vous avez pu le constater, l'Alpine Linux est très léger au vu du temps d’installation.
setup-alpine -c answers
Le programme va effectuer toutes les étapes vues plus haut sans pour autant installer le système.
Il en résultera un fichier answers avec tout les paramètres indiqués.
setup-alpine -f answers
source : https://wiki.alpinelinux.org/wiki/Alpine_setup_scripts#setup-alpine
Post configuration
Modification du fichier repository
Le gestionnaire de paquet est apk et sa configuration s'effectue dans le fichier :
etc/apk/repositories
#/media/cdrom/apks
http://mirrors.ircam.fr/pub/alpine/v3.12/main
#http://mirrors.ircam.fr/pub/alpine/v3.12/community
#http://mirrors.ircam.fr/pub/alpine/edge/main
#http://mirrors.ircam.fr/pub/alpine/edge/community
#http://mirrors.ircam.fr/pub/alpine/edge/testing
fetch http://mirrors.ircam.fr/pub/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.ircam.fr/pub/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
v3.12.0-45-g0e4d4e3558 [http://mirrors.ircam.fr/pub/alpine/v3.12/main]
v3.12.0-47-gda1c1b9ae4 [http://mirrors.ircam.fr/pub/alpine/v3.12/community]
VMware tools
Comme sur les autres distribution linux cela ce fait via le paquet : open-vm-tools. Mais il y a une
subtilité chez Alpine, il faut démarrer le service manuellement et l'inscrire pour le démarrage.
Installation
alpine:~# apk add --update open-vm-tools
fetch http://mirrors.ircam.fr/pub/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://mirrors.ircam.fr/pub/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
Executing open-vm-tools-11.1.0-r3.pre-install
Executing busybox-1.31.1-r16.trigger
Lancement du service
alpine:~# rc-service open-vm-tools start
MariaDB
Installation
apk add mariadb mariadb-common mariadb-client
Initialisation
Il faut lancer la commande pour initialiser le service et créer la base SQL de départ.
OK
After connecting you can set the password, if you would need to be
able to connect as any of these users with a password and without sudo
You can find additional information about the MySQL part at:
http://dev.mysql.com
https://mariadb.org/get-involved/
[ ok ]
Lancement du service
alpine:~# rc-service mariadb start
/var/lib/mysql [ ok ]
Configuration
Il y a une petite subtilité, c'est mariadb-secure-installation même si mysql_secure_instalation
est toujours présent.
alpine:~# mariadb-secure-installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Enabled successfully!
... Success!
You already have your root account protected, so you can safely answer 'n'.
New password:
... Success!
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
production environment.
... Success!
ensures that someone cannot guess at the root password from the network.
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
... Success!
... Success!
Reloading the privilege tables will ensure that all changes made so far
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB