Compilation

Once the archive has finished downloading, open a Terminal and extract it:

$ cd ~/zabbix; tar -zxvf zabbix-4.0.0.tar.gz

I suggest you install the prerequisites and compile Zabbix with external functionality right away so that you don't have to recompile as we progress.

For the purpose of this book, we will compile Zabbix with server, agent, MySQL, CURL, SNMP, SSH, ODBC, XML (VMware), and IPMI support.

To continue, enter the following in the Terminal:

$ cd zabbix-4.0.0
$ ./configure --enable-server --with-mysql --with-net-snmp --with-libcurl --with-openipmi --enable-agent --with-libxml2 --with-unixodbc --with-ssh2 --with-openssl

In the end, a summary of the compiled components will be printed. Verify that you have the following enabled:

 Enable server:         yes
 Server details:
 With database:         MySQL
 WEB Monitoring:        CURL
 SNMP:                  yes
 IPMI:                  yes
 SSH:                   yes
 TLS:                   OpenSSL
 ODBC:                  yes
 Enable agent:          yes  

If the configuration completes successfully, it's all good. If it fails, check the error messages printed in the console and verify that all prerequisites have been installed. A file named config.log might provide more detail about the errors. If you can't find out what's wrong, check Appendix A, Troubleshooting, which lists some common compilation problems.

To actually compile Zabbix, issue the following command:

$ make

You can grab a cup of tea, but don't expect to have much time—Zabbix compilation doesn't take too long; even an old 350-MHz Pentium II compiles it in approximately five minutes. On a modern machine, give it less than a minute. After the make process has finished, check the last lines for any error messages. If there are none, congratulationsyou have successfully compiled Zabbix!

Now, we should install it. I suggest you create proper packages, but that will require some effort and will be distribution dependent. Another option is to run make install. This will place the files in the filesystem but will not register Zabbix as an installed packageremoving and upgrading such software is harder.

If you have experience with creating distribution packages, do soit is a better approach. If this is just a test installation, run the following:

# make install
Here and later in this book, a $ prompt will mean a normal user, while a # prompt will mean the root user. To run commands as root, su or sudo are commonly used.

But remember that test installations have a tendency of becoming production installations laterit might be a good idea to do things properly from the very beginning.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.20.68