ImunifyAV is one of the most recognized antivirus solutions for a Linux Web server. It scans and cleans backdoors, shells, viruses, phishing pages, scripts, and other types of malware. Control panels such as Plesk, cPanel, and CyberPanel have integration with it, but it is also possible to install it on a Web server without a control panel or one without official compatibility.
There are three versions, including a free version that only allows for scanning, while the other two require a license and allow for automatic malware cleaning. You can find more information on its official website (all versions include GUI and CLI).
In this article, we will explain how to install ImunifyAV on a server with the HestiaCP or VestaCP panel (check compatible operating systems), but it can also be used to install it on a server without a panel by adapting the procedure (PHP required). It is available for the following operating systems:
- CentOS/RHEL 6,7,8
- CloudLinux OS 6,7,8
- Ubuntu 16.04 (LTS only), 18.04, 20.04 (LTS), 22 (Plesk, DirectAdmin, and standalone), and 24.04 (LTS)
- Debian 9 (supported up to Imunify v6.11 (including)), 10, and 11
- Rocky Linux 8 (cPanel, Plesk, and standalone)
- AlmaLinux 8,9
Installing ImunifyAV
First, get the installer from the official repository:
# wget https://repo.imunify360.cloudlinux.com/defence360/imav-deploy.sh -O imav-deploy.sh
Then, you need to create the directories for the integration file and the configuration script files:
# mkdir -p /etc/sysconfig /etc/sysconfig/imunify360
Next, create the integration file:
# nano /etc/sysconfig/imunify360/integration.conf
With the following content, modify the user and corresponding path to store the ImunifyAV Web panel:
[paths]
ui_path = /home/user/web/domain.com/public_html/imav
ui_path_owner = user:user
[pam]
service_name = system-auth
[integration_scripts]
admins = /etc/sysconfig/imunify360/get-admins-script.sh
users = /etc/sysconfig/imunify360/get-users-script.sh
domains = /etc/sysconfig/imunify360/get-domains-script.sh
Then, create the configuration files for your server, starting with the administrator user:
# nano /etc/sysconfig/imunify360/get-admins-script.sh
With the following content (modify the email and user if necessary):
{ "data": [
{
"name": "root",
"unix_user": "root",
"locale_code": "ES_es",
"email": "admin@example.com",
"is_main": true
}
],
"metadata": {
"result": "ok"
} }
The second necessary file will be for configuring the domains:
# nano /etc/sysconfig/imunify360/get-domains-script.sh
Add the list of configured domains as follows:
{
"data": {
"example.com": {
"document_root": "/home/user/web/domain.com",
"is_main": true,
"owner": "user"
},
"subdomain.example.com": {
"document_root": "/home/user/web/subdomain.example.com/",
"is_main": false,
"owner": "user",
}
},
"metadata": {
"result": "ok"
} }
Finally, create the file for the domain users:
# nano /etc/sysconfig/imunify360/get-users-script.sh
Add the users for each domain (you can check the user ID by running an id command or viewing /etc/passwd):
{
"data": [
{
"id": 1001,
"username": "user",
"owner": "user",
"domain": "example.com",
"package": {
"name": "package",
"owner": "user"
},
"email": "email@example.com",
"locale_code": "ES_es"
},
{
"id": 1001,
"username": "user",
"owner": "user",
"domain": "subdomain.example.com",
"package": {
"name": "package",
"owner": "user"
},
"email": "email@example.com",
"locale_code": "ES_es"
}
],
"metadata": {
"result": "ok"
} }
When you have all the scripts ready for the installation of ImunifyAV+, run the installer by providing the license key from Imunify360:
# bash imav-deploy.sh --key License_key_or_IPL
To install the free version, simply run the installation script:
# bash imav-deploy.sh
Once installed, you can access the Web panel by the URL path you set in ui_path to log into ImunifyAV (http://example.com/imav):
If you add more users in the HestiaCP control panel, they will automatically appear in the ImunifyAV web interface, but we have explained the entire installation process for users without a panel.
We hope this tutorial has helped you 🙂. Remember, if you have any questions about this or other issues related to your servers on Clouding, don't hesitate to write to support@clouding.io. We are here to help you with whatever you need!