Centos7 安装zabbix-java-gateway出错

系统版本: 

[root@m01 ~]$ cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

安装zabbix源:

[root@m01 yum.repos.d]$ rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm
Retrieving https://mirrors.aliyun.com/zabbix/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:zabbix-release-3.4-1.el6         ################################# [100%]

安装zabbix-java-gateway:

[root@m01 yum.repos.d]$ yum install -y zabbix-java-gateway
http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-java-gateway-3.4.14-1.el7.x86_64.rpm: [Errno 14] curl#6 - "Could not resolve host: repo.zabbix.com; Name or service not known"
Trying other mirror.


Error downloading packages:
  zabbix-java-gateway-3.4.14-1.el7.x86_64: [Errno 256] No more mirrors to try.

解决方法:

将DNS改成8.8.8.8,重启网卡后OK.

[root@m01 yum.repos.d]$ vim /etc/sysconfig/network-scripts/ifcfg-eth0
DNS1=8.8.8.8

[root@m01 yum.repos.d]$ vim /etc/resolv.conf 
# Generated by NetworkManager
search 4
nameserver 8.8.8.8

[root@m01 yum.repos.d]$ systemctl restart network

 

你可能感兴趣的:(Centos7 安装zabbix-java-gateway出错)