脚本宝典收集整理的这篇文章主要介绍了Centos 7安装ZABBIX5.0,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
Systemctl stop firewalld
systemctl disable firewalld
sed -i ‘7s/enforcing/disabled/’ /etc/selinux/config
rpm -Uvh https://repo.zabbix.COM/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum -y install zabbix-server-MySQL
yum -y install centos-release-scl
vim /etc/yum.repo.d/zabbix.repo
yum -y install zabbix-web-mySQL-scl zabbix-nginx-conf-scl
yum -y install mariadb-server
systemctl start mariadb
systemctl enable mariadb
# mariadb安装好之后没有密码可以直接登录
create database zabbix character set utf8 collate utf8_bin;
grant all on zabbix.* to zabbix@localhost identified by 'zabbix';
zcat /usr/share/doc/zabbix-server-mysql-5.0.17/create.sql.gz > zabbix.sql
mysql -uzabbix -pzabbix < zabbix.sql #在zabbix.sql首行中添加USE zabbix
vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
cd /etc/opt/rh/rh-php72/
vim php-FPM.d/zabbix.conf
#date.timezone前的;要删掉
cd /etc/opt/rh/rh-nginx116
vim conf.d/zabbix.conf
# 把nginx的server注释了
cd /etc/opt/rh/rh-nginx116/nginx
vim nginx.conf
systemctl start zabbix-server rh-php72-php-fpm rh-nginx116-nginx
systemctl enable zabbix-server rh-php72-php-fpm rh-nginx116-nginx
有9000、3306、80、10051代表服务都正常了
全是ok就行了,如果有一项不是ok就需要解决对应的选项
登录zabbix,账号:Admin 密码:zabbix# 安装依赖
yum -y install wqy-microhei-fonts
# 替换文件
cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
# 重启服务
systemctl restart zabbix-server
以上是脚本宝典为你收集整理的Centos 7安装ZABBIX5.0全部内容,希望文章能够帮你解决Centos 7安装ZABBIX5.0所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。