安装zabbix3.0系统环境[root@centos7 ~]# cat /etc/redhat-releaseCentOS Linux release 7.5.1804 (Core)[root@centos7 ~]# uname -r3.10.0-862.el7.x86_64[root@centos7 ~]# systemctl status firewalld● fir...
安装zabbix3.0
系统环境
[root@centos7 ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core) [root@centos7 ~]# uname -r 3.10.0-862.el7.x86_64 [root@centos7 ~]# systemctl status firewalld ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) [root@centos7 ~]# getenforce Disabled
如何下载zabbix服务端
官网下载地址:https://www.zabbix.com/download
zabbix服务端安装
下载
官网下载地址:https://www.zabbix.com/download
rpm -ivh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
为什么选择zabbix-release版本:
因为下载这个版本会在yum.repos.d下面生成一个zabbix.repo的文件
检查是否下载成功:主要检查/etc/yum.repos.d/目录中没有zabbix.repo这个文件
[root@centos7 ~]# ls /etc/yum.repos.d/ CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo zabbix.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo epel.repo
安装软件
yum install -y zabbix-server-mysql zabbix-web-mysql mariadb-server
修改PHP时区设置
sed -i.ori '18a php_value date.timezone Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf
启动mysql并创建zabbix库与zabbix用户
systemctl start mariadb.service
mysql -e 'create database zabbix character set utf8 collate utf8_bin;'
mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";'
导入zabbix数据至数据库
gzip -d /usr/share/doc/zabbix-server-mysql-3.0.22/create.sql.gz
mysql -uzabbix -pzabbix zabbix < /usr/share/doc/zabbix-server-mysql-3.0.22/create.sql
配置zabbix配置文件
sed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf
解决中文乱码
yum -y install wqy-microhei-fonts
\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
启动服务
systemctl start zabbix-server
systemctl start httpd
浏览器访问
访问地址是:
echo "浏览器访问 http://`hostname -I|awk '{print $1}'`/zabbix"
快速安装命令
rpm -ivh https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm cat /etc/yum.repos.d/zabbix.repo yum install zabbix-server-mysql zabbix-web-mysql mariadb-server -y rpm -qa zabbix-server-mysql zabbix-web-mysql mariadb-server yum install zabbix-server-mysql zabbix-web-mysql mariadb-server -y sed -i.ori '18a php_value date.timezone Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf systemctl start mariadb.service mysql -e 'create database zabbix character set utf8 collate utf8_bin;' mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";' gzip -d /usr/share/doc/zabbix-server-mysql-3.0.22/create.sql.gz mysql -uzabbix -pzabbix zabbix < /usr/share/doc/zabbix-server-mysql-3.0.22/create.sql sed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf yum -y install wqy-microhei-fonts \cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf systemctl start zabbix-server systemctl start httpd
本文标题为:centos7.5安装zabbix3.0
基础教程推荐
- 服务器添加git钩子的步骤 2022-12-12
- centos 7 安装及配置zabbix agent 2023-09-24
- linux之conda环境安装全过程 2023-07-11
- Apache服务器配置攻略3 2022-09-01
- apache和nginx结合使用 2023-09-10
- 实战Nginx_取代Apache的高性能Web服务器 2023-09-29
- IIS 6 的 PHP 最佳配置方法 2022-09-01
- linux下安装apache与php;Apache+PHP+MySQL配置攻略 2023-08-07
- Apache Hudi数据布局黑科技降低一半查询时间 2022-10-06
- nginx.conf(centos7 1.14)主配置文件修改 2023-09-23