olga 发表于 2019-1-23 14:44:31

zabbix2.2安装配置(1)

  1、安装LAMP环境,并安装依赖包。
# yum -y install httpd php mysql-server
# yum -y install mysql-devel gcc net-snmp-devel crul-devel libxml2-devel perl-DBI php-gd php-mysql php-bcmath php-mbstring php-xml
# chkconfig httpd on
# chkconfig mysqld on  2、添加用户,创建数据库,添加授权账户
# useradd zabbix
# mysqladmin -u root -h localhost password "password"
# mysql -uroot -p
mysql> create database zabbix character set utf8;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';  3、编译安装zabbix,下载地址:http://www.zabbix.com/download.php

# tar -zxvf zabbix-2.2.4.tar.gz
# cd zabbix-2.2.4
# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-liburl --with-libxml2
# make install  4、导入数据库。
# mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/schema.sql
# mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/images.sql
# mysql -uzabbix -pzabbix -hlocalhost zabbix < database/mysql/data.sql  5、修改配置文件,添加服务端口,启动服务。
# cp misc/init.d/fedora/core/zabbix_server /etc/init.d/
# cp misc/init.d/fedora/core/zabbix_agentd /etc/init.d/
# cp -R frontends/php /var/www/html/zabbix
# vim /usr/local/zabbix/etc/zabbix_server.conf
DBUser=zabbix
DBPassword=zabbix
# vim /etc/init.d/zabbix_server
BASEDIR=/usr/local/zabbix
# vim /etc/init.d/zabbix_agentd
BASEDIR=/usr/local/zabbix
# vim /etc/services
zabbix-agent 10050/tcp Zabbix Agent
zabbix-agent 10050/udp Zabbix Agent
zabbix-trapper 10051/tcp Zabbix Trapper
zabbix-trapper 10051/udp Zabbix Trapper
# /etc/init.d/zabbix_server start
# /etc/init.d/zabbix_agentd start
# echo "/etc/init.d/zabbix_server start" >> /etc/rc.local
# echo "/etc/init.d/zabbix_agentd start" >> /etc/rc.local  6、web登录:http://ip/zabbix
  如有fail需要完善系统要求

http://s3.运维网.com/wyfs02/M02/3B/10/wKiom1O8tq_Tz9tzAAM5jJTZkCk009.jpg
# vim /etc/php.ini
post_max_size = 30M
max_execution_time = 300
max_input_time = 300
date.timezone = Asia/Shanghai
# service httpd restart  然后重新检测
http://s3.运维网.com/wyfs02/M01/3B/10/wKioL1O8uBrA0UYbAAMN9LP9DB8910.jpg

http://s3.运维网.com/wyfs02/M00/3B/10/wKiom1O8uY-gmgBeAAKbAwrr8To786.jpg
http://s3.运维网.com/wyfs02/M02/3B/10/wKioL1O8uWDiTkSzAAIa5MKzjb8294.jpg
http://s3.运维网.com/wyfs02/M01/3B/11/wKiom1O8uY-h5nlCAAKi4NqRWXg922.jpg
http://s3.运维网.com/wyfs02/M00/3B/10/wKioL1O8uWCDHhBjAAKBnG8BVWM799.jpg
http://s3.运维网.com/wyfs02/M02/3B/11/wKiom1O8uZDxTW2zAAH_L9sgPoc784.jpg
  




页: [1]
查看完整版本: zabbix2.2安装配置(1)