YUM方式安装Zabbix

1、选择适用的源扩展
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/5/x86_64/zabbix-release-2.4-1.el5.noarch.rpm

# yum groupinstall “Development Tools” -y
# yum groupinstall “Development Libraries” -y
# yum install zlib libpng libjpeg fontconfig gd libxml2 libgd-devel libpng-devel libjpeg-devel zlib-devel gd-devel freetype freetype-devel libxml libxml-devel -y
# yum install cmake -y
# yum install ncurses ncurses-devel -y
# yum install libxml2 libxml2-devel -y
# yum install openssl openssl-devel -y
# yum install curl curl-devel -y
# yum install libevent libevent-devel -y
# yum -y install net-tools lrzsz gcc gcc-c++ make cmake libxml2-devel openssl-devel curl curl-devel unzip sudo ntp libaio-devel wget vim ncurses-devel autoconf automake zlib* fiex* libxml* libmcrypt* libtool-ltdl-devel* python-devel -y

# yum install httpd php mysql mysql-server php-mysql

2、在监控端安装zabbix server和zabbix agent,再被监控端安装zabbix agent

# yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-sender

# yum install zabbix-agent zabbix-sender

3、监控端数据库导入
mysql> create database zabbix character set utf8;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘zabbix’;

mysql> flush privileges;

# cd /usr/share/doc/zabbix-server-mysql-2.4.0/create
# mysql -uroot zabbix < schema.sql # mysql -uroot zabbix < images.sql # mysql -uroot zabbix < data.sql 4、配置数据库信息 # vi /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix Start Zabbix server process. # service zabbix-server start 5、PHP参数值建议 max_execution_time 300 memory_limit 128M post_max_size 16M upload_max_filesize 2M max_input_time 300 6、启动服务 # service httpd restart # service mysqld restart # service zabbix-server restart # service zabbix-agent restart

One thought on “YUM方式安装Zabbix”

发表评论

电子邮件地址不会被公开。 必填项已用*标注