centos 7安装zabbix4

升级系统组件到最新的版本

1

yum -y update

2 关闭selinux

vi /etc/selinux/config 

把SELINUX=enforcing改为SELINUX=disabled 设置后需要重启才能生效

setenforce 0 #临时关闭命令

getenforce #检测selinux是否关闭,Disabled 为关闭

firewall-cmd --state 

systemctl stop firewalld.service    #临时关闭firewall

systemctl disable firewalld.service #禁止firewall开机启动

安装所需所有软体仓库

 Zabbix是建立在LAMP或者LNMP环境之上,在此为了方便就使用yum安装LAMP环境

yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash

rpm -qa httpd php mariadb            #安装完成后检查应用版本

编辑httpd

vi /etc/httpd</

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
CentOS 7 安装 Zabbix 7.9 的步骤如下: 1. 安装必要的依赖包和软件源 ```shell sudo yum install epel-release -y sudo rpm -ivh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm ``` 2. 安装 Zabbix Server 和 Agent ```shell sudo yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent -y ``` 3. 安装 MySQL 数据库,并创建数据库和用户 ```shell sudo yum install mariadb-server -y sudo systemctl start mariadb.service sudo systemctl enable mariadb.service sudo mysql_secure_installation mysql -u root -p CREATE DATABASE zabbix character set utf8 collate utf8_bin; CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost'; FLUSH PRIVILEGES; exit; ``` 4. 导入 Zabbix 数据库模板 ```shell zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -u zabbix -p zabbix ``` 5. 配置 Zabbix Server 编辑 Zabbix Server 配置文件 `/etc/zabbix/zabbix_server.conf`,修改以下参数: ```text DBPassword=password # 数据库密码,与之前创建用户时设置的密码一致 ``` 6. 启动 Zabbix Server 和 Agent,设置开机自启动 ```shell sudo systemctl start zabbix-server.service sudo systemctl enable zabbix-server.service sudo systemctl start zabbix-agent.service sudo systemctl enable zabbix-agent.service ``` 7. 配置防火墙 ```shell sudo firewall-cmd --add-service={http,https} --permanent sudo firewall-cmd --add-port={10050/tcp,10051/tcp} --permanent sudo firewall-cmd --reload ``` 8. 配置 Zabbix Web 界面 编辑 Zabbix Web 配置文件 `/etc/httpd/conf.d/zabbix.conf`,修改以下参数: ```text php_value date.timezone Asia/Shanghai # 修改时区 ``` 重启 Apache 服务: ```shell sudo systemctl restart httpd.service ``` 现在,您就可以通过浏览器访问 `http://<Server_IP>/zabbix` 来打开 Zabbix Web 界面了。默认的用户名和密码是 `Admin` 和 `zabbix`。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值