diff --git a/README.md b/README.md index 98bccb16..9a990b8c 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ WebVirtCloud and `virt-manager`/`virsh` can manage the same libvirt host **concu ## Installation -The installer supports Ubuntu 22.04 / 24.04 / 26.04, Debian 12 / 13, RHEL / Rocky Linux / AlmaLinux / Oracle Linux 10, openSUSE Leap 15.x / Tumbleweed and SLES 15; the panel runs on a virtual machine, a physical host or a KVM host itself and needs Python 3.10 or newer. CI tests Python 3.10–3.13 on Ubuntu (sqlite, and PostgreSQL on 3.12) and the Docker image; the distro installs are not tested in CI. Pick one of the three ways below, then do the [first login](#first-login). +The installer supports Ubuntu 22.04 / 24.04 / 26.04, Debian 12 / 13, RHEL / Rocky Linux / AlmaLinux / Oracle Linux 10, openEuler 24.03 LTS, openSUSE Leap 15.x / Tumbleweed and SLES 15; the panel runs on a virtual machine, a physical host or a KVM host itself and needs Python 3.10 or newer. CI tests Python 3.10–3.13 on Ubuntu (sqlite, and PostgreSQL on 3.12) and the Docker image; the distro installs are not tested in CI. Pick one of the three ways below, then do the [first login](#first-login). ### Installer diff --git a/webvirtcloud.sh b/webvirtcloud.sh index dc3c9639..6be56357 100755 --- a/webvirtcloud.sh +++ b/webvirtcloud.sh @@ -136,7 +136,7 @@ install_packages () { fi done; ;; - fedora) + fedora|openEuler) for p in $PACKAGES; do if dnf list installed "$p" >/dev/null 2>&1; then echo " * $p already installed" @@ -172,9 +172,9 @@ configure_nginx () { # refresh the app snippet; a re-run never clobbers an edited main config. echo " * Installing Nginx configuration" local nginx_template_conf - nginx_template_conf="${APP_PATH}/conf/nginx/${distro}_${codename}_nginx.conf" + nginx_template_conf="${APP_PATH}/conf/nginx/${nginx_conf}_${codename}_nginx.conf" if ! test -f "${nginx_template_conf}"; then - nginx_template_conf="${APP_PATH}/conf/nginx/${distro}_nginx.conf" + nginx_template_conf="${APP_PATH}/conf/nginx/${nginx_conf}_nginx.conf" fi wvc_install_nginx "${nginx_template_conf}" "$APP_PATH/conf/nginx/webvirtcloud.conf" /etc/nginx @@ -408,6 +408,13 @@ case $distro in nginx_group=www-data nginxfile=/etc/nginx/conf.d/$APP_NAME.conf ;; + *openEuler*) + echo " The installer has detected $distro version $version." + distro=openEuler + nginx_group=nginx + nginx_conf=centos + nginxfile=/etc/nginx/conf.d/$APP_NAME.conf + ;; *centos*|*redhat*|*ol*|*rhel*|*rocky*|*Rocky*|*alma*) echo " The installer has detected $distro version $version." distro=centos @@ -433,6 +440,9 @@ case $distro in ;; esac +# the main nginx config of the distro family +nginx_conf="${nginx_conf:-$distro}" + fqdn="localhost" setupfqdn=default until [[ $setupfqdn == "yes" ]] || [[ $setupfqdn == "no" ]]; do @@ -575,6 +585,35 @@ case $distro in exit 1 fi ;; + openEuler) + if [[ "$version" =~ ^24\. ]]; then + # Install for openEuler 24.03 LTS + tzone=\'$(get_timezone)\' + + echo "* Installing OS requirements." + PACKAGES="git hostname python3-devel libvirt-devel python3-libvirt glibc gcc nginx python3-lxml python3-libguestfs iproute cyrus-sasl openssl-devel" + install_packages + + set_hosts + + install_webvirtcloud + + echo "* Configuring Nginx." + configure_nginx + + set_firewall + + set_selinux + + echo "* Configuring systemd." + configure_systemd + + restart_nginx + else + echo "Unsupported openEuler version (24.03 LTS is supported). Version found: $version" + exit 1 + fi + ;; suse) # Install for openSUSE Leap 15.x / Tumbleweed / SLES 15 tzone=\'$(get_timezone)\'