zabbix安装记录

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


更新最新的zabbix源


rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm


#安装zabbix服务器、客户端、mysql服务器
yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mysql-server
#启动mysql服务器
service mysqld start
#mysql相关安全设置
/usr/bin/mysql_secure_installation
#进入建表脚本目录
cd /usr/share/doc/zabbix-server-mysql-2.4.6/create
#进入mysql命令模式
mysql
#创建数据库、表、授权
shell> mysql -uroot -ptongx
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'pid123';
myslq> grant all privileges on zabbix.* to zabbix@192.168.162.1 identified by 'pid123';
myslq> grant all privileges on zabbix.* to zabbix@10.128.250.40 identified by 'pid123';
mysql> quit;
shell> mysql -uzabbix -ppid123 zabbix < schema.sql
stop here if you are creating database for Zabbix proxy
shell> mysql -uzabbix -ppid123 zabbix < images.sql
shell> mysql -uzabbix -ppid123 zabbix < data.sql
##配置服务器端
vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=pid123
##启动服务器
service zabbix-server start ##stop restart
##启动客户端
service zabbix-agent start ##stop restart


##配置php
vi /etc/httpd/conf.d/zabbix.conf 
php_value date.timezone Asia/Shanghai
service httpd start ##stop restart


##关闭SELINUX
setenforce 0


--------
虚机每次启动的时候,要启动下列服务,或者把服务配置到自动启动中去也可以。
service mysqld start && service zabbix-server start && service zabbix-agent start && service httpd start && setenforce 0
posted @ 2016-04-26 18:33  iamliuxin  阅读(144)  评论(0编辑  收藏  举报