Yum

如何在沒有 Docker 的 RHEL 7 上安裝 AWX?

  • July 16, 2020

當我按照本指南在沒有 docker 的 RHEL 上安裝 AWX 時:http: //yallalabs.com/devops/how-to-install-ansible-awx-without-docker-centos-7-rhel-7/

https://copr.fedorainfracloud.org/coprs/mrmeee/awx/repo/epel-7/mrmeee-awx-epel-7.repo已重命名。然後我得到了這個:https ://copr.fedorainfracloud.org/coprs/mrmeee/ansible-awx/repo/epel-7/mrmeee-ansible-awx-epel-7.repo ,下載並設置為/etc/yum.repos.d/awx-rpm.repo.

我執行這個命令來安裝它

yum install -y ansible-awx

出錯了Requires: rh-python36-runtime

...
Error: Package: rh-python36-social-auth-app-django-3.1.0-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python(abi) = 3.6
Error: Package: rh-python36-oauthlib-3.1.0-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-runtime
Error: Package: ansible-awx-9.1.1.211-1.el7.x86_64 (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-postgresql10-postgresql-devel
Error: Package: rh-python36-ansible-runner-1.4.4-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python(abi) = 3.6
Error: Package: rh-python36-websocket_client-0.57.0-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: /opt/rh/rh-python36/root/usr/bin/python3
Error: Package: rh-python36-django-oauth-toolkit-1.1.3-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-runtime
Error: Package: ansible-awx-9.1.1.211-1.el7.x86_64 (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-idna
Error: Package: rh-python36-kombu-4.6.7-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-runtime
Error: Package: rh-python36-django-jsonfield-1.2.0-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python(abi) = 3.6
Error: Package: rh-python36-django-polymorphic-2.1.2-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-runtime
Error: Package: ansible-awx-9.1.1.211-1.el7.x86_64 (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python-logstash
Error: Package: rh-python36-jaraco.functools-3.0.0-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python(abi) = 3.6
Error: Package: rh-python36-twilio-6.35.1-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python(abi) = 3.6
Error: Package: rh-python36-django-auth-ldap-2.1.0-1.noarch (copr:copr.fedorainfracloud.org:nsdc92:ansible-awx)
          Requires: rh-python36-python(abi) = 3.6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

我試圖安裝rh-python36

# yum install rh-python36
Loaded plugins: search-disabled-repos
No package rh-python36 available.

執行subscription-manager命令準備安裝rh-python36時,出現錯誤

# subscription-manager repos --enable rhel-server-rhscl-7-rpms
Traceback (most recent call last):
 File "/sbin/subscription-manager", line 9, in <module>
   load_entry_point('subscription-manager==1.21.10', 'console_scripts', 'subscription-manager')()
 File "/usr/lib64/python2.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main
   return managercli.ManagerCLI().main()
 File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 2667, in main
   ret = CLI.main(self)
 File "/usr/lib64/python2.7/site-packages/subscription_manager/cli.py", line 183, in main
   return cmd.main()
 File "/usr/lib64/python2.7/site-packages/subscription_manager/managercli.py", line 467, in main
   self.cp = self.cp_provider.get_consumer_auth_cp()
 File "/usr/lib64/python2.7/site-packages/subscription_manager/cp_provider.py", line 110, in get_consumer_auth_cp
   restlib_class=self.restlib_class)
 File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 783, in __init__
   info = utils.get_env_proxy_info()
 File "/usr/lib64/python2.7/site-packages/rhsm/utils.py", line 224, in get_env_proxy_info
   info = parse_url(proxy_info, default_port=DEFAULT_PROXY_PORT)
 File "/usr/lib64/python2.7/site-packages/rhsm/utils.py", line 200, in parse_url
   raise ServerUrlParseErrorPort(local_server_entry)
rhsm.utils.ServerUrlParseErrorPort

參考:https ://access.redhat.com/solutions/1519803

我已經使用以下步驟成功安裝了 ansible-awx:

yum install centos-release-scl
yum install rh-python36
yum install ansible-awx

引用自:https://serverfault.com/questions/1015257