Difference between revisions of "Zabbix Server Installation"

From Michael's Information Zone
Jump to navigation Jump to search
(Created page with "==CentOS 7== rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm yum install zabbix-server-mysql zabbix-web-mysql yum install maria...")
 
Line 12: Line 12:
 
mysql> quit;
 
mysql> quit;
 
shell> cd database/mysql
 
shell> cd database/mysql
 +
cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
 
shell> mysql -uzabbix -p<password> zabbix < schema.sql
 
shell> mysql -uzabbix -p<password> zabbix < schema.sql
# stop here if you are creating database for Zabbix proxy
 
 
shell> mysql -uzabbix -p<password> zabbix < images.sql
 
shell> mysql -uzabbix -p<password> zabbix < images.sql
 
shell> mysql -uzabbix -p<password> zabbix < data.sql
 
shell> mysql -uzabbix -p<password> zabbix < data.sql
</pre>
 
The following steps need to be better integrated with the above commands
 
<pre>
 
cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
 
# mysql -uroot zabbix < schema.sql
 
# mysql -uroot zabbix < images.sql
 
# mysql -uroot zabbix < data.sql
 
 
</pre>
 
</pre>
 
Edit the Zabbix Server configuration file
 
Edit the Zabbix Server configuration file

Revision as of 13:39, 24 April 2016

CentOS 7

rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql
yum install mariadb-server mariadb

The following commands are for database creation, but they are not specific. Needs work

shell> mysql -uroot -p<password>
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>';
mysql> flush privileges;
mysql> quit;
shell> cd database/mysql
cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
shell> mysql -uzabbix -p<password> zabbix < schema.sql
shell> mysql -uzabbix -p<password> zabbix < images.sql
shell> mysql -uzabbix -p<password> zabbix < data.sql

Edit the Zabbix Server configuration file

# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

Start the zabbix server

systemctl start zabbix-server

Edit the php configuration file to use the correct time zone /etc/httpd/conf.d/zabbix.conf

php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value date.timezone America/New_York

Start http

systemctl start httpd 

Configure SELinux to allow the above services network access

setsebool -P zabbix_can_network=true
setsebool -P httpd_can_network_connect=true

Enable all service

systemctl enable mariadb
systemctl enable httpd
systemctl enable zabbix-server

At this point you should be able to access the web interface by going to <IP of host>/zabbix. User/password is admin/zabbix.

If everything is working reboot the server, and test again.

https://www.zabbix.com/documentation/3.0/manual/installation/install_from_packages

https://www.zabbix.com/documentation/3.0/manual/appendix/install/db_scripts

https://www.zabbix.com/forum/showthread.php?p=169500

https://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos