Thursday, 3 October 2013

How to install zabbix in rhel 6.X / Centos 6.X

Information about my system:-

Linux 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

[root@upload2 ~]# rpm -ivh epel-release-6-8.noarch.rpm
[root@upload2 ~]# rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
[root@upload2 ~]# rpm -ivh
[root@upload2 ~]# yum install httpd php php-mysql mysql-server
[root@upload2 ~]# service mysqld start
[root@upload2 ~]# mysqladmin -u root password password
[root@upload2 ~]# mysql -u root -ppassword
mysql> use mysql;
mysql> DELETE FROM mysql.user WHERE user = '';
mysql> flush privileges;
mysql> quit
[root@upload2 ~]# yum install zabbix-server-mysql zabbix-agent zabbix-web-mysql
[root@upload2 ~]# mysql -u root -ppassword
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> quit
[root@upload2 ~]# cd /usr/share/doc/zabbix-server-mysql-2.0.8/create/
[root@upload2 create]# mysql -u root -ppassword zabbix < schema.sql
[root@upload2 create]# mysql -u root -ppassword zabbix < images.sql
[root@upload2 create]# mysql -u root -ppassword zabbix < data.sql
[root@upload2 create]# vi /etc/zabbix/zabbix_server.conf
81 DBHost=localhost
91 DBName=zabbix
107 DBUser=zabbix
115 DBPassword=zabbix

[root@upload2 create]# vi /etc/zabbix/zabbix_agentd.conf

138 #Hostname=Zabbix server

[root@upload2 create]# vim /etc/php.ini

# line 440: change to Zabbix recomended

max_execution_time = 600
# line 449: change to Zabbix recomended

max_input_time = 600
# line 457: change to Zabbix recomended

memory_limit = 256M
# line 729: change to Zabbix recomended

post_max_size = 32M
# line 878: change to Zabbix recomended

upload_max_filesize = 16M
# line 946: uncomment and add your timezone

date.timezone = Asia/Calcutta
[root@upload2 create]# vi /etc/httpd/conf.d/zabbix.conf
Alias /zabbix /usr/share/zabbix

<Directory "/usr/share/zabbix">
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all   ------- > if u need specify particular ip range here.

    php_value max_execution_time 600
    php_value memory_limit 256M
    php_value post_max_size 32M
    php_value upload_max_filesize 16M
    php_value max_input_time 600
    php_value date.timezone Asia/Calcutta

[root@upload2 create]# vim /etc/httpd/conf/httpd.conf
276 ServerName
[root@upload2 create]# service zabbix-server start
[root@upload2 create]# service zabbix-agent restar 
[root@upload2 create]# service httpd restart

Change to "zabbix in "User" field and input the password. Next, click "Test Connection" and id it's "OK" like follows, go next

Input ZABBIX server's hostname and so on like follows

Make sure settings and if it's Ok all, go next



 Default username/password is Admin/zabbix. 

No comments:

Post a Comment