腾讯云线上环境yum安装部署zabbix5.0
zabbix服务器配置
下载和部署zabbix监控
安装zabbix5.0
- 部署zabbix5.0的yum源
# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# yum clean all
# yum makecache
- 安装zabbix服务器和客户端
# yum -y install zabbix-server-mysql zabbix-agent
- 安装zabbix前端
# yum -y install centos-release-scl
- 修改zabbix的yum源配置文件,启用zabbix前端包存储库
# vim /etc/yum.repos.d/zabbix.repo
[zabbix-frontend]
...
enabled=1
- 安装zabbix前端包
# yum -y install zabbix-web-mysql-scl zabbix-apache-conf-scl
部署mariadb数据库
- 安装并开启数据库
yum -y install mariadb mariadb-server
systemctl start mariadb
systemctl enable mariadb
mysqladmin -u root password 'password'
- 配置zabbix库
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
MariaDB [(none)]> create user zabbix@localhost identified by 'zabbix';
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
- 导入zabbix数据,密码输入'zabbix'
[root@Online-Zabbix ~]# zcat /usr/share/doc/zabbix-server-mysql-5.0.17/create.sql.gz | mysql -uzabbix -p zabbix
Enter password:
- 查看导入的zabbix数据
# mysql
MariaDB [(none)]> use zabbix
MariaDB [zabbix]> show tables;
配置zabbix服务端
- 连接数据库
# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
- 修改时区
# vim /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
- 启动zabbix服务和代理进程
# systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
# systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
Zabbix服务端web页面配置
- 访问:http://ip/zabbix
- 页面配置
账户:Admin
密码:zabbix
严格区分大小写
zabbix的web界面改为中文
- web页面右侧 ‘User settings’ ---> 'Language' 修改为‘Chinese(zh_CN)’
网友评论