Ad Widget

Collapse

Zabbix 6.0 Installation with RPM Packages(Server No Connectivity to Web)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bacil123
    Junior Member
    • Feb 2025
    • 4

    #1

    Zabbix 6.0 Installation with RPM Packages(Server No Connectivity to Web)

    Hello All. We're installing Zabbix 6.0 manually step by step. We did manage to install lots of PKGs except Two. When we install : zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm, it says it needs : zabbix-web-deps-6.0.39-rc1.release1.el9.noarch. So, we install web-deps. But that further asks that it needs : zabbix-web-database-6.0.39-rc1.release1.el9.noarch. But this web-database is no where there in the repo.zabbix.com, neither in non-supported/rhel/X. So, how to get this RPM. Note: All other 6 mandatory PKGs got installed successfully. Please advise. Best...
  • jhboricua
    Senior Member
    • Dec 2021
    • 113

    #2
    Which Linux distribution?
    Which Frontend (apache/nginx) and DB (mysql/postgres) did you pick?

    Comment


    • Bacil123
      Bacil123 commented
      Editing a comment
      Hi. Thanks. Red Hat Enterprise Linux release 9.4 (Plow).
      Yes, that was my next query which I was about to raise. Do we need to have first get DB installed on host and apache installed as well first. As in next steps of installation, when I run this: ]# mysql -uroot -p
      -bash: mysql: command not found. So there is no mysql there. Thanks.
  • tim.mooney
    Senior Member
    • Dec 2012
    • 1427

    #3
    Originally posted by Bacil123
    Hello All. We're installing Zabbix 6.0 manually step by step. We did manage to install lots of PKGs except Two. When we install : zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm, it says it needs : zabbix-web-deps-6.0.39-rc1.release1.el9.noarch. So, we install web-deps. But that further asks that it needs : zabbix-web-database-6.0.39-rc1.release1.el9.noarch. But this web-database is no where there in the repo.zabbix.com, neither in non-supported/rhel/X. So, how to get this RPM. Note: All other 6 mandatory PKGs got installed successfully. Please advise. Best...
    'zabbix-web-database' is a virtual provide, provided by any of the zabbix-web-mysql-6.0.XX packages:

    Code:
    $ cd /tmp/
    $ wget https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm
    $ rpm -q -l --provides zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm
    warning: zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 08efa7dd: NOKEY
    zabbix-web-database = 6.0.39-release1.el9
    zabbix-web-mysql = 6.0.39-release1.el9
    (contains no files)
    Packages do that so that they are sure you have one of the supported database options installed, while allowing you to decide which DBMS you want to use.

    As the rpm query output shows, it actually doesn't install any files. It's just there for handling dependencies.

    As far as why you're getting a dependency error: It's probably circular dependencies between the two packages. You want to install both packages at the same time (list both on the command line, one after the other). librpm (and yum/dnf that builds on top of it) has the notion of a "transaction". For circular or transitive dependencies, you just need to make sure all the packages are installed in the same transaction.

    Comment


    • Bacil123
      Bacil123 commented
      Editing a comment
      Hi. Thanks for the information. Since I don't have internet connection(due to restrictions), thats why I am installing it manually.

      # rpm -Uvh zabbix-server-mysql-6.0.39-release1.el9.x86_64.rpm zabbix-web-deps-6.0.39-rc1.release1.el9.noarch.rpm
      warning: zabbix-server-mysql-6.0.39-release1.el9.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 08efa7dd: NOKEY
      error: Failed dependencies:
      php-fpm >= 7.2 is needed by zabbix-web-deps-6.0.39-rc1.release1.el9.noarch
      php-gd >= 7.2 is needed by zabbix-web-deps-6.0.39-rc1.release1.el9.noarch
      php-mbstring >= 7.2 is needed by zabbix-web-deps-6.0.39-rc1.release1.el9.noarch
      zabbix-web = 6.0.39-rc1.release1.el9 is needed by zabbix-web-deps-6.0.39-rc1.release1.el9.noarch
      zabbix-web-database = 6.0.39-rc1.release1.el9 is needed by zabbix-web-deps-6.0.39-rc1.release1.el9.noarch

      Note: php-fpm, php-gd and php-mbstring, were installed successfully as well. Not sure why it complaints about them as well.

      # wget https://repo.zabbix.com/zabbix/6.0/r...el9.noarch.rpm
      --2025-03-17 08:31:32-- https://repo.zabbix.com/zabbix/6.0/r...el9.noarch.rpm
      Resolving repo.zabbix.com (repo.zabbix.com)... 178.128.6.101, 2604:a880:2:d0::2062:d001
      Connecting to repo.zabbix.com (repo.zabbix.com)|178.128.6.101|:443... connected.
      GnuTLS: Error in the pull function.
      Unable to establish SSL connection.
      # rpm -q -l --provides zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm
      warning: zabbix-web-mysql-6.0.39-release1.el9.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 08efa7dd: NOKEY
      zabbix-web-database = 6.0.39-release1.el9
      zabbix-web-mysql = 6.0.39-release1.el9
      (contains no files)


      Pls advise. Thanks.
      Last edited by Bacil123; 17-03-2025, 15:32.
  • jhboricua
    Senior Member
    • Dec 2021
    • 113

    #4
    What is the output of:

    Code:
    rpm -qa | grep zabbix
    I didn't get which web frontend are you intending to use (apache or nginx). I did a quick Rocky 9 vm deployment in my proxmox lab and followed the installation instructions from the Zabbix site which calls for the following packages using the EL9 repo (assuming apache/mysql for frontend/backend):

    Code:
    dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
    These are the packages that got installed for a mysql/apache deployment:

    Code:
    zabbix-web-6.0.39-release1.el9.noarch
    zabbix-agent2-plugin-postgresql-6.0.39-release1.el9.x86_64
    zabbix-agent2-plugin-mongodb-6.0.39-release1.el9.x86_64
    zabbix-web-deps-6.0.39-release1.el9.noarch
    zabbix-web-mysql-6.0.39-release1.el9.noarch
    zabbix-apache-conf-6.0.39-release1.el9.noarch
    zabbix-server-mysql-6.0.39-release1.el9.x86_64
    zabbix-agent2-6.0.39-release1.el9.x86_64
    zabbix-sql-scripts-6.0.39-release1.el9.noarch
    zabbix-selinux-policy-6.0.39-release1.el9.x86_64
    As for your other question, yes, you do need a MySQL or PosgreSQL instance and the proper access to it in order for the Zabbix installation wizard to create the necessary schema in it. It can be running locally on the same server as Zabbix or on a different server.

    Comment


    • Bacil123
      Bacil123 commented
      Editing a comment
      Hi. Thanks. Haha. I even don't know that requirements: Are apache or nginx also freeware tools, and easily available.

      # rpm -qa | grep zabbix
      zabbix-release-6.0-5.el9.noarch
      zabbix-selinux-policy-6.0.39-release1.el9.x86_64
      zabbix-agent-6.0.39-release1.el9.x86_64
      zabbix-server-mysql-6.0.39-release1.el9.x86_64
      zabbix-web-6.0.39-release1.el9.noarch
      zabbix-sql-scripts-6.0.39-release1.el9.noarch

      I'll try to get all the missing ones as per your list. Right now, I have:
      zabbix-release-latest-6.0.el9.noarch.rpm - Got installed
      zabbix-server-mysql - Got installed
      zabbix-web-mysql - Not got installed yet
      zabbix-apache-conf - Got installed
      zabbix-sql-scripts - Got installed
      zabbix-selinux-policy - Got installed
      zabbix-agent - Got installed
      zabbix-web-database - Not got installed yet
      zabbix-web-deps-6.0.39-release1.el9.noarch.rpm - Not got installed yet

      And, again will see how to get MySQL or PosgreSQL instance on this box, as I am quite new to these things. Best...
  • jhboricua
    Senior Member
    • Dec 2021
    • 113

    #5
    The web frontend for Zabbix can run on Apache or Nginx. The choice of which to run is up to you. I prefer Nginx over Apache but that's just me. The packages for them should be available via the Red Hat repos already configured on your server, but you are going to have a very hard time trying to resolve all the related package dependencies if your host is not allowed to connect to the repos hosting them.

    Comment


    • Bacil123
      Bacil123 commented
      Editing a comment
      Hi. Thanks.
      Please advise on the below three items:
      1. I see some apache running on this server. Can we use it. For sure it is being used by another APP. But can we use the same for Zabbix.
      # apachectl status
      ● httpd.service - The Apache HTTP Server
      Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
      Active: active (running) since Fri 2025-03-14 15:08:19 -05; 3 days ago
      Docs: man:httpd.service(8)
      Main PID: 1303 (httpd)
      Status: "Total requests: 0; Idle/Busy workers 100/0;Requests/sec: 0; Bytes served/sec: 0 B/sec"
      Tasks: 32 (limit: 203362)
      Memory: 15.8M
      CPU: 3min 33.774s
      CGroup: /system.slice/httpd.service
      ├─1303 /usr/sbin/httpd -DFOREGROUND
      ├─1783 /usr/sbin/httpd -DFOREGROUND
      ├─1784 /usr/sbin/httpd -DFOREGROUND
      ├─1785 /usr/sbin/httpd -DFOREGROUND
      ├─1787 /usr/sbin/httpd -DFOREGROUND
      └─1789 /usr/sbin/httpd -DFOREGROUND

      Mar 14 15:08:19 someserver.com systemd[1]: Starting The Apache HTTP Server...
      Mar 14 15:08:19 someserver.com systemd[1]: Started The Apache HTTP Server.
      Mar 14 15:08:19 someserver.com httpd[1303]: Server configured, listening on: port 443, port 80

      2. I also some PostGres SQL instance on server for another purpose or in use by another APP. Can we use the same PostGres, or it has to be dedicated ONLY.
      # systemctl status postgresql-16.service
      ● postgresql-16.service - PostgreSQL 16 database server
      Loaded: loaded (/usr/lib/systemd/system/postgresql-16.service; enabled; preset: disabled)
      Active: active (running) since Fri 2025-03-14 15:08:19 -05; 3 days ago
      Docs: https://www.postgresql.org/docs/16/static/
      Process: 1337 ExecStartPre=/usr/pgsql-16/bin/postgresql-16-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
      Main PID: 1370 (postgres)
      Tasks: 7 (limit: 203362)
      Memory: 28.8M
      CPU: 1min 1.630s
      CGroup: /system.slice/postgresql-16.service
      ├─1370 /usr/pgsql-16/bin/postgres -D /var/lib/pgsql/16/data
      ├─1668 "postgres: logger "
      ├─1728 "postgres: checkpointer "
      ├─1729 "postgres: background writer "
      ├─1756 "postgres: walwriter "
      ├─1757 "postgres: autovacuum launcher "
      └─1758 "postgres: logical replication launcher "

      Mar 14 15:08:19 someserver.com systemd[1]: Starting PostgreSQL 16 database server...
      Mar 14 15:08:19 someserver.com postgres[1370]: 2025-03-14 15:08:19.842 -05 [1370] LOG: redirecting log output to logging collector>
      Mar 14 15:08:19 someserver.com postgres[1370]: 2025-03-14 15:08:19.842 -05 [1370] HINT: Future log output will appear in directory>
      Mar 14 15:08:19 someserver.com systemd[1]: Started PostgreSQL 16 database server.

      3. Please share the command to install Ngix, like "sudo yum install ngix".

      Thanks.

    • Bacil123
      Bacil123 commented
      Editing a comment
      Hi. Thanks. I finally was able to manually install nginx from a tar.gz download+PCRE Library tar download, on same host where apache4 was installed. As you had referred it will be hard to resolve dependencies packages for nginx, but somehow it only asked for PCRE library. After installation, when I start nginx, it complains: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use), which is perfectly fine as Apache is using it so I stopped Apache and again start ngnix: # /usr/local/nginx/sbin/nginx.
      # ps -eaf | grep -i nginx
      root 69056 1 0 18:09 ? 00:00:00 nginx: master process /usr/local/nginx/sbin/nginx
      nginx 69057 69056 0 18:09 ? 00:00:00 nginx: worker process
      root 69256 55038 0 18:10 pts/0 00:00:00 grep --color=auto -i nginx
      # /usr/local/nginx/sbin/nginx -V
      nginx version: nginx/1.27.4
      built by gcc 11.4.1 20231218 (Red Hat 11.4.1-3) (GCC)
      configure arguments: --user=nginx --group=nginx

      But then when I check status with : # sudo systemctl start nginx
      Failed to start nginx.service: Unit nginx.service not found.
      Do I have to create some systemd service etc. Or, some Unit. Not sure what is the Unit.

      Any idea, how to start nginx.service and use it for Zabbix.
      Another thing is there is no file like /etc/nginx/conf.d/zabbix.conf also in the server.
      Thanks.
      Last edited by Bacil123; 20-03-2025, 03:51.
  • jhboricua
    Senior Member
    • Dec 2021
    • 113

    #6
    You need to change the port nginx is trying to bind to in its configuration file, as apache is already using it. That said, you're better off installing Zabbix on a dedicated server or VM, I have no experience setting up zabbix the way you are trying to do it. It's probably not even supported that way.

    If you're just doing this on a lab fashion, have you looked at the Zabbix virtual appliance? Might be easier to deploy and play with Zabbix that way as it already comes with everything pre-installed. if this is for a produciton deployment, I feel you are going the wrong way about it. Get a dedicated server or VM for it and get an exception to allow it to connect to the internet until the software is installed and anytime you need to updated it. The installation doesn't need to be this difficult.

    Comment


    • Bacil123
      Bacil123 commented
      Editing a comment
      Hi. Thanks. This has become kind of dedicated host now, as I have stopped Apache altogether and that another App is not working due to that also. So dedicated. I can also reach to Nginx default page in browser all fine as well as of now.
      See below all good as of now. Only thing is to integrate it with Zabbix Server/Agent etc.

      # /usr/local/nginx/sbin/nginx -t
      nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
      nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
      # sudo systemctl restart nginx
      # sudo systemctl status nginx
      ● nginx.service - The NGINX HTTP and reverse proxy server
      Loaded: loaded (/usr/lib/systemd/system/nginx.service; disabled; preset: disabled)
      Active: active (running) since Thu 2025-03-20 15:26:59 -05; 9s ago
      Process: 230537 ExecStartPre=/usr/local/nginx/sbin/nginx -t (code=exited, status=0/SUCCESS)
      Process: 230539 ExecStart=/usr/local/nginx/sbin/nginx (code=exited, status=0/SUCCESS)
      Main PID: 230540 (nginx)
      Tasks: 2 (limit: 203362)
      Memory: 1.6M
      CPU: 13ms
      CGroup: /system.slice/nginx.service
      ├─230540 "nginx: master process /usr/local/nginx/sbin/nginx"
      └─230541 "nginx: worker process"

      Mar 20 15:26:59 abc.corp systemd[1]: Starting The NGINX HTTP and reverse proxy server...
      Mar 20 15:26:59 abc.corp nginx[230537]: nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
      Mar 20 15:26:59 abc.corp nginx[230537]: nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
      Mar 20 15:26:59 abc.corp systemd[1]: Started The NGINX HTTP and reverse proxy server.

      So, the below issue mentioned earlier has been resolved as of now. From a non-zabbix google search, a file was modified at this location: /lib/systemd/system/nginx.service
      [Unit]
      Description=The NGINX HTTP and reverse proxy server
      After=syslog.target network-online.target remote-fs.target nss-lookup.target
      Wants=network-online.target

      [Service]
      Type=forking
      PIDFile=/usr/local/nginx/logs/nginx.pid
      ExecStartPre=/usr/local/nginx/sbin/nginx -t
      ExecStart=/usr/local/nginx/sbin/nginx
      ExecReload=/usr/local/nginx/sbin/nginx -s reload
      ExecStop=/bin/kill -s QUIT $MAINPID
      PrivateTmp=true

      [Install]
      WantedBy=multi-user.target
      And, then restarting nginx brought back it up fine.

      NOTE: The below issue referred earlier has been resolved.
      # sudo systemctl start nginx
      Failed to start nginx.service: Unit nginx.service not found.
      Do I have to create some systemd service etc. Or, some Unit. Not sure what is the Unit. <= This issue has been resolved as of now: UPDATE


      Please advise. Thanks in advance. Best
      Last edited by Bacil123; 20-03-2025, 22:46.
Working...