Ad Widget

Collapse

Upgrade procedure (1.4.x to 1.8.x)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • marcusfriedman
    Junior Member
    • Apr 2009
    • 12

    #1

    Upgrade procedure (1.4.x to 1.8.x)

    Hi, I'd like to upgrade a Zabbix 1.4.6 server to the latest stable release (1.8.2). Is there a known procedure for doing this?

    I've looked into the upgrade notes published as part of the official documentation for the 1.8.x series. Unfortunately, it only provides instructions for upgrading from 1.6.x, and so I'd like to know if the upgrade that I want to perform is possible, or if I should just start over.


    Thanks in advance,
    Marcus Friedman
  • k4t4k1
    Junior Member
    • May 2010
    • 3

    #2
    Debian Lenny has still the Zabbix 1.4.6, if you want the install the 1.8.2 then follow these instructions:

    Principle:
    For convenience, we install the Debian’s older Zabbix version and then do the new installation and modifications needed.
    Note: Since the older Debian zabbix-agent daemon is compatible with the new Zabbix Server, it is not necessary to update the agent.

    - Install the regular Zabbix packages from Debian repository and some extra needed packages for the compiling of Version 1.8.2:
    Note: Answer with ‘‘ when asked to build a new database for zabbix.

    #apt-get install zabbix-agent zabbix-frontend-php zabbix-server-mysql build-essential libmysqlclient15-dev libcurl4-openssl-dev libsnmp-dev snmp snmpd


    - Download the new Zabbix 1.8.2 source:
    mkdir -p /root/src/zabbix
    cd /root/src/zabbix
    wget http://prdownloads.sourceforge.net/z...ar.gz?download

    - Untar the file:
    tar fvxz zabbix-1.8.2.tar.gz
    cd zabbix-1.8.2

    - Run the configure command:
    Note: if any error occur, look through apt-cache search commands to find the missing -dev packages, and re-run the following configure command till it goes to the end successfully.
    At the end it will present you with the configuration parameters ready to be compiled:
    #./configure --enable-server --enable-agent --with-mysql --with-libcurl --with-net-snmp

    - If all OK then compile it:
    (This will compile and install Zabbix binaries in /usr/local/bin, /usr/local/sbin, etc.)
    make install

    - Rename or delete the installed Debian zabbix front end PHP files:
    rm -r /usr/share/zabbix

    - Copy recursively the PHP frontend files into the original:
    mkdir /usr/share/zabbix/
    cp -a ./frontends/php/* /usr/share/zabbix/

    Add the following entries in /etc/services:
    zabbix-agent 10050/tcp Zabbix Agent
    zabbix-agent 10050/udp Zabbix Agent
    zabbix-trapper 10051/tcp Zabbix Trapper
    zabbix-trapper 10051/udp Zabbix Trapper

    - Create a database called zabbix (or delete the old one and create a new one) in MySQL: (using mysql client or phpMyAdmin)
    shell> mysql -u'username' -p'password'
    mysql> create database zabbix character set utf8;
    mysql> quit;
    shell> cd create/schema
    shell> cat mysql.sql | mysql -u'username' -p'password' zabbix
    shell> cd ../data
    shell> cat data.sql | mysql -u'username' -p'password' zabbix
    shell> cat images_mysql.sql | mysql -u'username' -p'password' zabbix

    - Create a new user called zabbix (incl. his password) and give the full access rights of database zabbix to this ‘zabbix’ user. (in table: db)

    - Reload the databases access rights through the SQL command:
    FLUSH PRIVILEGES;

    - Start the zabbix frontend through the browser and follow the instructions for installation.
    You might have to change some PHP parameters in /etc/php5/apache2/php.ini to match the requirements.


    - Modify the above init scripts by changing the binary files paths to:
    /etc/init.d/zabbix-server: DAEMON=/usr/local/sbin/zabbix_server
    /etc/init.d/zabbix-agent: DAEMON=/usr/local/sbin/zabbix_agentd

    - Configure the following zabbix server configuration file regarding the MySQL login data in:
    /etc/zabbix/zabbix_server.conf

    - Start both the daemons:
    /etc/init.d/zabbix-server start
    /etc/init.d/zabbix-agentd start

    - Go to the web interface and try to login as ‘admin’
    Note: If you have difficulties logging in as ‘admin’, you might want to change the alias of the administrator to ‘admin’ and his password in MD5 format using phpMyAdmin in the table: ‘users’.
    In case of more difficulties you might want to check this link:
    http://www.zabbix.com/documentation/...on_from_source

    - That should be it. Continue everything else via the web interface.

    Debian Squeeze has still the Zabbix 1.8.2, if you want the install the 2.2.6, then one solution is to follow these instructions, the other is to do the hard work all the way(not shown here :-): The…

    Comment

    • marcusfriedman
      Junior Member
      • Apr 2009
      • 12

      #3
      Hi k4t4k1, and thank you for your reply.

      I'm actually looking for an upgrade procedure (that is, I'd like to migrate my current Zabbix setup to the latest stable release, hopefully being able to keep all my hosts definitions with their related items, triggers, screens, etc). Anyway, I think that your instructions might be useful for other users wanting to install Zabbix 1.8.2 from source.

      As a sidenote, users running Debian Lenny can also install Zabbix 1.8.2 from binary packages, by using the backports repository.

      Best regards,
      Marcus

      Comment

      • marcusfriedman
        Junior Member
        • Apr 2009
        • 12

        #4
        Bump.

        Is there a documented procedure for migrating from 1.4.x to 1.8.x without having to start from scratch?

        Comment

        • troffasky
          Senior Member
          • Jul 2008
          • 567

          #5
          I have just done this this afternoon, moving Zabbix from an LTS 8.04 to LTS 10.04 server. It really wasn't hard at all. This is how it went:

          - Stop the Zabbix service on source and destination servers
          - Dump the Zabbix 1.4 database on the old server. We are now finished with the old server.
          - Dump the Zabbix 1.8 database on the new server and keep it just in case.
          - Drop the 1.8 database.
          - Restore the 1.4 database on the new server
          - Apply the 1.4 to 1.6 SQL patch
          - Apply the 1.6 to 1.8 SQL patch
          - Start the Zabbix service.

          And that's it. I got the 1.4 to 1.6 SQL patch from the Zabbix 1.6 package. The 1.6 to 1.8 patch is shipped in the 1.8 package.

          I am now going to try using Zabbix and see if it actually works, having just told you how easy it all was :-)

          Comment

          • marcusfriedman
            Junior Member
            • Apr 2009
            • 12

            #6
            Hi troffasky, thanks a lot for replying to this old thread.

            I haven't performed the upgrade yet because of the huge amount of work that would be required to replicate my current Zabbix server configuration from scratch.

            I'm glad that I've waited long enough, since your post sheds light on this issue. I think I'll give it a try when I get the chance.

            Thanks again for taking your time to reply. I hope that everything goes fine with your new server.

            Best regards,
            Marcus

            Comment

            • troffasky
              Senior Member
              • Jul 2008
              • 567

              #7
              Sorry to keep you on tenterhooks - yes, it's working fine.

              The only issue I've had [and this is nothing to do with the migration itself] is that the permissions are vastly different between 1.4 and 1.8 so I've had to amend these.

              Comment

              Working...