Linux 下通过 pip3 安装 Ansible

学向勤中得,萤窗万卷书。这篇文章主要讲述Linux 下通过 pip3 安装 Ansible相关的知识,希望能为你提供帮助。
系统平台

[scm@192 ~]$ uname -a
Linux 192.168.109.139 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[scm@192 ~]$
[scm@192 ~]$ cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
[scm@192 ~]$
[scm@192 ~]$

【Linux 下通过 pip3 安装 Ansible】执行上面的两条指令后,可以看到我当前的系统是 CentOS7.9 系统平台。


系统更新今天主要是安装 Ansible 工具,Ansible 是一个配置管理和自动化运维工具,是基于 python 开发,那系统前提也必须要有 Python 工具环境,才能去执行安装。执行安装之前,还是老规矩先更新系统,执行如下指令:


系统更新完成,显示结果如下:
Install2 Packages
Upgrade236 Packages
Remove1 Package

执行安装下面接着安装 python-pip ,执行指令如下:

[root@192 scm]#
[root@192 scm]# yum install -y python-pip
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
* base: mirrors.njupt.edu.cn
* epel: mirror.sjtu.edu.cn
* extras: mirrors.njupt.edu.cn
* updates: mirrors.njupt.edu.cn
Package python2-pip-8.1.2-14.el7.noarch already installed and latest version
Nothing to do
[root@192 scm]#
[root@192 scm]#

可以看到直接安装 python-pip 显示 noarch already installed and latest version  是因为缺少了 epel 扩展源,需要先安装这个源再接着安装。
[root@192 scm]
[root@192 scm] yum -y install epel-release
Loaded plugins: fastestmirror, langpacks, product-id, search-disabled-repos, subscription-manager

This system is not registered with an entitlement server. You can use subscription-manager to register.

Loading mirror speeds from cached hostfile
* base: mirrors.njupt.edu.cn
* epel: mirror.sjtu.edu.cn
* extras: mirrors.njupt.edu.cn
* updates: mirrors.njupt.edu.cn
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-13 will be updated
---> Package epel-release.noarch 0:7-14 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================================
PackageArchVersionRepositorySize
======================================================================================================================================================================
Updating:
epel-releasenoarch7-14epel15 k

Transaction Summary
==========================================

    推荐阅读