Ad Widget

Collapse

Help! Upgrade zabbix 2.0 to 2.2 using yum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SrTunes
    Member
    • Feb 2013
    • 37

    #1

    Help! Upgrade zabbix 2.0 to 2.2 using yum

    I need help with a problem. I tried to upgrade my zabbix 2.0 to 2.2 using "yum" but when I put yum install zabbix22 I have this problem:

    Code:
    --> Running transaction check
    ---> Package zabbix.x86_64 0:1.8.20-1.el6 will be installed
    --> Processing Conflict: zabbix20-2.0.11-1.el6.x86_64 conflicts zabbix
    --> Finished Dependency Resolution
    Error: zabbix20 conflicts with zabbix-1.8.20-1.el6.x86_64
     You could try using --skip-broken to work around the problem
     You could try running: rpm -Va --nofiles --nodigest
    So I thougth to uninstall the zabbix 2.0 and install zabbix 2.2 but I don`t know how I keep the settings.
  • SangOr
    Junior Member
    • Jun 2014
    • 11

    #2
    Hi,

    To keep your configuration after this update, you need to dump your database.
    If you use MySQL :

    mkdir /home/"you"/backupZabbix/

    service zabbix-agentd stop
    service zabbix-server stop

    mysqldump -u $USER -p $PASSWD 'zabbix' > /home/"you"/backupZabbix/zabbixDB.sql

    service zabbix-agentd start
    service zabbix-server start
    After that, u can use this scrip to update (install the new version of Zabbix)
    GitHub is where people build software. More than 225 million people use GitHub to discover, fork, and contribute to over 800 million projects.


    It's a script for an installation on CentOS server.

    You can add following lines before the line 125 of this script :

    rm -rf /etc/zabbix*
    rm -rf /usr/local/bin/zabbix*
    rm -rf /usr/local/etc/zabbix*
    rm -rf /usr/local/sbin/zabbix*
    rm -rf /usr/local/share/zabbix*
    rm -rf /var/run/zabbix*
    rm -rf /var/log/zabbix*
    rm -rf /home/zabbix/*
    After this new installation, restore your database using :
    service zabbix-agentd stop
    service zabbix-server stop

    mysql -u $USER -p $PASSWD zabbix < /home/"you"/backupZabbix/zabbixDB.sql

    service zabbix-agentd start
    service zabbix-server start
    Last edited by SangOr; 11-06-2014, 17:26.

    Comment

    • aib
      Senior Member
      • Jan 2014
      • 1615

      #3
      Well, it's will be usefull to backup not only DB but .conf files also from /etc/zabbix/*.conf

      So, this command rm -rf /etc/zabbix* has to be run after you backup configuration files
      Sincerely yours,
      Aleksey

      Comment

      • SangOr
        Junior Member
        • Jun 2014
        • 11

        #4
        In both case the new installation will erase it with a new config file.
        Then, he needs to save it before

        Thank u aib.

        Without know the behavior of the script (if it overwrite or not),
        I added these lines to avert conflicts with the old version.

        And sorry for my english ^^

        Comment

        • aib
          Senior Member
          • Jan 2014
          • 1615

          #5
          Installation script save .conf file in the same directories but rename it to .conf.rpmnew. Also the script create a new file with the original name (like zabbix_server.conf)

          Because of that a lot of people was surprised by loosing the correct settings for Zabbix Server after update.
          Nobody can realize that:
          - zabbix_server.conf - it's a NEW files
          - zabbix_server.conf.rpmnew - it's an original file...
          Sincerely yours,
          Aleksey

          Comment

          • SrTunes
            Member
            • Feb 2013
            • 37

            #6
            keep all

            Originally posted by aib
            Installation script save .conf file in the same directories but rename it to .conf.rpmnew. Also the script create a new file with the original name (like zabbix_server.conf)

            Because of that a lot of people was surprised by loosing the correct settings for Zabbix Server after update.
            Nobody can realize that:
            - zabbix_server.conf - it's a NEW files
            - zabbix_server.conf.rpmnew - it's an original file...
            So... I want to keep all my configuration. How can I do this?

            Comment

            • aib
              Senior Member
              • Jan 2014
              • 1615

              #7
              1) copy /etc/zabbix/zabbix_*.conf in safe, dark, cold place (jk)
              2) use the post https://www.zabbix.com/forum/showpos...17&postcount=2 as tutorial.
              3) after restoring DB - restore your own /etc/zabbix/zabbix_*.conf

              4) now you can start the server and agent.
              Sincerely yours,
              Aleksey

              Comment

              • SrTunes
                Member
                • Feb 2013
                • 37

                #8
                so

                Originally posted by aib
                1) copy /etc/zabbix/zabbix_*.conf in safe, dark, cold place (jk)
                2) use the post https://www.zabbix.com/forum/showpos...17&postcount=2 as tutorial.
                3) after restoring DB - restore your own /etc/zabbix/zabbix_*.conf

                4) now you can start the server and agent.
                So, if I do this will I have all my templates and my graphs, my itens?

                Comment

                • aib
                  Senior Member
                  • Jan 2014
                  • 1615

                  #9
                  Yes, you will.

                  All templates/items/graphs/etc are saving in DataBase.
                  Also - if you backup all content - you will have a history and trends.
                  Sincerely yours,
                  Aleksey

                  Comment

                  • SrTunes
                    Member
                    • Feb 2013
                    • 37

                    #10
                    script

                    Originally posted by SangOr
                    Hi,

                    To keep your configuration after this update, you need to dump your database.
                    If you use MySQL :



                    After that, u can use this scrip to update (install the new version of Zabbix)
                    GitHub is where people build software. More than 225 million people use GitHub to discover, fork, and contribute to over 800 million projects.


                    It's a script for an installation on CentOS server.

                    You can add following lines before the line 125 of this script :



                    After this new installation, restore your database using :
                    this script is to install zabbix2.0 and not zabbix 2.2

                    Comment

                    Working...