博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
zabbix3.4 安装服务端方法
阅读量:6978 次
发布时间:2019-06-27

本文共 1810 字,大约阅读时间需要 6 分钟。

主机名称 操作系统 IP地址
zabbix CentOS 7.4 192.168.26.56

1.修改主机名,修改host

hostnamectl set-hostname zabbix.rhce.ccecho '192.168.26.56 zabbix.rhce.cc zabbix' >> /etc/hosts

2关闭防火墙及seLinux

firewall-cmd --set-default-zone=trustedsed -i '/SELINUX=/cSELINUX=disabled' /etc/selinux/configsetenforce 0

3关闭 NetworkManager

systemctl stop NetworkManagersystemctl disable NetworkManager

4.配置yum源及包

rm -rf /etc/yum.repos.d/*curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repocurl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.reporpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

5.安装软件

yum install zabbix-server-mysql zabbix-proxy-mysql  zabbix-web-mysql zabbix-get zabbix-agent -yyum install *open*vm*tool bash* vim lrzsz wget tree  -y

6安装mariadb数据库

yum install -y  mariadb-serversystemctl start mariadb.service

7创建数据库

mysql -e 'create database zabbix character set utf8 collate utf8_bin;'mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";'

8导入数据

zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix  zabbix

9配置zabbixserver连接mysql

sed -i.ori '91a  DBHost=localhost' /etc/zabbix/zabbix_server.confsed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf

10添加时区

sed -i.ori '18a php_value date.timezone Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf

11解决中文乱码

yum -y install wqy-microhei-fonts\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc  /usr/share/fonts/dejavu/DejaVuSans.ttf

12启动服务

systemctl restart mariadb.servicesystemctl start zabbix-serversystemctl start httpdsystemctl enable mariadb.servicesystemctl enable httpdsystemctl enable zabbix-server

13输出信息

echo "浏览器访问 http://hostname -I|awk '{print $1}'/zabbix"

转载于:https://blog.51cto.com/12909202/2311667

你可能感兴趣的文章
sql server时间转换
查看>>
CDH大数据集群安全风险汇总
查看>>
数据结构实验之链表一:顺序建立链表
查看>>
docker Rails Permission denied @ dir_s_mkdir
查看>>
【二分答案】【最短路】bzoj1614 [Usaco2007 Jan]Telephone Lines架设电话线
查看>>
【贪心】Google Code Jam Round 1A 2018 Waffle Choppers
查看>>
【转载】【贪心】各种覆盖问题
查看>>
HDU 6051 - If the starlight never fade | 2017 Multi-University Training Contest 2
查看>>
insert into与insert ignore以及replace into的区别
查看>>
【网络流24题】最小路径覆盖问题
查看>>
java分享第五天(数组)
查看>>
数组与纠结的排序篇
查看>>
Linux命令-安装zip和unzip命令
查看>>
day03-字符编码与转换
查看>>
JS+CSS控制左右切换鼠标可控的无缝图片滚动代码
查看>>
C# 实现HTML转换成图片的方法
查看>>
访问本班同学的博客
查看>>
第一周
查看>>
ajax
查看>>
(转)mongodb分片
查看>>