首页 > 代码库 > 安装zabbix
安装zabbix
zabbix安装: IP 角色 备注 172.16.10.103 zabbix-server 系统:centos6.5zabbix-2.2
172.16.10.104 zabbix-agentd 系统:centos6.5 zabbix-2.2 1. rpm安装 1).
配置yum源: rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm 2).
server端安装: yum -y install zabbix-server zabbix-agent zabbix-web zabbix-web-mysql zabbix-sender zabbix-get zabbix-server-mysql 3)
linux client端安装: yum -y install zabbix-agent zabbix-get zabbix-sender 2. 源码包安装 1).
安装web环境: # yum -y install mysql-server mysql-devel httpd php php-* # service httpd start && service mysqld start 2). server & client 下载地址: # wget http://docs.minunix.com/zabbix/zabbix-2.2.4.tar.gz -O /usr/local/src/zabbix-2.2.4.tar.gz 3). 解压: # cd /usr/local/src && tar xf zabbix-2.2.4.tar.gz 4).
server 端安装: # cd zabbix-2.2.4 # ./configure --prefix=/opt/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp # make && make install 5). client 安装: # cd zabbix-2.2.4 # ./configure --prefix=/opt/zabbix --enable-agent --with-net-snmp # make && make install 6). 导入数据库: 注意导入sql顺序!!! # mysql mysql> create database zabbix character set utf8; mysql> grant all on zabbix.* to zabbix@’172.16.10.103’ identified by ‘123456’; mysql> flush privileges; mysql> use zabbix; mysql> source /usr/local/src/zabbix-2.2.4/database/mysql/schema.sql; mysql> source /usr/local/src/zabbix-2.2.4/database/mysql/images.sql; mysql> source /usr/local/src/zabbix-2.2.4/database/mysql/data.sql; 7). 修改zabbix_server.conf文件: # cat /opt/zabbix/etc/zabbix_server.conf |egrep -v "^#|^$" LogFile=/tmp/zabbix_server.log PidFile=/tmp/zabbix_server.pid DBHost=test103 DBName=zabbix DBUser=zabbix DBPassword=123456 DBPort=3306 Timeout=30 8). 修改zabbix_agentd.conf文件: # cat /opt/zabbix/etc/zabbix_agentd.conf |egrep -v "^#|^$" Server=test103 BufferSize=1024 Timeout=30 HostnameItem=system.hostname StartAgents=3 DebugLevel=3 PidFile=/tmp/zabbix_agentd.pid LogFile=/tmp/zabbix_agentd.log LogFileSize=100 BufferSend=5 BufferSize=128 9). 启动程序: 启动zabbix_server: # /opt/zabbix/sbin/zabbix_server -c /opt/zabbix/etc/zabbix_server.conf 启动zabbix_agentd: # /opt/zabbix/sbin/zabbix_agentd -c /opt/zabbix/etc/zabbix_agentd.conf 10). 拷贝web项目文件: (server端操作) # mkdir -p /var/www/html/zabbix # /bin/cp -rf /usr/local/src/zabbix-2.2.4/frontends/php/* /var/www/html/zabbix/ # chown -R apache.apache /var/www/html/zabbix 注意: apache为httpd运行的用户, 如果你的服务是由其他用户运行,请自行更改 11). web UI 配置: 访问http://172.16.10.103/zabbix zabbix默认用户名 / 密码: admin / zabbix
安装zabbix