centos uses pip to install ansible

centos uses pip to install ansible

To install ansible, you need to install python first. This article first installs the python3 environment with source code in the centos environment, and then uses the pip tool of python3 to install ansible. If you install python3 in centos environment, you can see this: install python3 from centos7 source code

1. Use pip3 to install ansible

pip3 install ansible

2. Find all directories of ansible by find / -name "ansible"

[root@localhost bin]# find / -name "ansible"
/usr/local/python3/bin/ansible
/usr/local/python3/lib/python3.10/site-packages/ansible
/usr/local/python3/lib/python3.10/site-packages/ansible_collections/ansible

3. Add a soft link

ln -s /usr/local/python3/bin/ansible /usr/bin/ansible

Guess you like

Origin blog.csdn.net/weixin_45455015/article/details/131290272