标签:zabbix 安装
1.环境:lamp环境
2.安装前工作:先关闭selinux,iptables
3.Zabbix软件源
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
4.安装Zabbix 以及所需环境并设置服务为开机启动
# yum install -y mysql mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent # chkconfig zabbix-server on # chkconfig zabbix-agent on # chkconfig httpd on # service httpd start # chkconfig mysqld on
5.创建“zabbix”服务运行所需用户和组并设置权限
# groupadd -g 201 zabbix # useradd -g zabbix -u 201 -m zabbix
6.初始化mysql服务器
# service mysqld start
7.创建zabbix运行所需要的数据库和用户权限
# mysql -uroot mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@chang identified by ‘zabbix‘;
8.将zabbix的初始数据导入到数据库中
# cd /usr/share/doc/zabbix-server-mysql-2.4.7/create/ # mysql -uroot zabbix < schema.sql # mysql -uroot zabbix < images.sql # mysql -uroot zabbix < data.sql
9.编辑zabbix-server配置文件
# vim /etc/zabbix/zabbix_server.conf LogFile=/var/log/zabbix/zabbix_server.log LogFileSize=0 PidFile=/var/run/zabbix/zabbix_server.pid DBHost=172.16.100.67 DBName=zabbix DBUser=zbxuser DBPassword=zbxpass DBSocket=/var/lib/mysql/mysql.sock SNMPTrapperFile=/var/log/snmptt/snmptt.log AlertScriptsPath=/usr/lib/zabbix/alertscripts ExternalScripts=/usr/lib/zabbix/externalscripts
10.编辑php.ini文件并重启httpd服务
# cp /etc/php.ini /etc/php.ini.bak # vim /etc/php.ini max_execution_time = 300 max_input_time = 300 post_max_size = 16M date.timezone = Asia/Shanghai # service httpd restart
11.设置时区
# ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime # yum install ntpdate 安装ntpdate # ntpdate us.pool.ntp.org 同步时间
12.访问zabbix web
登录名为:Admin(区分大小写) 密码:zabbix
本文出自 “9470860” 博客,请务必保留此出处http://9480860.blog.51cto.com/9470860/1732195
标签:zabbix 安装
原文地址:http://9480860.blog.51cto.com/9470860/1732195