yum으로 ansible pkg 설치 시도
[~]# yum -y install ansible
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No package ansible available.
Error: Nothing to do
repolist에 ansible 이 없어 설치 불가
설치를 위해서는 "epel-release" repository 가 추가적으로 필요하다
yum -y install epel-release
[~]# yum -y install epel-release
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
No package epel-release available.
CentOS는 위와 같은 방법으로 설치가 가능하지만
Rhel은 직접 EPEL 릴리스 패키지를 다운로드하고 설치하는 다음 명령을 실행해야 한다.
sudo yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
epel-release-latest-7.noarch.rpm | 15 kB 00:00:00
Examining /var/tmp/yum-root-BkrS6O/epel-release-latest-7.noarch.rpm: epel-release-7-14.noarch
Marking /var/tmp/yum-root-BkrS6O/epel-release-latest-7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package epel-release.noarch 0:7-14 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================
Package Arch Version Repository Size
=============================================================================================
Installing:
epel-release noarch 7-14 /epel-release-latest-7.noarch 25 k
Transaction Summary
=============================================================================================
Install 1 Package
Total size: 25 k
Installed size: 25 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : epel-release-7-14.noarch 1/1
RHEL7.4/productid | 1.6 kB 00:00:00
Verifying : epel-release-7-14.noarch 1/1
Installed:
epel-release.noarch 0:7-14
Complete!
다음과 같이 설치 완료 메세지를 확인한 후, repolist를 확인한다.
[~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
epel/x86_64/metalink | 7.8 kB 00:00:00
epel | 4.7 kB 00:00:00
(1/3): epel/x86_64/updateinfo | 1.0 MB 00:00:00
(2/3): epel/x86_64/group_gz | 96 kB 00:00:00
(3/3): epel/x86_64/primary_db | 7.0 MB 00:00:05
repo id repo name status
RHEL7.4 localhost 4,986
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,692
repolist: 18,678
정상적으로 추가된것을 확인할 수 있다.
이제 다시 한번 yum을 통해 ansible를 설치한다.
yum -y install ansible
Installed:
ansible.noarch 0:2.9.25-1.el7
...
Dependency Installed:
PyYAML.x86_64 0:3.10-11.el7
libyaml.x86_64 0:0.1.4-11.el7_0
python-babel.noarch 0:0.9.6-8.el7
python-backports.x86_64 0:1.0-8.el7
python-backports-ssl_match_hostname.noarch 0:3.4.0.2-4.el7
python-cffi.x86_64 0:1.6.0-5.el7
python-enum34.noarch 0:1.0.4-1.el7
python-idna.noarch 0:2.4-1.el7
python-ipaddress.noarch 0:1.0.16-2.el7
python-jinja2.noarch 0:2.7.2-2.el7
python-markupsafe.x86_64 0:0.11-10.el7
python-paramiko.noarch 0:2.1.1-0.10.el7
python-ply.noarch 0:3.4-11.el7
python-pycparser.noarch 0:2.14-1.el7
python-setuptools.noarch 0:0.9.8-7.el7
python-six.noarch 0:1.9.0-2.el7
python2-cryptography.x86_64 0:1.7.2-1.el7
python2-httplib2.noarch 0:0.18.1-3.el7
python2-jmespath.noarch 0:0.9.4-2.el7
python2-pyasn1.noarch 0:0.1.9-7.el7
sshpass.x86_64 0:1.06-1.el7
Complete!
정상적으로 설치가 되며,
[~]# rpm -qa |grep ansible
ansible-2.9.25-1.el7.noarch
을 통해 설치가 완료되었음을 확인한다.