Run ImunifyAV as a Service

Skip to main content
Du bist hier:
Drucken

Run ImunifyAV as a Service

In the following guide you will learn how to install ImunifyAV as a stand-alone service on your root server. Requirements:

  • A web server such as Apache2 or NGINX must be installed. apt install apache2
  • (Optional) A current PHP version apt install php a2enmod php* service apache2 restart

 

  1. Log in to your server via SSH as the root user.
  2. Install ImunifyAV
    1. Run the following 2 commands on your root server:
      wget https://repo.imunify360.cloudlinux.com/defence360/imav-deploy.sh
    2.  Before starting the installation, some configuration is required for a stand-alone version of ImunifyAV.
      1. Create the file “integration.conf”
        mkdir -p /etc/sysconfig/imunify360 nano /etc/sysconfig/imunify360/integration.conf

      2. Fill the file with the following content:
        # 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. Then create the file you have just configured
        mkdir -p /root/imunifyav
        nano /root/imunifyav/domainlist.sh

      4. And fill this file with the following content
        (At this point you can also store a Bash or shell script that queries a database or API. However, the output must be in the specified JSON format.)
        #!/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. Now that a stand-alone configuration has been created, the installation can be started with the following command.
      (The value “DEIN_KEY” must be replaced with the key you received)
      bash imav-deploy.sh --key DEIN_KEY

    4. After ImunifyAV has been installed successfully, we now configure the corresponding Apache2 VHost
      1. Create a separate port in the file /etc/apache2/ports.conf
        Listen 8080

      2. Create a new Apache2 VHost (/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. Enable the newly created VHost with the following command
        a2ensite imunifyav.conf && service apache2 reload

  3. The installation is now complete! You can reach the ImunifyAV interface at http://YOUR-IP:8080/. The domain list under /root/imunifyav/domainlist.sh can be adjusted or automated at any time.
Related Post