龙空技术网

centos7.9安装zabbix4.4

自由的风152185891 132

前言:

眼前你们对“apachelinux下载64位”大约比较重视,姐妹们都想要分析一些“apachelinux下载64位”的相关知识。那么小编也在网络上汇集了一些对于“apachelinux下载64位””的相关文章,希望你们能喜欢,咱们快快来学习一下吧!

centos7.9安装zabbix4.4部署方法参考官网官网地址

关闭防火墙和SELINUX安全模式

#关闭防火墙并设置开机不启动[root@zabbix-server ~]# systemctl disable firewalldRemoved symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.关闭SElinux安全模式[root@zabbix-server ~]# setenforce 0[root@zabbix-server ~]# getenforcePermissive[root@zabbix-server ~]# vi /etc/selinux/config修改以下内容:SELINUX=disabled按:wq保存退出即可。重启生效。[root@zabbix-server ~]# reboot
添加 Zabbix 软件仓库

安装软件仓库配置包,这个配置包含了 yum(软件包管理器)的配置文件。

# rpm -ivh  yum clean all

安装Zabbix server,Web前端,agent

# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

安装 Zabbix proxy 并使用 MySQL 数据库:

# yum install zabbix-proxy-mysql
安装配置mysql5.7下载mysql官网的仓库
wget -i -c 
安装mysql仓库
yum -y install mysql57-community-release-el7-10.noarch.rpm
安装mysql服务
yum -y install mysql-community-server
启动mysql服务并设置开机启动
systemctl start mysqld.servicesystemctl enable mysqld.service
查找mysql的root初始密码(本例初始密码:HCrg+=WWp2yj)
[root@localhost ~]# grep "password" /var/log/mysqld.log2022-12-01T22:08:41.639829Z 1 [Note] A temporary password is generated for root@localhost: HCrg+=WWp2yj[root@localhost ~]#

用初始密码登录数据库

[root@localhost ~]# mysql -uroot -pEnter password:HCrg+=WWp2yjWelcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.7.40Copyright (c) 2000, 2022, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>

执行下面命令更改root初始密码为:lkS1Rc4du_M_

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'lkS1Rc4du_M_';Query OK, 0 rows affected (0.00 sec)mysql>
创建初始数据库
# mysql -uroot -ppasswordmysql> set global validate_password_policy=0;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;
导入数据

使用 MySQL 来导入 Zabbix server 的初始数据库 schema 和数据,

zcat /usr/share/doc/zabbix-server-mysql-4.4.10/create.sql.gz | mysql -uzabbix -p zabbix

导入初始架构和数据,系统将提示您输入新创建的密码。

对于 Zabbix proxy,导入初始的数据库 schema:

# zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -p zabbix
为Zabbix server配置数据库

编辑配置文件 /etc/zabbix/zabbix_server.conf

DBPassword=password
为Zabbix前端配置PHP时区

编辑配置文件 /etc/httpd/conf.d/zabbix.conf uncomment and set the right timezone for you.

# php_value date.timezone Asia/Shanghai
启动Zabbix server和agent进程

启动Zabbix server和agent进程,并为它们设置开机自启:

# systemctl restart zabbix-server zabbix-agent httpd# systemctl enable zabbix-server zabbix-agent httpd
配置zabbix前端

浏览器访问进行前端配置和初始化

设置名

配置完成

登录界面(默认用户名密码:Admin/zabbix)

进入界面

标签: #apachelinux下载64位