Install Zabbix 2.2.1 on CentOS 6.5

Server and Client Platform: CentOS 6.5 x86_64
Windows client platform: Windows server 2012

Note: please setup NTP for time synchronization

1.Set Up Apache, MySQL and PHP 

for Database:
yum -y install mysql mysql-server mysql-devel

for frontend:
yum -y install httpd httpd-devel php php-cli php-common php-devel php-pear php-gd php-bcmath php-mbstring php-mysql php-xml

for server:
yum -y install zlib-devel glibc-devel libcurl-devel OpenIPMI-devel libssh2-devel net-snmp-devel openldap-devel
yum -y install fping iksemel-devel(using fedora epel repo -- rpm -ivh http://mirrors.sohu.com/fedora-epel/6Server/x86_64/epel-release-6-8.noarch.rpm)

2. vi /etc/my.cnf
[mysqld]
default-storage-engine=INNODB

service httpd start
service mysqld start
chkconfig httpd on
chkconfig mysqld on

3. Install the repository configuration package
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm

4. for Zabbix server and web frontend with mysql database
yum -y install zabbix-server-mysql zabbix-web-mysql

5. for Zabbix agent -- on zabbix server and linux client
yum -y install zabbix-agent

6.Create zabbix database and user on MySQL.
# mysql -u root
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
mysql> flush privileges;
mysql> exit

Import initial schema and data.
# cd /usr/share/doc/zabbix-server-mysql-2.2.1/create
# mysql -uroot zabbix < schema.sql
# mysql -uroot zabbix < images.sql
# mysql -uroot zabbix < data.sql

7.Edit database configuration in zabbix_server.conf
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
Start Zabbix server process.
# service zabbix-server start
chkconfig zabbix-server on

8.Apache configuration file for Zabbix frontend is located in /etc/httpd/conf.d/zabbix.conf.
Some PHP settings are already configured.
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 Asia/Shanghai
It's necessary to uncomment the “date.timezone” setting and set the right timezone for you. After changing the configuration file restart the apache web server.
# service httpd restart

9. Zabbix frontend is available at http://zabbix-frontend-hostname/zabbix in the browser. Default username/password is Admin/zabbix.

10. For zabbix agent configuration
vi /etc/zabbix/zabbix_agentd.conf
#Server=[zabbix server ip] --This is for zabbix agent Passive check, port 10050
#ServerActive=[zabbix server ip] --This is for zabbix agent(active) Active check, port 10051
#Hostname=[ Hostname of client system ]
#hostname value set on the agent side should exactly match the ”Host name” configured for the host in the web frontend

Server=192.168.1.11
ServerActive=192.168.1.11
Hostname=Linux Client

service zabbix-agent start
chkconfig zabbix-agent on

11. For installing zabbix agent on Windows Server 2012 client

a).download zabbix_agents_2.2.1.win.zip and extract to c:\zabbix
wordpad c:\zabbix\zabbix_agentd.win.conf
#Server=[zabbix server ip]  --This is for zabbix agent Passive check, port 10050
#ServerActive=[zabbix server ip] --This is for zabbix agent(active) Active check, port 10051
#Hostname=[ Hostname of client system ]
#hostname value set on the agent side should exactly match the ”Host name” configured for the host in the web frontend

Server=192.168.1.11
ServerActive=192.168.1.11
Hostname=Windows Client

b).c:\zabbix\bin\win64\zabbix_agentd.exe --config c:\zabbix\zabbix_agentd.win.conf --install

c).using services.msc to start zabbix agent

d).open inbound firewall port for 10050

12. Add linux and windows client in zabbix web frontend

Nhận xét

Bài đăng phổ biến từ blog này

CLEANING UP THE ZABBIX DATABASE

Configuring DHCP Relay service on the FortiGate unit

WAN link load balancing