Ansible离线安装

概述

Ansible rpm离线安装

失败

yum -y install ansible --downloadonly --downloaddir=./ansible
[root@VM-16-2-centos ~]# yum -y install ansible --downloadonly --downloaddir=./ansible
已加载插件:fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * elrepo: mirrors.tuna.tsinghua.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 ansible.noarch.0.2.9.27-1.el7 将被 安装
--> 正在处理依赖关系 python-httplib2,它被软件包 ansible-2.9.27-1.el7.noarch 需要


zip -r ansible.zip ansible/

yum -y install python-jinja2 --downloadonly --downloaddir=./ansible
yum -y install libmysqlclient.so.18 --downloadonly --downloaddir=./ansible

成功

# 推荐
# 如何全量加载依赖包,(包括本地已安装的)
yum install yum-utils
[root@VM-16-2-centos ~]# yum provides repotrack
已加载插件:fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * elrepo: mirrors.tuna.tsinghua.edu.cn
yum-utils-1.1.31-54.el7_8.noarch : Utilities based around the yum package manager
源    :os
匹配来源:
文件名    :/usr/bin/repotrack



yum-utils-1.1.31-54.el7_8.noarch : Utilities based around the yum package manager
源    :@updates
匹配来源:
文件名    :/usr/bin/repotrack



[root@VM-16-2-centos ~]# 

# 加载 ansible
# -p:指定下载目录
repotrack -p ansible ansible
[root@VM-16-2-centos ~]# repotrack -p ansible ansible
Repository epel is listed more than once in the configuration
Downloading PyYAML-3.10-11.el7.x86_64.rpm
Downloading ansible-2.9.27-1.el7.noarch.rpm
Downloading basesystem-10.0-7.el7.centos.noarch.rpm
Downloading bash-4.2.46-35.el7_9.x86_64.rpm
Downloading bzip2-libs-1.0.6-13.el7.x86_64.rpm
Downloading ca-certificates-2023.2.60_v7.0.306-72.el7_9.noarch.rpm

/data/soft/ansible
[root@ks2p-hadoop04 ansible]# rpm --force -ivh *.rpm
[root@ks2p-hadoop04 ansible]# ansible --version
ansible 2.9.27
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Nov 14 2023, 16:14:06) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]
[root@ks2p-hadoop04 ansible]# 

离线安装包

离线安装包下载

相关推荐

  1. Ansible线安装

    2024-04-20 18:36:01       23 阅读
  2. Docker线安装

    2024-04-20 18:36:01       31 阅读
  3. 线安装docker

    2024-04-20 18:36:01       36 阅读
  4. docker线安装

    2024-04-20 18:36:01       21 阅读
  5. ubuntu线安装

    2024-04-20 18:36:01       29 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-04-20 18:36:01       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-04-20 18:36:01       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-04-20 18:36:01       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-04-20 18:36:01       20 阅读

热门阅读

  1. Elasticsearch(1)

    2024-04-20 18:36:01       36 阅读
  2. eslint 规则

    2024-04-20 18:36:01       49 阅读
  3. ARM_day7:按键中断

    2024-04-20 18:36:01       20 阅读
  4. 常见分类算法

    2024-04-20 18:36:01       20 阅读
  5. QT写Windows按键输出(外挂)

    2024-04-20 18:36:01       15 阅读
  6. 【MySQL】MySQL锁(二)表锁与行锁测试

    2024-04-20 18:36:01       23 阅读
  7. windows下如何安装git

    2024-04-20 18:36:01       46 阅读
  8. mybatis映射postgres数据库的geometry类型

    2024-04-20 18:36:01       18 阅读