Three ways of installing python:
Method1: Installing Python from IUS Package Repository
Method2: Installing Python from Source Code
Method3: Installing Python with SCL (Software Collections)
Click here to know more.
Note: While installing python care should be taken because it may override default python shipped with RedHat Linux machine, doing so will result in system crash, even yum didn't work and so many packages fails because RedHat machine have many dependencies with default python.
- Installing python from source is recommended because using this we can install preferred version using tar file.
- It will not override default python installation.
- The system python executables are located in "/usr/bin/python" but this method downloads it in "/etc/local/bin/puthon3.x"
- If you want to install it to any preferred location specify path using prefix tag while configuring
Method1: From EPEL repository
This is recommended and best way of installing ansible, it installs and configures Ansible from EPEL repository and uses default python that ships with RedHat machine, step by step installation procedure is available here
Method2: Using pip
This method is recommended if you want to install ansible on top of python3 or any other python that you installed, the only drawback with this method is it only installs ansible you need to do configuration i.e creating inventoryfile (/etc/ansible/hosts) and configuration file (/etc/ansible/ansible.cnf) etc.
After installing pip(click here for installing pip) just execute simple command
$pip install ansible
Method3: From the source using git
This method also only installs python from the github source you need to do the configuration part.
For more details on this method of installation click here
0 Comments