最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
CentOS 7.1安装Zabbix2.5(Zabbix3.0的Alpha版)教程
时间:2022-11-14 22:09:45 编辑:袖梨 来源:一聚教程网
安装环境
系统:CentOS7.1
Apache:2.4.6
MySQL:5.6.26
PHP:5.6.12
安装Zabbix之前
获取Zabbix2.5源代码
# cd /tmp
# wget 'http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Development/2.5.0/zabbix-2.5.0.tar.gz'
# tar -zxvf zabbix-2.5.0.tar.gz
添加zabbix用户
# groupadd zabbix
# useradd -g zabbix zabbix
创建Zabbix数据库
# mysql -uroot
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'YOURPASSWORD';
mysql> exit
导入数据
# cd /tmp/zabbix-2.5.0/database/mysql
# mysql -uroot zabbix < schema.sql
# mysql -uroot zabbix < images.sql
# mysql -uroot zabbix < data.sql
编译安装Zabbix
准备编译安装
# yum -y install gcc libxml2-devel net-snmp-devel libcurl-devel
准备编译
# cd /tmp/zabbix-2.5.0
# ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2
~ 省略 ~
Configuration:
Detected OS: linux-gnu
Install path: /usr/local
Compilation arch: linux
Compiler: gcc
Compiler flags: -g -O2 -I/usr/include/mysql -g -m64 -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -I/usr/include/libxml2 -I/usr/local/include -I/usr/lib64/perl5/CORE -I. -I/usr/include
Enable server: yes
Server details:
With database: MySQL
WEB Monitoring: cURL
Native Jabber: no
SNMP: yes
IPMI: no
SSH: no
ODBC: no
Linker flags: -rdynamic -L/usr/lib64/mysql -L/usr/lib64
Libraries: -lm -ldl -lresolv -lmysqlclient -lxml2 -lnetsnmp -lcurl
Enable proxy: no
Enable agent: yes
Agent details:
Linker flags: -rdynamic
Libraries: -lm -ldl -lresolv -lcurl
Enable Java gateway: no
LDAP support: no
IPv6 support: yes
***********************************************************
* Now run 'make install' *
* *
* Thank you for using Zabbix! *
* *
***********************************************************
编译及安装
# make install
安装Zabbix之后
修改php.ini
# sed -i -e "s/memory_limit = 128M/memory_limit = 256M/g" /etc/php.ini
# sed -i -e "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php.ini
# sed -i -e "s/max_execution_time = 30/max_execution_time = 300/g" /etc/php.ini
# sed -i -e "s/max_input_time = 60/max_input_time = 300/g" /etc/php.ini
# sed -i -e "s/;date.timezone =/date.timezone = Asia/Chongqing/g" /etc/php.ini
# sed -i -e "s/;always_populate_raw_post_data/always_populate_raw_post_data/g" /etc/php.ini
修改Zabbix配置文件
修改DBName、DBUser、DBPassword参数,必须和MySQL配置的数据库名,用户名,密码一致。
# vi /usr/local/etc/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=YOURPASSWORD
# mkdir /var/www/html/zabbix
# cp -a /tmp/zabbix-2.5.0/frontends/php/* /var/www/html/zabbix
# chown -R apache:apache /var/www/html/zabbix/*
启动Zabbix
# /usr/local/sbin/zabbix_server
启动Apache
# systemctl start httpd
Web界面安装Zabbix
启动浏览器,访问http://YourIP/zabbix
1) 点击「Next step」
- 用户名:Admin
- 密码:zabbix
相关文章
- 云星穹铁道权益升级怎么玩 云崩铁权益升级活动介绍 12-03
- 以闪亮之名山中绘梦怎么玩 以闪亮之名滢然花梦套装活动介绍 12-03
- 以闪亮之名绿野梦歌礼包怎么样 以闪亮之名绿野梦歌拍照礼包介绍 12-03
- 光遇12.6有什么更新 光遇12月6日更新内容介绍 12-03
- 伍六七暗影交锋测试资格怎么获得 伍六七暗影交锋内测资格获取方法 12-03
- 无限暖暖晶莹诗集怎么样 12-03