(前要提示) 本次服务是在一台全新的linux centos8.1 的环境下实验的。
第一步:
关闭selinux,
打开:vim/etc/selinux/config
SELINUX=Disabled
关闭防火墙:systemctl stop firewalld.service
第二步:
下载所需要的服务:
yum install -y httpd mysql-server php php-mysqlnd php-mbstring php-pdo php-gd
第三步:
开启所需要的服务:
systemctl start httpd.service
systemctl start mysqld.service
systemctl start php-ftp...
第四步:
初始化数据库步骤:
mysql_secure_installation Securing the MySQL server deployment. Connecting to MySQL using a blank password.
进入数据库:
mysql -uroot -p
创建数据库:create database zabbix character set UTF8 collate utf8_bin;
创建用户: create user 'zabbix'@'localhost' identified by 'Password';
给与权限: grant ALL on zabbix.* to 'zabbix'@'localhost';
第五步:
wget 下载有zabbix下载源的文件
wget https://repo.zabbix.com/zabbix/4.4/rhel/8/x86_64/zabbix-release-4.4-1.el8.noarch.rpm
1:安装zabbix相关的服务:
dnf install -y zabbix-server-mysql zabbix-web-mysql zabbix- apache-conf
2:向数据库中添加zabbix需要的相关数据表:
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -D zabbix -pShanghai2010@
3:配置zabbix服务器:
3.1:进入:vim /etc/zabbix/zabbix_server.conf
3.2: DBHost=localhost (本地主机)
DBName=zabbix (数据库名称)
DBUser=zabbix (数据库用户名称)
DBPassword=Password (数据库密码)
3.3:下载zabbix客户端:
dnf install -y zabbix-agent
4:启动服务:
systemctl start zabbix-age....
systemctl start zabbix-ser....
5:启动所有服务后,访问http://192.168.0.101/zabbix即可进入zabbix监控界面(ip地址改成自己的)
linux Centos8.1 Zabbix安装(学习记录)
最新推荐文章于 2023-01-12 14:09:47 发布