shellrpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
jscd /etc/yum.repos.d
更换阿里云仓库
jssed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix.repo
jsyum install zabbix-server-mysql zabbix-agent -y
jsyum install -y centos-release-scl
注意
安装后它会把文件放到 /opt/rh 目录下
jsvi /etc/yum.repos.d/zabbix.repo
jsyum install -y zabbix-web-mysql-scl zabbix-apache-conf-scl
jsyum install -y mariadb-server
bashsystemctl enable --now mariadb
jssystemctl status mariadb
bashmysql_secure_installation
shellmysql -uroot -p
sqlcreate database zabbix character set utf8 collate utf8_bin;
创建用户设置只能本地连接,并且设置密码。
sql create user zabbix@localhost identified by '123456789';
对zabbix用户进行授权
sqlgrant all privileges on zabbix.* to zabbix@localhost;
刷新授权
sqlflush privileges;
bashzcat /usr/share/doc/zabbix-server-mysql-5.0.34/create.sql.gz | mysql -uzabbix -p zabbix
vi /etc/zabbix/zabbix_server.conf
相关信息
把DBPassword注释去掉,填写数据库密码。
jsvi /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
jsphp_value[date.timezone] = Asia/Shanghai
bashsystemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
ip/zabbix
js默认登录账号密码
Admin
zabbix
1、查看防火墙和selinux是否关闭
jssystemctl stop firewalld ///关闭防火墙
setenforce 0 ///关闭selinux
2、查看数据库是否启动
jsstatus mariadb ///查看数据库启动状态
start mariadb ///启动数据库
本文作者:松轩(^U^)
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!