« UpgradeAlpine » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
(→NGINX) |
||
| (4 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 9 : | Ligne 9 : | ||
Ensuite deux possibliltés : | Ensuite deux possibliltés : | ||
* On modifie le fichier en indiquant la version souahaité, ici 3.13 (recommandé) | * On modifie le fichier en indiquant la version souahaité, ici 3.13 (recommandé) | ||
<nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = | <nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = blue>v3.13</font>/main | ||
<nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = | <nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = blue>v3.13</font>/community | ||
* Sinon on modifie le fichier pour aller chercher la dernière version stable : | * Sinon on modifie le fichier pour aller chercher la dernière version stable : | ||
<nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = | <nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = blue>latest-stable</font>/main | ||
<nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = | <nowiki>http://</nowiki>dl-cdn.alpinelinux.org/alpine/<font color = blue>latest-stable</font>/community | ||
Finalement on actualise le système : | Finalement on actualise le système : | ||
# apk update | # apk update | ||
| Ligne 24 : | Ligne 24 : | ||
= Connaître la version de Alpine Linux = | = Connaître la version de Alpine Linux = | ||
# cat /etc/alpine-release | # cat /etc/alpine-release | ||
= | = Nginx = | ||
Si vous mettez à niveau Alpine avec un serveur | Si vous mettez à niveau Alpine avec un serveur Nginx (et la présence de VHosts dans "conf.d") il est préférable de déplacer les fichiers de configuration dans le nouveau répertoire idoine pour ne pas avoir de problèmes avec les futur version de Alpine Linux : | ||
# mv /etc/nginx/conf.d/* /etc/nginx/http.d/ | # mv /etc/nginx/conf.d/* /etc/nginx/http.d/ | ||
On active la nouvelle configuration : | |||
# vi /etc/nginx/nginx.conf | |||
... | |||
# Includes virtual hosts configs. | |||
<font color = blue>include /etc/nginx/http.d/*.conf;</font> | |||
# <font color = red>WARNING: Don't use this directory for virtual hosts anymore.</font> | |||
# <font color = red>This include will be moved to the root context in Alpine 3.14.</font> | |||
<font color = red>'''#'''</font><font color = blue>include /etc/nginx/conf.d/*.conf;</font> | |||
... | |||
# service nginx restart | |||
Version actuelle datée du 19 mai 2021 à 22:22
Procédure de mise à niveau
Il faut tout d'abord éditer le fichier des dépots :
# vi /etc/apk/repositories
Ensuite deux possibliltés :
- On modifie le fichier en indiquant la version souahaité, ici 3.13 (recommandé)
http://dl-cdn.alpinelinux.org/alpine/v3.13/main http://dl-cdn.alpinelinux.org/alpine/v3.13/community
- Sinon on modifie le fichier pour aller chercher la dernière version stable :
http://dl-cdn.alpinelinux.org/alpine/latest-stable/main http://dl-cdn.alpinelinux.org/alpine/latest-stable/community
Finalement on actualise le système :
# apk update # apk add --upgrade apk-tools # apk upgrade --available # sync
Si mise à jour du kernel il faudra rebooter :
# reboot
Connaître la version de Alpine Linux
# cat /etc/alpine-release
Nginx
Si vous mettez à niveau Alpine avec un serveur Nginx (et la présence de VHosts dans "conf.d") il est préférable de déplacer les fichiers de configuration dans le nouveau répertoire idoine pour ne pas avoir de problèmes avec les futur version de Alpine Linux :
# mv /etc/nginx/conf.d/* /etc/nginx/http.d/
On active la nouvelle configuration :
# vi /etc/nginx/nginx.conf
...
# Includes virtual hosts configs.
include /etc/nginx/http.d/*.conf;
# WARNING: Don't use this directory for virtual hosts anymore.
# This include will be moved to the root context in Alpine 3.14.
#include /etc/nginx/conf.d/*.conf;
...
# service nginx restart