离线安装zabbix

docker run -it -v C:/Users/tzr/Downloads/centos:/home centos:7 bash

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-latest-5.0.el7.noarch.rpm
yum clean all

cd /tmp
mkdir offline_rpm
cd offline_rpm

sed -i '10c\enabled=1' /etc/yum.repos.d/zabbix.repo

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache fast

yum install zabbix-server-mysql zabbix-agent --downloadonly --downloaddir=/tmp/offline_rpm

yum -y install centos-release-scl
yum install centos-release-scl --downloadonly --downloaddir=/tmp/offline_rpm

yum -y install epel-release
yum install centos-release-scl --downloadonly --downloaddir=/tmp/offline_rpm

yum install https://mirrors.aliyun.com/remi/enterprise/remi-release-7.rpm
yum install https://mirrors.aliyun.com/remi/enterprise/remi-release-7.rpm --downloadonly --downloaddir=/tmp/offline_rpm

yum install yum-utils --downloadonly --downloaddir=/tmp/offline_rpm
yum install yum-utils

yum-config-manager --enable remi-php72

yum install rh-php72-php-mysqlnd rh-php72-php-bcmath rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-fpm rh-nginx116-nginx rh-php72 rh-php72-php-xml rh-php72-php-ldap --downloadonly --downloaddir=/tmp/offline_rpm

yum install rh-php72-php-mysqlnd rh-php72-php-bcmath rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-fpm rh-nginx116-nginx rh-php72 rh-php72-php-xml rh-php72-php-ldap

yum install nginx  --downloadonly --downloaddir=/tmp/offline_rpm
yum install nginx

yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl --downloadonly --downloaddir=/tmp/offline_rpm

yum install zabbix-get --downloadonly --downloaddir=/tmp/offline_rpm

yum -y install createrepo

createrepo /tmp/offline_rpm

tar -cvf offline_rpm.tar ./


离线安装

#移动offline_rpm.tar到/tmp目录下
mv offline_rpm.tar /tmp/

#切换到/tmp目录下
cd /tmp
mkdir offline_rpm
cd offline_rpm/

#解压offline_rpm.tar
tar xf ../offline_rpm.tar

#将/etc/yum.repos.d 下面所有repo文件进行转移至bak文件夹下
cd /tmp
mv /etc/yum.repos.d/*.repo bak/

#在/etc/yum.repos.d/新建一个repo源文件
[root@localhost tmp]# vim /etc/yum.repos.d/new.repo

[New]
name=New
baseurl=file:///tmp/offline_rpm
gpgcheck=0
enabled=1

:wq保存退出


#清除元数据缓存
yum clean all
#加载元数据缓存
yum makecache

systemctl start nginx


yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl --downloadonly --downloaddir=/tmp/offline_rpm
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package zabbix-nginx-conf-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: zabbix-web-deps-scl = 5.0.46-2.el7 for package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-nginx116-nginx for package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-mysql-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: zabbix-web = 5.0.46-2.el7 for package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-mysqlnd for package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch
--> Running transaction check
---> Package zabbix-nginx-conf-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-nginx116-nginx for package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch
---> Package zabbix-web.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: dejavu-sans-fonts for package: zabbix-web-5.0.46-2.el7.noarch
---> Package zabbix-web-deps-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mbstring for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-xml for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-bcmath for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-ldap for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-fpm for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72 for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-gd for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-mysql-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mysqlnd for package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package zabbix-nginx-conf-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-nginx116-nginx for package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-deps-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mbstring for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-xml for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-bcmath for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-ldap for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-fpm for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72 for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-gd for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-mysql-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mysqlnd for package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: fontpackages-filesystem for package: dejavu-fonts-common-2.33-6.el7.noarch
---> Package zabbix-nginx-conf-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-nginx116-nginx for package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-deps-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mbstring for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-xml for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-bcmath for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-ldap for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-fpm for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72 for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-gd for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-mysql-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mysqlnd for package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch
--> Running transaction check
---> Package fontpackages-filesystem.noarch 0:1.44-8.el7 will be installed
---> Package zabbix-nginx-conf-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-nginx116-nginx for package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-deps-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mbstring for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-xml for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-bcmath for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-ldap for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-fpm for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72 for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
--> Processing Dependency: rh-php72-php-gd for package: zabbix-web-deps-scl-5.0.46-2.el7.noarch
---> Package zabbix-web-mysql-scl.noarch 0:5.0.46-2.el7 will be installed
--> Processing Dependency: rh-php72-php-mysqlnd for package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch
--> Finished Dependency Resolution
Error: Package: zabbix-web-mysql-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-mysqlnd
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-bcmath
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-gd
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-mbstring
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-fpm
Error: Package: zabbix-nginx-conf-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-nginx116-nginx
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-xml
Error: Package: zabbix-web-deps-scl-5.0.46-2.el7.noarch (zabbix-frontend)
           Requires: rh-php72-php-ldap
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

安装对应的php包就可以

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值