zabbix linux服務端安裝

一、搭建LAMP環境

二、安裝zabbix服務端

1、Install some other required packages and Zabbix repository.

[root@dlp ~]# yum -y install php-mysql php-gd php-xml php-bcmath 


[root@dlp ~]# yum -y install http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm



2、Install Zabbix server.

[root@dlp ~]# yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix_get



3、Create a database for Zabbix.

[root@dlp ~]# mysql -u root -p 


Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 

create database zabbix; 


Query OK, 1 row affected (0.00 sec)

mysql> 

grant all privileges on zabbix.* to zabbix@'localhost' identified by 'password'; 


Query OK, 0 rows affected (0.00 sec)

mysql> 

grant all privileges on zabbix.* to zabbix@'%' identified by 'password'; 


Query OK, 0 rows affected (0.00 sec)

mysql> 

flush privileges; 


Query OK, 0 rows affected (0.00 sec)

mysql> 

exit 


Bye

[root@dlp ~]# 

cd /usr/share/doc/zabbix-server-mysql-*/create 


[root@dlp create]# 

mysql -u root -p zabbix < schema.sql 


Enter password:
[root@dlp create]# 

mysql -u root -p zabbix < images.sql 


Enter password:
[root@dlp create]# 

mysql -u root -p zabbix < data.sql 

Enter password:


4、Configure and start Zabbix server.

[root@dlp ~]# 

vi /etc/zabbix/zabbix_server.conf

# line 73: add


DBHost=localhost

# line 107: add DB password for Zabbix


DBPassword=password

[root@dlp ~]# 

/etc/rc.d/init.d/zabbix-server start 


Starting ZABBIX server:

[ OK ]


[root@dlp ~]# 

chkconfig zabbix-server on 


5、Configure and start Zabbix Agent to monitor Zabbix server itself.

[root@dlp ~]# 

vi /etc/zabbix/zabbix_agentd.conf

# line 85: specify Zabbix server


Server=

127.0.0.1

# line 126: specify Zabbix server


ServerActive=

127.0.0.1

# line 137: change to the own hostname


Hostname=

dlp.server.world

[root@dlp ~]# 

/etc/rc.d/init.d/zabbix-agent start 


Starting ZABBIX agent:

[ OK ]


[root@dlp ~]# 

chkconfig zabbix-agent on 


6、Change httpd settings like follows.

[root@dlp ~]# 

vi /etc/httpd/conf.d/zabbix.conf

# line 11: change access permittion for Zabbix frontend


Allow from 

localhost 10.0.0.0/24

# line 18: uncomment and change to your timezone


php_value date.timezone 

Asia/Tokyo

[root@dlp ~]# 

/etc/rc.d/init.d/httpd restart 


Stopping httpd:

[ OK ]


Starting httpd:

[ OK ]




發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章