ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Zabbix Server Setup on Debian 9.0

    Scheduled Pinned Locked Moved IT Discussion
    debian stretchdebian 9zabbix servermariadbmonitoring
    15 Posts 3 Posters 1.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dbeatoD
      dbeato @black3dynamite
      last edited by

      @black3dynamite said in Zabbix Server Setup on Debian 9.0:

      Nice write up. Do you enable firewall on all your Debian/ubuntu installs?

      Yes, only the necessary ports. So I should add that...

      dbeatoD 1 Reply Last reply Reply Quote 1
      • dbeatoD
        dbeato @dbeato
        last edited by

        @dbeato said in Zabbix Server Setup on Debian 9.0:

        @black3dynamite said in Zabbix Server Setup on Debian 9.0:

        Nice write up. Do you enable firewall on all your Debian/ubuntu installs?

        Yes, only the necessary ports. So I should add that...

        Here I come and does the changes now...

        1 Reply Last reply Reply Quote 1
        • dbeatoD
          dbeato @black3dynamite
          last edited by

          @black3dynamite said in Zabbix Server Setup on Debian 9.0:

          Nice write up. Do you enable firewall on all your Debian/ubuntu installs?

          Just changed it, let me know if that is better.

          black3dynamiteB 1 Reply Last reply Reply Quote 0
          • black3dynamiteB
            black3dynamite @dbeato
            last edited by

            @dbeato said in Zabbix Server Setup on Debian 9.0:

            @black3dynamite said in Zabbix Server Setup on Debian 9.0:

            Nice write up. Do you enable firewall on all your Debian/ubuntu installs?

            Just changed it, let me know if that is better.

            Looking good so far. On step 7 you are missing the letter a in Zabbix.

            dbeatoD 1 Reply Last reply Reply Quote 0
            • black3dynamiteB
              black3dynamite
              last edited by black3dynamite

              Ever since I've discovered mysql -e because of @JaredBusch how-to guides, I've been a big fan of using that to create the database and securing the database.

              #
              mysql -e "CREATE DATABASE zabbix_db;"
              mysql -e "CREATE USER 'zabbix_user'@'localhost' IDENTIFIED BY 'password';"
              mysql -e "GRANT ALL ON zabbix_db.* TO 'zabbix_user'@'localhost';"
              mysql -e "FLUSH PRIVILEGES;"
              
              #
              mysql -e "UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';"
              mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
              mysql -e "DELETE FROM mysql.user WHERE User='';"
              mysql -e "DROP DATABASE test;"
              mysql -e "FLUSH PRIVILEGES;"
              
              dbeatoD 1 Reply Last reply Reply Quote 0
              • dbeatoD
                dbeato @black3dynamite
                last edited by

                @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                @dbeato said in Zabbix Server Setup on Debian 9.0:

                @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                Nice write up. Do you enable firewall on all your Debian/ubuntu installs?

                Just changed it, let me know if that is better.

                Looking good so far. On step 7 you are missing the letter a in Zabbix.

                Fixed it now.

                1 Reply Last reply Reply Quote 0
                • dbeatoD
                  dbeato @black3dynamite
                  last edited by

                  @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                  Ever since I've discovered mysql -e because of @JaredBusch how-to guides, I've been a big fan of using that to create the database and securing the database.

                  #
                  mysql -e "CREATE DATABASE zabbix_db;"
                  mysql -e "CREATE USER 'zabbix_user'@'localhost' IDENTIFIED BY 'password';"
                  mysql -e "GRANT ALL ON zabbix_db.* TO 'zabbix_user'@'localhost';"
                  mysql -e "FLUSH PRIVILEGES;"
                  
                  #
                  mysql -e "UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';"
                  mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
                  mysql -e "DELETE FROM mysql.user WHERE User='';"
                  mysql -e "DROP DATABASE test;"
                  mysql -e "FLUSH PRIVILEGES;"
                  

                  So the sudo mysql_secure_installation doesn't do that?

                  black3dynamiteB 1 Reply Last reply Reply Quote 0
                  • black3dynamiteB
                    black3dynamite @dbeato
                    last edited by

                    @dbeato said in Zabbix Server Setup on Debian 9.0:

                    @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                    Ever since I've discovered mysql -e because of @JaredBusch how-to guides, I've been a big fan of using that to create the database and securing the database.

                    #
                    mysql -e "CREATE DATABASE zabbix_db;"
                    mysql -e "CREATE USER 'zabbix_user'@'localhost' IDENTIFIED BY 'password';"
                    mysql -e "GRANT ALL ON zabbix_db.* TO 'zabbix_user'@'localhost';"
                    mysql -e "FLUSH PRIVILEGES;"
                    
                    #
                    mysql -e "UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';"
                    mysql -e "DELETE FROM mysql.user WHERE User='root' AND Host NOT IN ('localhost', '127.0.0.1', '::1');"
                    mysql -e "DELETE FROM mysql.user WHERE User='';"
                    mysql -e "DROP DATABASE test;"
                    mysql -e "FLUSH PRIVILEGES;"
                    

                    So the sudo mysql_secure_installation doesn't do that?

                    It does, but using mysql -e can help with automating the installation.

                    dbeatoD 1 Reply Last reply Reply Quote 1
                    • dbeatoD
                      dbeato @black3dynamite
                      last edited by

                      @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                      does, but using mysql -e can help with automating the installation.

                      I see the point.

                      black3dynamiteB 1 Reply Last reply Reply Quote 0
                      • black3dynamiteB
                        black3dynamite @dbeato
                        last edited by

                        @dbeato said in Zabbix Server Setup on Debian 9.0:

                        @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                        does, but using mysql -e can help with automating the installation.

                        I see the point.

                        And you can probably skip the setup wizard just by adding all those information directly to the zabbix conf file.

                        dbeatoD 1 Reply Last reply Reply Quote 0
                        • dbeatoD
                          dbeato @black3dynamite
                          last edited by

                          @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                          @dbeato said in Zabbix Server Setup on Debian 9.0:

                          @black3dynamite said in Zabbix Server Setup on Debian 9.0:

                          does, but using mysql -e can help with automating the installation.

                          I see the point.

                          And you can probably skip the setup wizard just by adding all those information directly to the zabbix conf file.

                          I added it prior to the zabbix configuration although it chose to go through the setup.

                          1 Reply Last reply Reply Quote 0
                          • JaredBuschJ
                            JaredBusch @dbeato
                            last edited by JaredBusch

                            @dbeato said in Zabbix Server Setup on Debian 9.0:

                            Prior to doing anytighing if you are basing this on a Debian 9 NetInstall you need to install the following packages as root

                            apt install ufw sudo -y
                            

                            Then setup the user in the sudo group

                            sudo adduser username sudo 
                            

                            Technically, you do this if you don't select certain packages during the installation. It has nothing to do with it being a NetInstall ISO or not.

                            Technically, these packages are selected by default. I believe both sudo and ufw are part of standard system utilities.
                            8CO2bH3.png

                            Additionally ufw is not the firewall. That is iptables, but ufw is the simple way to activate and use iptables.

                            dbeatoD 1 Reply Last reply Reply Quote 4
                            • dbeatoD
                              dbeato @JaredBusch
                              last edited by

                              @JaredBusch said in Zabbix Server Setup on Debian 9.0:

                              @dbeato said in Zabbix Server Setup on Debian 9.0:

                              Prior to doing anytighing if you are basing this on a Debian 9 NetInstall you need to install the following packages as root

                              apt install ufw sudo -y
                              

                              Then setup the user in the sudo group

                              sudo adduser username sudo 
                              

                              Technically, you do this if you don't select certain packages during the installation. It has nothing to do with it being a NetInstall ISO or not.

                              Technically, these packages are selected by default. I believe both sudo and ufw are part of standard system utilities.
                              8CO2bH3.png

                              Additionally ufw is not the firewall. That is iptables, but ufw is the simple way to activate and use iptables.

                              Yes, netinstall has that option as below Figure 1 while though it does not install ufw and sudo on those standard utilities Figure 2 & 3 with the fresh install Figure 4

                              Figure 1
                              0_1543334144965_e22c5437-43f1-474c-968f-599d675bb766-image.png
                              Figure 2
                              0_1543337768264_aa49f222-93d1-437a-89a6-3dbfc558f1df-image.png
                              Figure 3
                              0_1543337818820_cb5a9e3c-8a1b-4022-a373-9f1f41bcba52-image.png
                              Figure 4
                              0_1543338000904_b04d0f07-af0f-4ada-9958-8b3dfdd3027d-image.png

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post