meta données pour cette page
Ceci est une ancienne révision du document !
Installation Xen Orchestra à partir des sources
Sources
Installation
Installation sur une debian 13
- installation des paquets requis
root@xoa:~# apt-get install build-essential redis-server libpng-dev git python3-minimal libvhdi-utils lvm2 cifs-utils nfs-common ntfs-3g openssl libfuse2 nmap wget npm htop tree
- installation de yarn
root@xoa:~# npm install -g yarn
- test de REDIS
root@xoa:~# systemctl restart redis.service root@xoa:~# redis-cli ping PONG
- installation de Xen Orchestra
root@xoa:~# git clone -b master https://github.com/vatesfr/xen-orchestra root@xoa:~# cd xen-orchestra root@xoa:~# yarn root@xoa:~# yarn build root@xoa:~# cd packages/xo-server
- création du fichier de conf
root@xoa:~# mkdir -p /etc/xo-server/ root@xoa:~# cp sample.config.toml /etc/xo-server/config.toml In this config file, you can change default ports (80 and 443) for xo-server. If you are running the server as a non-root user, you will need to set the port to 1024 or higher. ici nous le faisons tourner sur le 8080
- démarrage du service
root@xoa:~# yarn start Default user: "admin@admin.net" with password "admin"
Démarrage automatique
Le daemon tournant sur le port 8080, nous pouvons le lancer en utilisateur non-root.
- création du user xen-orchestra
root@xoa:~# useradd -m xen-orchestra -d /home/xen-orchestra
- déplacement de binaires et ajustement des droits
root@xoa:~# mv /root/xen-orchestra/ /usr/bin/ root@xoa:~# chown xen-orchestra:xen-orchestra /usr/bin/xen-orchestra/ -R
- création du service
root@xoa:~# vi /etc/systemd/system/xo-server.service [Unit] Description=XO Server After=network-online.target [Service] Environment="DEBUG=xo:main" Restart=always SyslogIdentifier=xo-server # Be sure to edit the path below to where your Node and your xo-server install is located! ExecStart=/usr/bin/node /usr/bin/xen-orchestra/packages/xo-server/dist/cli.mjs [Install] WantedBy=multi-user.target root@xoa:~# systemctl daemon-reload root@xoa:~# systemctl enable --now xo-server Created symlink '/etc/systemd/system/multi-user.target.wants/xo-server.service' → '/etc/systemd/system/xo-server.service'.
Gestion de la date et heure
Sur Debian, aucun daemon de temps n'est installé par défault
- installation et configuration de systemd-timesyncd
root@xoa:~# apt install systemd-timesyncd Installation de : systemd-timesyncd Sommaire : Mise à niveau de : 0. Installation de : 1Supprimé : 0. Non mis à jour : 0 Taille du téléchargement : 92,9 kB Espace nécessaire : 207 kB / 13,1 GB disponible Réception de : 1 http://ftp.ec-m.fr/debian trixie-updates/main amd64 systemd-timesyncd amd64 257.8-1~deb13u2 [92,9 kB] 92,9 ko réceptionnés en 0s (970 ko/s) Sélection du paquet systemd-timesyncd précédemment désélectionné. (Lecture de la base de données... 77807 fichiers et répertoires déjà installés.) Préparation du dépaquetage de .../systemd-timesyncd_257.8-1~deb13u2_amd64.deb ... Dépaquetage de systemd-timesyncd (257.8-1~deb13u2) ... Paramétrage de systemd-timesyncd (257.8-1~deb13u2) ... Creating group 'systemd-timesync' with GID 989. Creating user 'systemd-timesync' (systemd Time Synchronization) with UID 989 and GID 989. Created symlink '/etc/systemd/system/dbus-org.freedesktop.timesync1.service' → '/usr/lib/systemd/system/systemd-timesyncd.service'. Created symlink '/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service' → '/usr/lib/systemd/system/systemd-timesyncd.service'. systemd-time-wait-sync.service is a disabled or a static unit, not starting it. Traitement des actions différées (« triggers ») pour dbus (1.16.2-2) ...
ajout des NTP
# This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later version. # # Entries in this file show the compile time defaults. Local configuration # should be created by either modifying this file (or a copy of it placed in # /etc/ if the original file is shipped in /usr/), or by creating “drop-ins” in # the /etc/systemd/timesyncd.conf.d/ directory. The latter is generally # recommended. Defaults can be restored by simply deleting the main # configuration file and all drop-ins located in /etc/. # # Use 'systemd-analyze cat-config systemd/timesyncd.conf' to display the full config. # # See timesyncd.conf(5) for details.
[Time] NTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org #FallbackNTP=0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org RootDistanceMaxSec=5 PollIntervalMinSec=32 PollIntervalMaxSec=2048 ConnectionRetrySec=30 SaveIntervalSec=60 </code>
Updating
If you would like to update your current version, enter your xen-orchestra directory and run the following:
# This will clear any changes you made in the repository!! git checkout .
git pull –ff-only yarn yarn build