运维基础之Ansible(2)离线安装
1 在一个能访问远程repo的服务器上执行,下载ansible及相关依赖的rpm包
# mkdir ansible
# yum install --downloadonly --downloaddir=ansible ansible
2 将ansible目录拷贝到离线服务器上,通过yum localinstall安装
# cd ansible
# ls -l
total 12076
-rw-r--r-- 1 root root 3606216 Feb 20 17:28 ansible-2.1.0.0-1.el7.noarch.rpm
-rw-r--r-- 1 root root 56068 Feb 20 17:28 libyaml-0.1.4-11.el7_0.x86_64.rpm
-rw-r--r-- 1 root root 5079828 Feb 20 17:28 python2-babel-2.3.4-1.el7.noarch.rpm
-rw-r--r-- 1 root root 219224 Feb 20 17:28 python2-cffi-1.5.2-1.el7.x86_64.rpm
-rw-r--r-- 1 root root 472168 Feb 20 17:28 python2-cryptography-1.2.1-3.el7.x86_64.rpm
-rw-r--r-- 1 root root 270768 Feb 20 17:28 python2-paramiko-2.0.0-1.el7.noarch.rpm
-rw-r--r-- 1 root root 102928 Feb 20 17:28 python2-pyasn1-0.1.9-6.el7.1.noarch.rpm
-rw-r--r-- 1 root root 496800 Feb 20 17:28 python2-setuptools-22.0.5-1.el7.noarch.rpm
-rw-r--r-- 1 root root 480968 Feb 20 17:28 python-crypto-2.6.1-1.el7.centos.x86_64.rpm
-rw-r--r-- 1 root root 53496 Feb 20 17:28 python-enum34-1.0.4-1.el7.noarch.rpm
-rw-r--r-- 1 root root 117360 Feb 20 17:28 python-httplib2-0.9.2-1.el7.noarch.rpm
-rw-r--r-- 1 root root 94292 Feb 20 17:28 python-idna-2.0-1.el7.noarch.rpm
-rw-r--r-- 1 root root 34832 Feb 20 17:28 python-ipaddress-1.0.16-3.el7.noarch.rpm
-rw-r--r-- 1 root root 527832 Feb 20 17:28 python-jinja2-2.7.2-2.el7.noarch.rpm
-rw-r--r-- 1 root root 222580 Feb 20 17:28 python-keyczar-0.71c-2.el7.noarch.rpm
-rw-r--r-- 1 root root 25792 Feb 20 17:28 python-markupsafe-0.11-10.el7.x86_64.rpm
-rw-r--r-- 1 root root 125760 Feb 20 17:28 python-ply-3.4-10.el7.noarch.rpm
-rw-r--r-- 1 root root 106984 Feb 20 17:28 python-pycparser-2.14-1.el7.noarch.rpm
-rw-r--r-- 1 root root 39068 Feb 20 17:28 pytz-2012d-5.el7.noarch.rpm
-rw-r--r-- 1 root root 156952 Feb 20 17:28 PyYAML-3.10-11.el7.x86_64.rpm
-rw-r--r-- 1 root root 20556 Feb 20 17:28 sshpass-1.05-5.el7.x86_64.rpm
# arg=`ls|sed ':a;N;$!ba;s/\n/ /g'`
# echo "yum localinstall $arg"
yum localinstall ansible-2.1.0.0-1.el7.noarch.rpm libyaml-0.1.4-11.el7_0.x86_64.rpm python2-babel-2.3.4-1.el7.noarch.rpm python2-cffi-1.5.2-1.el7.x86_64.rpm python2-cryptography-1.2.1-3.el7.x86_64.rpm python2-paramiko-2.0.0-1.el7.noarch.rpm python2-pyasn1-0.1.9-6.el7.1.noarch.rpm python2-setuptools-22.0.5-1.el7.noarch.rpm python-crypto-2.6.1-1.el7.centos.x86_64.rpm python-enum34-1.0.4-1.el7.noarch.rpm python-httplib2-0.9.2-1.el7.noarch.rpm python-idna-2.0-1.el7.noarch.rpm python-ipaddress-1.0.16-3.el7.noarch.rpm python-jinja2-2.7.2-2.el7.noarch.rpm python-keyczar-0.71c-2.el7.noarch.rpm python-markupsafe-0.11-10.el7.x86_64.rpm python-ply-3.4-10.el7.noarch.rpm python-pycparser-2.14-1.el7.noarch.rpm pytz-2012d-5.el7.noarch.rpm PyYAML-3.10-11.el7.x86_64.rpm sshpass-1.05-5.el7.x86_64.rpm
---------------------------------------------------------------- 结束啦,我是大魔王先生的分割线 :) ----------------------------------------------------------------
- 由于大魔王先生能力有限,文中可能存在错误,欢迎指正、补充!
- 感谢您的阅读,如果文章对您有用,那么请为大魔王先生轻轻点个赞,ありがとう