Exécuter ImunifyAV en tant que service

Skip to main content
Du bist hier:
Drucken

Exécuter ImunifyAV en tant que service

Dans le guide suivant, tu apprendras comment installer ImunifyAV en tant que service autonome (Stand Alone) sur ton serveur racine. Prérequis :

  • Un serveur web comme Apache2 ou NGINX doit être installé. apt install apache2
  • (Facultatif) Une version actuelle de PHP apt install php a2enmod php* service apache2 restart

 

  1. Connecte-toi à ton serveur via SSH en tant qu’utilisateur root.
  2. Installe ImunifyAV
    1. Exécute les 2 commandes suivantes sur ton serveur racine :
      wget https://repo.imunify360.cloudlinux.com/defence360/imav-deploy.sh
    2.  Avant de lancer l’installation, quelques configurations doivent être effectuées pour une version Stand Alone d’ImunifyAV.
      1. Crée le fichier “integration.conf”
        mkdir -p /etc/sysconfig/imunify360 nano /etc/sysconfig/imunify360/integration.conf

      2. Remplis le fichier avec le contenu suivant :
        # Pfad in dem die öffentlichen Webdateien von ImunifyAV installiert werden    
        [paths]

        ui_path = /var/www/vhosts/imunifyav
        # Ein Skript welches eine Domainliste mit Zusatzangaben im folgenden Format zurückgeben muss (https://docs.imunifyav.com/stand_alone_mode/#how-to-provide-imunifyav-with-an-actual-list-of-users-optional)[integration_scripts]

        domains = /root/imunifyav/domainlist.sh

      3. Ensuite, crée le fichier que tu viens de configurer
        mkdir -p /root/imunifyav
        nano /root/imunifyav/domainlist.sh

      4. Et remplis ce fichier avec le contenu suivant
        (À cet endroit, tu peux aussi placer un script Bash ou Shell qui interroge une base de données ou une API. Le retour doit toutefois se faire dans le format JSON prédéfini.)
        #!/bin/sh
        echo "
        {
          "data": [
            {
              "id": 1000,
              "username": "ins5yo3",
              "owner": "root",
              "domain": "ins5yo3.com",
              "package": {
                "name": "package",
                "owner": "root"
              },
              "email": "ins5yo3@ins5yo3.com",
              "locale_code": "EN_us"
            },
            {
              "id": 1001,
              "username": "ins5yo4",
              "owner": "root",
              "domain": "ins5yo4.com",
              "package": {
                "name": "package",
                "owner": "root"
              },
              "email": "ins5yo4@ins5yo4.com",
              "locale_code": "EN_us"
            }
          ],
          "metadata": {
            "result": "ok"
          }
        }"
    3. Maintenant qu’une configuration Stand Alone a été créée, l’installation peut être lancée avec la commande suivante.
      (La valeur “DEIN_KEY” doit être remplacée par la clé reçue)
      bash imav-deploy.sh --key DEIN_KEY

    4. Après l’installation réussie d’ImunifyAV, nous configurons maintenant le VHost Apache2 correspondant
      1. Crée un port séparé dans le fichier /etc/apache2/ports.conf
        Listen 8080

      2. Crée un nouveau VHost Apache2 (/etc/apache2/sites-available/imunifyav.conf)
        <VirtualHost *:8080>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/vhosts/imunifyav
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        </VirtualHost>

      3. Active le VHost nouvellement créé avec la commande suivante
        a2ensite imunifyav.conf && service apache2 reload

  3. L’installation est maintenant terminée !! Tu accèdes à l’interface d’ImunifyAV via http://IHRE-IP:8080/. La liste des domaines sous /root/imunifyav/domainlist.sh peut être adaptée en continu ou automatisée.
Related Post