Verified and Tested 11/23/15
This how-to will show you how to install Zabbix 2.4 Server on a CentOS 6 installation. Zabbix is an open source monitoring tool that is ideal for monitoring your cloud servers. However, it can monitor many other types of devices. Installing Zabbix can help you find issues with your server before an outage occurs.
– A CentOS 6.7 server running LAMP. Please see this post for details on installing LAMP on CentOS 6.7.
– If you do not have a CentOS 6.7 server, try a Cloud Server today!
Install Zabbix on CentOS 6
To install Zabbix server, you will need to find out if your CentOS installation is 32-bit or 64-bit.
To do this run the command:
If it says x86_64, you are using a 64-bit installation.
If it says i368, you are using a 32-bit installation.
We will then need to install the Zabbix repository from Zabbix.
For CentOS 6.7 64-Bit, run the following command:
sudo rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
For CentOS 6.7 32-Bit, run the following command:
sudo rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/i386/zabbix-release-2.4-1.el6.noarch.rpm
After installing the Zabbix repository, you can now install the Zabbix server. Do that by running the command:
sudo yum install zabbix-server-mysql zabbix zabbix-agent zabbix-web
Now, we need to make some configuration changes before going through the web installation.
Edit /etc/php.ini with your favorite editor and change the following:
Under Resource limits
max_execution_time = 600
max_input_time = 600
Under Data Handling
post_max_size = 32M
Under File Uploads
upload_max_filesize = 16M
Under Module Settings
date.timezone = 'UTC'
You can change this to a timezone of your choice. In this example, we are using UTC. For a complete list of PHP timezones, go here.
Once done with the php.ini configurations, we can set up the database.
mysql -u root -p
When prompted, enter your MySQL root password that you set up when installing MySQL.
In MySQL, enter the following commands:
create database zabbix character set utf8 collate utf8_bin;
Make sure you set your own secure password where it says [insert-password-here]
grant all privileges on zabbix.* to [email protected] identified by '[insert-password-here]';
After creating the database, we need to add the initial Zabbix schema and data. To do that, run the following commands (for the MySQL commands, you will be prompted for the Zabbix password you set when you created the database):
mysql -u zabbix -p zabbix < schema.sql
mysql -u zabbix -p zabbix < images.sql
mysql -u zabbix -p zabbix < data.sql
Once schema and data have been added to the database, we need to edit the Zabbix configuration file.
Use a text editor to edit /etc/zabbix/zabbix_server.conf and make sure the following are set:
Once the conf file is set, you can now start the Zabbix server and restart Apache.
sudo service zabbix-server start
sudo service httpd restart
Now, we can go to the web installation. In your browser, go to http://yourhostname-or-ipaddress/zabbix
If you are unsure what you IP address is, run the following:
In our example, we would put http://220.127.116.11/zabbix in the address bar and get the following page. Click Next
Welcome to Zabbix
Make sure everything says OK. If not, look at your php.ini file and make the appropriate changes.
Click next if everything is OK.
Input your database information that you set up earlier and click test connection.
If it says OK click next, if not check your database information again to see if it is accurate.
For most installations, you can keep the defaults. If you would like, you can set a name for the installation. Once done, click next.
Verify your installation and click next.
Click finished to go to the login page.
Note the path to your configuration file and select Finish
You can then log into Zabbix with the default logins.
You may now log in with your default username and password.
Congratulations! You have now installed Zabbix on Centos 6.7. Thank you for following along this how to! Come back for updates, and try a Cloud Hosting solution from Atlantic.Net.