zabbix5.0 LTS版本部署(MySQL-Apache)
作者:互联网
操作系统版本:
CentOS 7.6
1. 安装zabbix5.0源
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
yum clean all
sed -i 's/repo.zabbix.com/mirrors.aliyun.com\/zabbix/g' /etc/yum.repos.d/zabbix.repo
yum makecache
2. 安装zabbix服务端/客户端
yum install zabbix-server-mysql zabbix-agent -y
3. 安装zabbix前端
启用红帽软件集合
yum install centos-release-scl -y
编辑配置文件 /etc/yum.repos.d/zabbix.repo 并启用 zabbix-frontend。
[zabbix-frontend]
...
enabled=1
...
安装zabbix前端软件包
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y
4. 安装数据库MariaDB
yum install -y mariadb mariadb-server
systemctl start mariadb.service
4.1 登录数据库 设置密码
mysql -u root
mysql> use mysql;
mysql> update user set password=password("password")where user='root';
mysql> flush privileges;
mysql> \q
5. 创建zabbix初始数据库
mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;
5.1 导入初始架构和数据
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -ppassword zabbix
6. 为Zabbix server配置数据库
编辑配置文件 /etc/zabbix/zabbix_server.conf
DBPassword=password
7. 配置PHP
编辑配置文件 /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
8. 修改apache默认端口
vim /etc/httpd/conf/httpd.conf
Listen 778
9. 启动Zabbix server和agent进程
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
10. 配置Zabbix前端
连接到新安装的Zabbix前端: http://server_ip_or_name:778/zabbix
默认管理员:
账户:Admin
密码:zabbix
本人博客:www.wanpeng.life
标签:LTS,zabbix5.0,MySQL,server,etc,zabbix,yum,mysql,password 来源: https://blog.csdn.net/qq_44293827/article/details/120669619