1、安装基础包,此处我用光盘自己做了yum源
more /etc/redhat-release
Red Hat Enterprise Linux Server release 6.9 (Santiago)
yum原在一台apache服务器上,把ISO文件都解压了
以下是yum源配置
more /etc/yum.repos.d/111.repo
[base]
name=redhat6.9-Local
baseurl=http://192.168.16.xx:9900/yum/rhel-server-6.9-x86_64-dvd/
gpgcheck=1
enabled=1
gpgkey=http://192.168.16.xx:9900/yum/rhel-server-6.9-x86_64-dvd/RPM-GPG-KEY-redhat-release
2、yum安装各种包和ansible
cd /etc/yum.repo/
8 rpm -iUvh https://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/e/epel-release-6-8.noarch.rpm
9 yum install ansible
10 yum
list
11 yum list
PyYAML
12 yum
install PyYAML
13 yum list
| grep python-markupsafe
14 yum
install python-markupsafe
15 yum list
| grep python-simplejson
16 yum
install python-simplejson
17 yum list
| grep python-pyasn1
18 yum
install python-pyasn1
19 yum
install ansible
20 ansible
--version
[root@ansible16161
yum.repos.d]# ansible --version
ansible 2.6.7
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.6/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.6.6 (r266:84292,
Aug 9 2016, 06:11:56) [GCC 4.4.7 20120313 (Red
Hat 4.4.7-17)]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)