Skip to content

54 Comments

  1. fairy heryana
    October 27, 2020 @ 9:04 pm

    Really helped me

    Reply

  2. dave
    November 15, 2020 @ 5:31 am

    Hi Jay,

    thanks for great article. I installed the Zabbix on my home server, but there is a problem. In dashboard Zabbix says, that the server is not running. “Zabbix server is running: no”. Can you help me please?

    Greetings

    Reply

    • Jay Singh
      November 16, 2020 @ 1:33 pm

      Hi Dave,

      Try performing this step https://blog.masteringmdm.com/zabbix-installation-on-ubuntu-server/#9_Start_Zabbix_server_and_agent_processes again and check the status of Zabbix server.

      Jay

      Reply

      • dave
        November 17, 2020 @ 6:02 am

        Hi Jay,

        thank you for your reply, unfortunately it still does not work.

        Greetings

        Reply

        • Jay Singh
          November 17, 2020 @ 11:22 am

          Check Zabbix Server log file. It is located here /var/log/zabbix/zabbix-server.log.
          Jay

          Reply

          • dave
            November 19, 2020 @ 3:53 am

            This is what I am getting

            4498:20201118:172120.350 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
             4498:20201118:172120.350 database is down: reconnecting in 10 seconds
             4498:20201118:172130.352 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
             4498:20201118:172130.352 database is down: reconnecting in 10 seconds
             4498:20201118:172140.353 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
             4498:20201118:172140.353 database is down: reconnecting in 10 seconds
             4498:20201118:172150.355 [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost' (using password: NO)
            

            so I think there is a problem with password/access? I have followed your tutorial.

            btw. in your article, this:

            use database zabbix;
            

            didn’t work for me. I had to provide

            use zabbix;
            

          • Jay Singh
            November 19, 2020 @ 10:29 am

            I have fixed the “use zabbix;” to select the DB.

            The error shows either you have the wrong password configured or set in the Zabbix configuration. You can confirm the permissions with the step number 6 on this section https://blog.masteringmdm.com/zabbix-installation-on-ubuntu-server/#5_Create_an_initial_database_and_a_user. I added that step just now.

            You should see something like this:
            mysql> Show GRANTS FOR ‘zabbix’@’localhost’;
            +————————————————————+
            | Grants for zabbix@localhost |
            +————————————————————+
            | GRANT USAGE ON *.* TO `zabbix`@`localhost` |
            | GRANT ALL PRIVILEGES ON `zabbix`.* TO `zabbix`@`localhost` |
            +————————————————————+
            2 rows in set (0.00 sec)

            If the permissions are correct, then it would be the password in the Zabbix server conf file.

            Jay

          • dave
            November 20, 2020 @ 6:02 am

            Hey Jay I think if the password would not be correct I would not be able to log into the dashboard. I have checked it and it is ok.

          • dave
            November 20, 2020 @ 6:13 am

            I can even create a new user, add host, etc. but it will not be monitored. I just went to Queue section inside of dashboard and Zabbix says:

            • Connection to Zabbix server “localhost” refused. Possible reasons:
            • 1. Incorrect server IP/DNS in the “zabbix.conf.php”;
            • 2. Security environment (for example, SELinux) is blocking the connection;
            • 3. Zabbix server daemon not running;
            • 4. Firewall is blocking TCP connection.
            • Connection refused

            Google says that I should replace localhost with ip address of the device, but even after I am doing it, it does not work.

          • Jay Singh
            November 23, 2020 @ 11:52 am

            Hi Dave,

            It should not be the firewall unless you installed Zabbix on customised Linux OS. By default, the firewall allows Zabbix traffic flow on the intranet.

            Jay

  3. Hamish A
    November 26, 2020 @ 5:31 am

    Installed by following this blog and it all worked. Thank you for all the commands.

    Reply

  4. weiju
    December 27, 2020 @ 10:20 pm

    谢谢你,我从youtube上看了你的视频,然后来到你的blog,我参考了很多人的安装文档结果都失败了;最后发现你写得这个文档,补充了zabbix官方不足,我也顺利成功安装了。作为中国人谢谢你。

    Reply

    • Jay Singh
      January 3, 2021 @ 4:27 pm

      You are very welcome. I am glad you find this post helpful.

      Reply

  5. Amol
    January 6, 2021 @ 1:26 pm

    Great article really helped me. One thing though, I think it is best not to use the same variable for everything. Like your DB name and user name are the same. In commands, you never know when you are referring to the DB or username. If it was like zabbixdb and zabbixuser things will be much clearer.

    Reply

    • Jay Singh
      January 8, 2021 @ 9:51 am

      Thank you.
      I agree with you on the naming convention. I haven’t used the best naming convention for the tutorial just to keep things super simple.

      Reply

  6. Pavithran S
    February 15, 2021 @ 6:53 pm

    Its showing Zabbix server not running.
    i am using Ubuntu 20.04 and zabbix version 5.2.
    why the zabbix server not running.

    Reply

    • veera
      March 30, 2021 @ 8:19 pm

      check status of zabbix
      using below cmd
      systemctl status zabbix-server

      Reply

      • ZAIN
        August 6, 2021 @ 5:17 pm

        Same issue and status is below.

        root@zabbix-OptiPlex-3050:/home/zabbix# systemctl status zabbix-server
        ● zabbix-server.service – Zabbix Server
            Loaded: loaded (/lib/systemd/system/zabbix-server.service; enabled; vendor preset: enabled)
            Active: activating (auto-restart) (Result: exit-code) since Fri 2021-08-06 06:45:41 GMT; 2s ago
           Process: 3693 ExecStart=/usr/sbin/zabbix_server -c $CONFFILE (code=exited, status=0/SUCCESS)
          Main PID: 3695 (code=exited, status=1/FAILURE)

        Reply

  7. shah
    May 16, 2021 @ 12:04 pm

    root@shah-zabbix:/home/shah# sudo zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix
    Enter password: gzip: /usr/share/doc/zabbix-server-mysql*/create.sql.gz: No such file or directory

    Reply

    • Jay Singh
      May 17, 2021 @ 11:37 pm

      Go this path cd /usr/share/doc/zabbix-server-mysql/ and check whether create.sql.gz is available on the disk or not by using ls.

      Reply

      • Nischal
        July 28, 2021 @ 4:48 pm

        What to do ? If this isn’t available?

        Reply

      • Jesus A
        February 18, 2024 @ 7:52 am

        I have the same issue:

        root@helen2srvlnx01:/usr/share/doc# lsb_release -a
        No LSB modules are available.
        Distributor ID: Ubuntu
        Description:   Ubuntu 22.04.4 LTS
        Release:       22.04
        Codename:      jammy

        root@helen2srvlnx01:/usr/share/doc# sudo zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u helen2 -p zabbixdt
        Enter password: gzip: /usr/share/doc/zabbix-server-mysql/create.sql.gz: No such file or directory

        root@helen2srvlnx01:/usr/share/doc#

        Reply

  8. Michael
    May 20, 2021 @ 1:34 am

    How to install without the database for those who have already a database installed in their server?

    Reply

    • Jay Singh
      May 20, 2021 @ 1:48 pm

      Create the database for Zabbix on your existing database server and ensure it is reachable from Zabbix server.

      Reply

      • Michael
        May 20, 2021 @ 4:51 pm

        I mean i have a server that has already installed MySql and i want in the same server to install also Zabbix

        But the command is

        sudo apt install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent mysql-server

        can i opt out the zabbix-server-mysql?

        Thanks.

        Reply

  9. John
    May 31, 2021 @ 6:50 am

    sudo zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -u zabbix -p zabbix

    For zabbix 5.4 the path to the create.sql.gz did change

    Reply

    • Jay Singh
      May 31, 2021 @ 6:15 pm

      Thanks for the update John. I have added a comment for now and will update the command as well.

      Reply

      • Rob
        August 11, 2021 @ 11:35 am

        phew…I spent an hour trying to figure out why that didn’t work. raced down here to the comments to add the solution only to find this! doh!

        Reply

    • Vedant Agrawal
      June 1, 2021 @ 9:00 pm

      root@zabbix:~# sudo zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -u zabbix -p zabbix
      Enter password: gzip: /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz: No such file or directory

      this is the error I’m getting mate on the 6th step when trying to update database any leads how can I fix it ?

      Reply

      • Jay Singh
        June 2, 2021 @ 5:12 pm

        Hi Vedant,

        I have not tested this myself yet.

        Could you check whether create.sql.gz exists under /usr/share/doc/zabbix-sql-scripts/mysql/ or not?

        Reply

        • Vedant Agrawal
          June 4, 2021 @ 8:47 pm

          It doesnt

          Reply

        • Abdel
          July 1, 2021 @ 7:42 pm

          The file doenst exist in zabbix 5.4. I have the same issue, did you find a fix for it?

          Reply

          • Abdel
            July 6, 2021 @ 9:57 pm

            I had the same issue. What helped for me is installation of zabbix 5.0 instead of 5.4. Mysql and PHP versions i used the most recent once. When you depackage dpkg the file in step 1 and after the apt update && apt upgrade, check if you have the create.sql.gz file by using cd /usr/share/doc/zabbix-server-mysql then hit Enter and ls. If you can find it just continue Jay’s tutorial.

    • ivandro
      August 27, 2021 @ 10:42 pm

      hi John

      Wich is the new path ?

      Reply

  10. Vedant Agrawal
    June 1, 2021 @ 5:54 pm

     gzip: /usr/share/doc/zabbix-server-mysql*/create.sql.gz: No such file or directory
    getting this error man on the 7th step when trying to update schema

    Reply

  11. Joe Haney
    July 2, 2021 @ 6:25 am

    I have tried this install with 3 different tutorials and 4 fresh installs of Ubuntu but keep getting the error on the final page of the Web Setup:

    Cannot create the configuration file
    Alternatively, you can install it manually:

    1. Download the configuration file
    2. Save it as “/usr/share/zabbix/conf/zabbix.conf.php”

    I have tried to download the file and add it to the server but receive a permission denied error. Could you advise?

    Reply

    • abdel
      July 6, 2021 @ 10:08 pm

      This is a permission error. I connected to my zabbix server through Putty and through WinSCP. Through putty i changed pemissions on that file with chown. After i deleted the old zabbix.conf.php file in WINSCP and replaced it with the one I donwloaded.

      Reply

    • Jay Singh
      July 8, 2021 @ 6:03 pm

      Edit: This is just permissions issue. Apache user/group does not have write permissions on /usr/share/zabbix/conf/. You need to manually provide read/write permissions and it should work. I have tested in my lab and will add a new post for Zabbix 5.4 installation.

      Reply

      • ivandro
        August 27, 2021 @ 10:37 pm

        Hi Jay

        Did you already post for Zabbix 5.4 installation ?

        Reply

  12. ZAIN TAHIR
    August 6, 2021 @ 4:51 pm

    I am following all your steps but I got an error on multiple attempts.” Please create a database manually, and set the configuration parameters for connection to this database”. Press the “Next step” button when done. Cannot connect to the database

    Kindly help. Thanks

    Reply

  13. Albait
    August 22, 2021 @ 8:38 pm

    Hay Jay,
    hi jay,
    please help with my problem?
    I have a problem while installing zabbix in the last step, can’t create the configuration file.
    Thankyou

    Reply

    • Jay Singh
      August 23, 2021 @ 5:01 pm

      What version of Zabbix are you installing?

      Reply

  14. Natasha
    August 27, 2021 @ 8:07 am

    Hi! Can I also follow this tutorial for my Ubuntu 20.04 server with Plesk administration? I tried it once with another tutorial, but it didn’t work out. (Couldn’t access the frontend) So maybe someone has experience with it?

    Reply

    • shiham
      September 9, 2021 @ 2:29 am

      yes this is the best guide, follow step by step

      Reply

  15. alejandro
    September 9, 2021 @ 3:44 am

    SUPERRRRR GRACIAS TOTALES
    likeYouTube Video!!!

    Reply

  16. Devashish
    October 13, 2021 @ 8:34 pm

    Please help me. I am new here. so i m worried about failure of zabbix installation. After installation of LAMP server, Zabbix server , i failed to procced on Zabbix frontend site. It says “Unable to determine current Zabbix database version: the table “dbversion” was not found.” Please help to fix.

    Reply

    • Jay Singh
      October 15, 2021 @ 3:18 pm

      Drop the Zabbix DB and import the schema again.

      Reply

      • omri
        October 23, 2021 @ 8:24 pm

        Jay, i am facing the same bug, and it does not worked for me. (Ubuntu 64, MySQL)

        Reply

        • Jay Singh
          October 24, 2021 @ 6:15 pm

          I have tested and it works for me.

          Reply

  17. kailuo
    December 12, 2021 @ 6:41 pm

    Can not open the browser with http://10.0.0.8/zbbix
    thank you

    Reply

  18. ilhan
    January 29, 2022 @ 8:30 am

    I read so many videos and blogs, I always understood that it was incomplete or wrong.
    
    I followed step by step what you wrote.
    
    Result : Successful
    
    Thank you very much :)
    

    Reply

  19. Dandy160
    May 7, 2022 @ 3:55 pm

    Great tutorial just a small update if some users still have issue with the Database Schema import.

    In some recent releases the schema import file name has changed to server.sql.gz so swap the file name in the command use that. “# zcat /usr/share/doc/zabbix-server-mysql/server.sql.gz | mysql -uzabbix -p zabbix” instead of “# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -uzabbix -p zabbix”

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *