离线安装AWX15.0.1
离线安装AWX15.0.1
-
环境:
- redhat 7.5 (最小化安装)
- 关闭selinux
-
AWX相关依赖需求
-
Ansible 2.8+
-
Docker
- A recent version
-
docker
Python module
- This is incompatible with
docker-py
. If you have previously installeddocker-py
, please uninstall it. - We use this module instead of
docker-py
because it is what thedocker-compose
Python module requires.
- This is incompatible with
-
community.general.docker_image collection
- This is only required if you are using Ansible >= 2.10
-
Git Requires Version 1.8.4+
-
Python 3.6+
-
Node 10.x LTS version
- This is only required if you're building your own container images with
use_container_for_build=false
- This is only required if you're building your own container images with
-
NPM 6.x LTS
- This is only required if you're building your own container images with
use_container_for_build=false
- This is only required if you're building your own container images with
-
离线安装gcc
-
[root@localhost gcc]# ll total 49636 -rw-r--r--. 1 root root 6236316 Oct 30 01:45 cpp-4.8.5-39.el7.x86_64.rpm -rw-r--r--. 1 root root 16966352 Oct 30 01:45 gcc-4.8.5-39.el7.x86_64.rpm -rw-r--r--. 1 root root 3815032 Oct 30 01:45 glibc-2.17-307.el7.1.x86_64.rpm -rw-r--r--. 1 root root 12057552 Oct 30 01:45 glibc-common-2.17-307.el7.1.x86_64.rpm -rw-r--r--. 1 root root 1126396 Oct 30 01:45 glibc-devel-2.17-307.el7.1.x86_64.rpm -rw-r--r--. 1 root root 705348 Oct 30 01:45 glibc-headers-2.17-307.el7.1.x86_64.rpm -rw-r--r--. 1 root root 9374336 Oct 30 01:45 kernel-headers-3.10.0-1127.el7.x86_64.rpm -rw-r--r--. 1 root root 104736 Oct 30 01:45 libgcc-4.8.5-39.el7.x86_64.rpm -rw-r--r--. 1 root root 161828 Oct 30 01:45 libgomp-4.8.5-39.el7.x86_64.rpm -rw-r--r--. 1 root root 51732 Oct 30 01:45 libmpc-1.0.1-3.el7.x86_64.rpm -rw-r--r--. 1 root root 208316 Oct 30 01:45 mpfr-3.1.1-4.el7.x86_64.rpm
-
上传至服务器任意目录
-
在上传目录执行安装
rpm -ivh cpp-4.8.5-39.el7.x86_64.rpm rpm -Uvh ./*.rpm
-
测试
gcc -v
离线安装python3.7.0
-
下载python安装包以及依赖的包
下载地址:Python-3.7.0
-
下载所需要的包并上传这些安装包到任意目录下
[root@localhost python3.7]# ll total 64596 -rw-r--r--. 1 root root 229836 Oct 30 01:48 bzip2-devel-1.0.6-26.el8.x86_64.rpm -rw-r--r--. 1 root root 49100 Oct 30 01:48 bzip2-libs-1.0.6-26.el8.x86_64.rpm -rw-r--r--. 1 root root 577556 Nov 1 21:53 db4-4.7.25-22.el6.x86_64.rpm -rw-r--r--. 1 root root 603212 Nov 1 21:53 db4-cxx-4.7.25-22.el6.x86_64.rpm -rw-r--r--. 1 root root 6885000 Nov 1 21:53 db4-devel-4.7.25-22.el6.x86_64.rpm -rw-r--r--. 1 root root 65788 Oct 30 06:26 dejavu-fonts-common-2.33-6.el7.noarch.rpm -rw-r--r--. 1 root root 1482820 Oct 30 03:14 dejavu-sans-fonts-2.33-6.el7.noarch.rpm -rw-r--r--. 1 root root 716108 Oct 30 03:14 e2fsprogs-1.42.9-17.el7.x86_64.rpm -rw-r--r--. 1 root root 171656 Oct 30 03:14 e2fsprogs-libs-1.42.9-17.el7.x86_64.rpm -rw-r--r--. 1 root root 82612 Nov 1 21:42 expat-2.1.0-11.el7.x86_64.rpm -rw-r--r--. 1 root root 58012 Nov 1 21:41 expat-devel-2.1.0-11.el7.x86_64.rpm -rw-r--r--. 1 root root 260512 Oct 30 02:52 fontconfig-2.13.0-4.3.el7.x86_64.rpm -rw-r--r--. 1 root root 141248 Nov 1 21:38 fontconfig-devel-2.13.0-4.3.el7.x86_64.rpm -rw-r--r--. 1 root root 10116 Oct 30 06:28 fontpackages-filesystem-1.44-8.el7.noarch.rpm -rw-r--r--. 1 root root 389068 Oct 30 06:30 freetype-2.8-14.el7.x86_64.rpm -rw-r--r--. 1 root root 457352 Nov 1 21:38 freetype-devel-2.8-14.el7.x86_64.rpm -rw-r--r--. 1 root root 48240 Oct 30 01:48 gdbm-devel-1.10-8.el7.x86_64.rpm -rw-r--r--. 1 root root 3753068 Oct 30 04:59 glibc-2.17-307.el7.1.aarch64.rpm -rw-r--r--. 1 root root 4463036 Oct 30 03:58 glibc-2.17-307.el7.1.i686.rpm -rw-r--r--. 1 root root 3660904 Oct 30 05:06 glibc-2.28-101.el8.aarch64.rpm -rw-r--r--. 1 root root 38232 Oct 30 01:59 keyutils-libs-devel-1.5.8-3.el7.x86_64.rpm -rw-r--r--. 1 root root 278840 Oct 30 01:48 krb5-devel-1.15.1-46.el7.x86_64.rpm -rw-r--r--. 1 root root 828000 Oct 30 01:59 krb5-libs-1.15.1-46.el7.x86_64.rpm -rw-r--r--. 1 root root 186216 Nov 1 21:48 libblkid-2.23.2-63.el7.x86_64.rpm -rw-r--r--. 1 root root 42600 Oct 30 02:52 libcom_err-1.42.9-17.el7.x86_64.rpm -rw-r--r--. 1 root root 32520 Oct 30 01:59 libcom_err-devel-1.42.9-17.el7.x86_64.rpm -rw-r--r--. 1 root root 737156 Oct 30 02:55 libdb-5.3.21-25.el7.x86_64.rpm -rw-r--r--. 1 root root 135576 Oct 30 02:56 libdb-utils-5.3.21-25.el7.x86_64.rpm -rw-r--r--. 1 root root 30960 Oct 30 01:59 libffi-3.0.13-19.el7.x86_64.rpm -rw-r--r--. 1 root root 23776 Oct 30 01:48 libffi-devel-3.0.13-19.el7.x86_64.rpm -rw-r--r--. 1 root root 182876 Oct 30 01:59 libkadm5-1.15.1-46.el7.x86_64.rpm -rw-r--r--. 1 root root 188048 Nov 1 21:49 libmount-2.23.2-63.el7.x86_64.rpm -rw-r--r--. 1 root root 142080 Oct 30 01:59 libpcap-1.5.3-12.el7.x86_64.rpm -rw-r--r--. 1 root root 120500 Oct 30 01:48 libpcap-devel-1.5.3-12.el7.x86_64.rpm -rw-r--r--. 1 root root 217608 Oct 30 06:32 libpng-1.5.13-7.el7_2.x86_64.rpm -rw-r--r--. 1 root root 124652 Nov 1 21:39 libpng-devel-1.5.13-7.el7_2.x86_64.rpm -rw-r--r--. 1 root root 166012 Oct 30 01:59 libselinux-2.5-15.el7.x86_64.rpm -rw-r--r--. 1 root root 191184 Oct 30 01:48 libselinux-devel-2.5-15.el7.x86_64.rpm -rw-r--r--. 1 root root 241168 Oct 30 03:25 libselinux-python-2.5-15.el7.x86_64.rpm -rw-r--r--. 1 root root 154876 Oct 30 03:25 libselinux-utils-2.5-15.el7.x86_64.rpm -rw-r--r--. 1 root root 304196 Oct 30 02:49 libsepol-2.5-10.el7.x86_64.rpm -rw-r--r--. 1 root root 78740 Oct 30 01:59 libsepol-devel-2.5-10.el7.x86_64.rpm -rw-r--r--. 1 root root 145116 Nov 1 21:51 libsmartcols-2.23.2-63.el7.x86_64.rpm -rw-r--r--. 1 root root 47312 Oct 30 03:14 libss-1.42.9-17.el7.x86_64.rpm -rw-r--r--. 1 root root 50336 Oct 30 02:49 libtool-ltdl-2.4.2-22.el7_3.i686.rpm -rw-r--r--. 1 root root 50076 Oct 30 01:59 libtool-ltdl-2.4.2-22.el7_3.x86_64.rpm -rw-r--r--. 1 root root 171284 Oct 30 01:59 libtool-ltdl-devel-2.4.2-22.el7_3.i686.rpm -rw-r--r--. 1 root root 85312 Nov 1 21:43 libuuid-2.23.2-63.el7.x86_64.rpm -rw-r--r--. 1 root root 94496 Nov 1 21:41 libuuid-devel-2.23.2-63.el7.x86_64.rpm -rw-r--r--. 1 root root 11776 Oct 30 01:59 libverto-devel-0.2.5-4.el7.x86_64.rpm -rw-r--r--. 1 root root 595976 Oct 30 04:14 libX11-1.6.7-2.el7.aarch64.rpm -rw-r--r--. 1 root root 625564 Oct 30 04:06 libX11-1.6.7-2.el7.i686.rpm -rw-r--r--. 1 root root 621364 Oct 30 01:59 libX11-1.6.7-2.el7.x86_64.rpm -rw-r--r--. 1 root root 168172 Oct 30 02:49 libX11-common-1.6.7-2.el7.noarch.rpm -rw-r--r--. 1 root root 1004760 Oct 30 02:52 libX11-devel-1.6.7-2.el7.x86_64.rpm -rw-r--r--. 1 root root 29824 Oct 30 03:58 libXau-1.0.8-2.1.el7.i686.rpm -rw-r--r--. 1 root root 29784 Oct 30 06:40 libXau-1.0.8-2.1.el7.x86_64.rpm -rw-r--r--. 1 root root 14420 Oct 30 06:48 libXau-devel-1.0.8-2.1.el7.x86_64.rpm -rw-r--r--. 1 root root 214852 Oct 30 04:58 libxcb-1.13-1.el7.aarch64.rpm -rw-r--r--. 1 root root 235096 Oct 30 03:48 libxcb-1.13-1.el7.i686.rpm -rw-r--r--. 1 root root 218900 Oct 30 06:39 libxcb-1.13-1.el7.x86_64.rpm -rw-r--r--. 1 root root 1107428 Oct 30 06:47 libxcb-devel-1.13-1.el7.x86_64.rpm -rw-r--r--. 1 root root 59548 Oct 30 02:49 libXft-2.3.2-2.el7.x86_64.rpm -rw-r--r--. 1 root root 19952 Oct 30 01:59 libXft-devel-2.3.2-2.el7.x86_64.rpm -rw-r--r--. 1 root root 26312 Oct 30 06:44 libXrender-0.9.10-1.el7.x86_64.rpm -rw-r--r--. 1 root root 17060 Nov 1 21:38 libXrender-devel-0.9.10-1.el7.x86_64.rpm -rw-r--r--. 1 root root 729508 Oct 30 01:48 ncurses-devel-5.9-14.20130511.el7_4.x86_64.rpm -rw-r--r--. 1 root root 129772 Oct 30 04:01 nspr-4.21.0-1.el7.x86_64.rpm -rw-r--r--. 1 root root 219272 Oct 30 04:00 nss-softokn-freebl-3.44.0-8.el7_7.i686.rpm -rw-r--r--. 1 root root 80704 Oct 30 04:01 nss-util-3.44.0-4.el7_7.x86_64.rpm -rw-r--r--. 1 root root 504996 Oct 30 01:59 openssl-1.0.2k-19.el7.x86_64.rpm -rw-r--r--. 1 root root 1581408 Oct 30 01:48 openssl-devel-1.0.2k-19.el7.x86_64.rpm -rw-r--r--. 1 root root 1254680 Oct 30 01:59 openssl-libs-1.0.2k-19.el7.x86_64.rpm -rw-r--r--. 1 root root 432020 Oct 30 03:37 pcre-8.32-17.el7.x86_64.rpm -rw-r--r--. 1 root root 54928 Oct 30 02:49 pkgconfig-0.27.1-4.el7.x86_64 (1).rpm -rw-r--r--. 1 root root 54928 Oct 30 01:59 pkgconfig-0.27.1-4.el7.x86_64.rpm drwxr-xr-x. 19 501 501 4096 Nov 1 22:03 Python-3.7.0 -rw-r--r--. 1 root root 16922100 Oct 30 01:48 Python-3.7.0.tar.xz -rw-r--r--. 1 root root 197696 Oct 30 01:59 readline-6.2-11.el7.x86_64.rpm -rw-r--r--. 1 root root 141864 Oct 30 01:48 readline-devel-6.2-11.el7.x86_64.rpm -rw-r--r--. 1 root root 403100 Oct 30 01:59 sqlite-3.7.17-8.el7_7.1.x86_64.rpm -rw-r--r--. 1 root root 106968 Oct 30 01:48 sqlite-devel-3.7.17-8.el7_7.1.x86_64.rpm -rw-r--r--. 1 root root 1980564 Oct 30 02:49 tcl-8.5.13-8.el7.x86_64 (1).rpm -rw-r--r--. 1 root root 1980564 Oct 30 02:49 tcl-8.5.13-8.el7.x86_64.rpm -rw-r--r--. 1 root root 169164 Oct 30 01:59 tcl-devel-8.5.13-8.el7.x86_64.rpm -rw-r--r--. 1 root root 1496732 Oct 30 01:59 tk-8.5.13-6.el7.x86_64.rpm -rw-r--r--. 1 root root 499360 Oct 30 01:48 tk-devel-8.5.13-6.el7.x86_64.rpm -rw-r--r--. 1 root root 2074740 Nov 1 21:48 util-linux-2.23.2-63.el7.x86_64.rpm -rw-r--r--. 1 root root 181304 Oct 30 01:59 xmlsec1-1.2.20-7.el7_4.x86_64.rpm -rw-r--r--. 1 root root 77768 Oct 30 01:59 xmlsec1-openssl-1.2.20-7.el7_4.x86_64.rpm -rw-r--r--. 1 root root 286228 Oct 30 06:46 xorg-x11-proto-devel-2018.4-1.el7.noarch.rpm -rw-r--r--. 1 root root 47080 Oct 30 01:48 xz-devel-5.2.2-1.el7.x86_64.rpm -rw-r--r--. 1 root root 91960 Oct 30 01:59 zlib-1.2.7-18.el7.x86_64.rpm -rw-r--r--. 1 root root 51128 Oct 30 01:48 zlib-devel-1.2.7-18.el7.x86_64.rpm
-
安装依赖
rpm -Uvh --force ./*.rpm rpm -ivh ./*.rpm
-
解压python安装包
[root@localhost packages]# tar -Jxvf Python-3.7.0.tar.xz
-
编译安装
mkdir /usr/local/python3 # 创建编译安装目录 cd Python-3.7.0 # 进入python的解压目录 ./configure --prefix=/usr/local/python3 make && make install # 编译$安装
-
创建软连接
ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3 ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
-
更新pip
pip3 install --upgrade --find-links=../ pip
-
验证是否安装成功
python3 -V pip3 -V
离线安装ansible2.9
-
所需包
[root@localhost ansible2.9]# ll total 22120 -rw-r--r--. 1 root root 18252251 Nov 1 22:11 ansible-2.9.14-1.el7.noarch.rpm -rw-r--r--. 1 root root 56068 Nov 1 22:11 libyaml-0.1.4-11.el7_0.x86_64.rpm -rw-r--r--. 1 root root 514504 Nov 1 22:11 python2-cryptography-1.7.2-2.el7.x86_64.rpm -rw-r--r--. 1 root root 128003 Nov 1 22:11 python2-httplib2-0.18.1-3.el7.noarch.rpm -rw-r--r--. 1 root root 42303 Nov 1 22:11 python2-jmespath-0.9.4-2.el7.noarch.rpm -rw-r--r--. 1 root root 102132 Nov 1 22:11 python2-pyasn1-0.1.9-7.el7.noarch.rpm -rw-r--r--. 1 root root 1426348 Nov 1 22:11 python-babel-0.9.6-8.el7.noarch.rpm -rw-r--r--. 1 root root 5932 Nov 1 22:11 python-backports-1.0-8.el7.x86_64.rpm -rw-r--r--. 1 root root 12896 Nov 1 22:11 python-backports-ssl_match_hostname-3.5.0.1-1.el7.noarch.rpm -rw-r--r--. 1 root root 223012 Nov 1 22:11 python-cffi-1.6.0-5.el7.x86_64.rpm -rw-r--r--. 1 root root 53496 Nov 1 22:11 python-enum34-1.0.4-1.el7.noarch.rpm -rw-r--r--. 1 root root 95952 Nov 1 22:11 python-idna-2.4-1.el7.noarch.rpm -rw-r--r--. 1 root root 35176 Nov 1 22:11 python-ipaddress-1.0.16-2.el7.noarch.rpm -rw-r--r--. 1 root root 531040 Nov 1 22:11 python-jinja2-2.7.2-4.el7.noarch.rpm -rw-r--r--. 1 root root 25792 Nov 1 22:11 python-markupsafe-0.11-10.el7.x86_64.rpm -rw-r--r--. 1 root root 275112 Nov 1 22:11 python-paramiko-2.1.1-9.el7.noarch.rpm -rw-r--r--. 1 root root 125732 Nov 1 22:11 python-ply-3.4-11.el7.noarch.rpm -rw-r--r--. 1 root root 106984 Nov 1 22:11 python-pycparser-2.14-1.el7.noarch.rpm -rw-r--r--. 1 root root 406404 Nov 1 22:11 python-setuptools-0.9.8-7.el7.noarch.rpm -rw-r--r--. 1 root root 156952 Nov 1 22:11 PyYAML-3.10-11.el7.x86_64.rpm -rw-r--r--. 1 root root 21896 Nov 1 22:11 sshpass-1.06-2.el7.x86_64.rpm
-
yum下载所需依赖(部分包下载地址:rpmfind或pkgs.org)
#部分rpm包通过有网络环境的测试主机下载,如: #若提示已安装需先卸载后进行下载 yum install -y sshpass --downloadonly --downloaddir=/root/ansible yum install -y ansible --downloadonly --downloaddir=/root/ansible yum install -y python-httplib2 --downloadonly --downloaddir=/root/ansible
-
上传至服务器任意目录
-
安装依赖包及ansible
rpm -Uvh ./*.rpm rpm -ivh ./*.rpm
-
验证
[root@localhost packages]# ansible --version ansible 2.9.14
离线安装docker、docker-compose
-
下载所需安装包
[root@localhost docker]# ll total 125476 -rw-r--r--. 1 root root 261632 Nov 1 22:14 audit-2.8.5-4.el7.x86_64.rpm -rw-r--r--. 1 root root 104408 Nov 1 22:14 audit-libs-2.8.5-4.el7.x86_64.rpm -rw-r--r--. 1 root root 78256 Nov 1 22:14 audit-libs-python-2.8.5-4.el7.x86_64.rpm -rw-r--r--. 1 root root 88784 Nov 1 22:14 bash-completion-2.1-8.el7.noarch.rpm -rw-r--r--. 1 root root 302068 Nov 1 22:14 checkpolicy-2.5-8.el7.x86_64.rpm -rw-r--r--. 1 root root 30374084 Nov 1 22:14 containerd.io-1.3.7-3.1.el7.x86_64.rpm -rw-r--r--. 1 root root 40816 Nov 1 22:14 container-selinux-2.119.2-1.911c772.el7_8.noarch.rpm -rw-r--r--. 1 root root 302292 Nov 1 22:14 device-mapper-1.02.164-7.el7.x86_64.rpm -rw-r--r--. 1 root root 195180 Nov 1 22:14 device-mapper-event-1.02.164-7.el7.x86_64.rpm -rw-r--r--. 1 root root 194736 Nov 1 22:14 device-mapper-event-libs-1.02.164-7.el7.x86_64.rpm -rw-r--r--. 1 root root 331636 Nov 1 22:22 device-mapper-libs-1.02.164-7.el7.x86_64.rpm -rw-r--r--. 1 root root 432624 Nov 1 22:14 device-mapper-persistent-data-0.8.5-2.el7.x86_64.rpm -rw-r--r--. 1 root root 25278520 Nov 1 22:14 docker-ce-19.03.11-3.el7.x86_64.rpm -rw-r--r--. 1 root root 40054796 Nov 1 22:14 docker-ce-cli-19.03.11-3.el7.x86_64.rpm -rw-r--r--. 1 root root 16154160 Nov 1 22:14 docker-compose-Linux-x86_64 -rw-r--r--. 1 root root 67720 Nov 1 22:14 libcgroup-0.41-21.el7.x86_64.rpm -rw-r--r--. 1 root root 166012 Nov 1 22:14 libselinux-2.5-15.el7.x86_64.rpm -rw-r--r--. 1 root root 154876 Nov 1 22:14 libselinux-utils-2.5-15.el7.x86_64.rpm -rw-r--r--. 1 root root 154244 Nov 1 22:14 libsemanage-2.5-14.el7.x86_64.rpm -rw-r--r--. 1 root root 115284 Nov 1 22:14 libsemanage-python-2.5-14.el7.x86_64.rpm -rw-r--r--. 1 root root 304196 Nov 1 22:14 libsepol-2.5-10.el7.x86_64.rpm -rw-r--r--. 1 root root 78740 Nov 1 22:14 libsepol-devel-2.5-10.el7.x86_64.rpm -rw-r--r--. 1 root root 1383236 Nov 1 22:14 lvm2-2.02.186-7.el7.x86_64.rpm -rw-r--r--. 1 root root 1141848 Nov 1 22:14 lvm2-libs-2.02.186-7.el7.x86_64.rpm -rw-r--r--. 1 root root 938736 Nov 1 22:14 policycoreutils-2.5-34.el7.x86_64.rpm -rw-r--r--. 1 root root 468316 Nov 1 22:14 policycoreutils-python-2.5-34.el7.x86_64.rpm -rw-r--r--. 1 root root 232448 Nov 1 22:14 python-chardet-2.2.1-3.el7.noarch.rpm -rw-r--r--. 1 root root 32880 Nov 1 22:14 python-IPy-0.75-6.el7.noarch.rpm -rw-r--r--. 1 root root 273012 Nov 1 22:14 python-kitchen-1.1.1-5.el7.noarch.rpm -rw-r--r--. 1 root root 508432 Nov 1 22:14 selinux-policy-3.13.1-266.el7.noarch.rpm -rw-r--r--. 1 root root 7332032 Nov 1 22:14 selinux-policy-targeted-3.13.1-266.el7.noarch.rpm -rw-r--r--. 1 root root 112700 Nov 1 22:14 setools-devel-3.3.8-4.el7.x86_64.rpm -rw-r--r--. 1 root root 635184 Nov 1 22:14 setools-libs-3.3.8-4.el7.x86_64.rpm -rw-r--r--. 1 root root 124628 Nov 1 22:14 yum-utils-1.1.31-53.el7.noarch.rpm
-
上传至服务器
-
安装依赖
rpm -Uvh ./*.rpm rpm -ivh ./*.rpm
-
启动docker
systemctl start docker systemctl enable docker
-
验证
systemctl status docker
离线安装bash-completion命令补全工具
-
下载
\\带有yum环境的主机下 yum install -y bash-completion --downloadonly --downloaddir=/root/docker
-
上传安装包至指定服务器并安装
rpm -ivh bash-completion-2.1-8.el7.noarch.rpm
-
加载bash-completion
source /etc/profile.d/bash_completion.sh
离线安装docker-compose
-
下载docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
-
将文件上传至指定服务器/usr/bin目录下
-
赋予可执行权限
chmod a+x /usr/bin/docker-compose
-
测试
docker-compose --version docker-compose version 1.24.0, build 0aa59064
离线安装python docker-compose
-
离线包下载
#位于具有相同python环境、pip环境和网络环境的其他主机 pip3 download -d ./ docker pip3 download -d ./ docker-compose
-
将下载的包上传至服务器
[root@localhost python_docker]# ll total 8520 -rw-r--r--. 1 root root 48140 Nov 1 22:46 attrs-20.2.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 63891 Nov 1 22:46 bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl -rw-r--r--. 1 root root 7573 Nov 1 22:46 cached_property-1.5.2-py2.py3-none-any.whl -rw-r--r--. 1 root root 156576 Nov 1 22:46 certifi-2020.6.20-py2.py3-none-any.whl -rw-r--r--. 1 root root 400725 Nov 1 22:46 cffi-1.14.3-cp36-cp36m-manylinux1_x86_64.whl -rw-r--r--. 1 root root 401991 Nov 1 22:46 cffi-1.14.3-cp37-cp37m-manylinux1_x86_64.whl -rw-r--r--. 1 root root 133356 Nov 1 22:46 chardet-3.0.4-py2.py3-none-any.whl -rw-r--r--. 1 root root 2606314 Nov 1 22:46 cryptography-3.2.1-cp35-abi3-manylinux2010_x86_64.whl -rw-r--r--. 1 root root 18001 Nov 1 22:46 distro-1.5.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 145206 Nov 1 22:46 docker-4.3.1-py2.py3-none-any.whl -rw-r--r--. 1 root root 110182 Nov 1 22:46 docker_compose-1.27.4-py2.py3-none-any.whl -rw-r--r--. 1 root root 13924 Nov 1 22:46 dockerpty-0.4.1.tar.gz -rw-r--r--. 1 root root 25901 Nov 1 22:46 docopt-0.6.2.tar.gz -rw-r--r--. 1 root root 58811 Nov 1 22:46 idna-2.10-py2.py3-none-any.whl -rw-r--r--. 1 root root 31877 Nov 1 22:46 importlib_metadata-2.0.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 56305 Nov 1 22:46 jsonschema-3.2.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 206788 Nov 1 22:46 paramiko-2.7.2-py2.py3-none-any.whl -rw-r--r--. 1 root root 1504817 Nov 1 22:46 pip-20.2.4-py2.py3-none-any.whl -rw-r--r--. 1 root root 112041 Nov 1 22:46 pycparser-2.20-py2.py3-none-any.whl -rw-r--r--. 1 root root 961075 Nov 1 22:46 PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl -rw-r--r--. 1 root root 106911 Nov 1 22:46 pyrsistent-0.17.3.tar.gz -rw-r--r--. 1 root root 18253 Nov 1 22:46 python_dotenv-0.15.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 269377 Nov 1 22:46 PyYAML-5.3.1.tar.gz -rw-r--r--. 1 root root 61826 Nov 1 22:46 requests-2.24.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 785194 Nov 1 22:46 setuptools-50.3.2-py3-none-any.whl -rw-r--r--. 1 root root 10963 Nov 1 22:46 six-1.15.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 10717 Nov 1 22:46 texttable-1.6.3-py2.py3-none-any.whl -rw-r--r--. 1 root root 127978 Nov 1 22:46 urllib3-1.25.11-py2.py3-none-any.whl -rw-r--r--. 1 root root 200882 Nov 1 22:46 websocket_client-0.57.0-py2.py3-none-any.whl -rw-r--r--. 1 root root 5213 Nov 1 22:46 zipp-3.4.0-py3-none-any.whl
-
安装
pip3 install --no-index --find-links=./ docker pip3 install --no-index --find-links=./ docker-compose
-
验证
pip3 list
AWX离线安装
-
下载ansible/awx镜像
#联网主机下进行 docker pull ansible/awx:15.0.1 docker images docker save 04558a4dc475 -o awx.tar
-
离线导入ansible/awx镜像
#上传awx.tar到任意目录 docker load --input awx.tar
-
查看并重命名
[root@localhost images]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE <none> <none> 04558a4dc475 12 days ago 1.29GB #导入时默认名称为<none> #为镜像指定tag [root@localhost images]# docker tag 04558a4dc475 ansible/awx:15.0.1
-
上传awx安装包到任意目录并解压,下载地址:ansible/awx
[root@localhost awx]# pwd /root/awx/awx [root@localhost awx]# tar zxf awx-15.0.1.tar.gz
-
修改配置
[root@localhost installer]# pwd /root/awx/awx/awx-15.0.1/installer [root@localhost installer]# ls build.yml install.yml inventory roles [root@localhost installer]# vim inventory localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python3" #若安装主机非本地则将localhost ansible_connection=local 修改为目标主机ip或域名 [all:vars] # Remove these lines if you want to run a local image build # Otherwise the setup playbook will install the official Ansible images. Versions may # be selected based on: latest, 1, 1.0, 1.0.0, 1.0.0.123 # by default the base will be used to search for ansible/awx dockerhub_base=ansible awx_task_hostname=awx awx_web_hostname=awxweb postgres_data_dir="~/.awx/pgdocker" host_port=80 host_port_ssl=443 #ssl_certificate= # Optional key file #ssl_certificate_key= docker_compose_dir="~/.awx/awxcompose" # Required for Openshift when building the image on your own # Optional for Openshift if using Dockerhub or another prebuilt registry # Required for Docker Compose Install if building the image on your own # Optional for Docker Compose Install if using Dockerhub or another prebuilt registry # Define if you want the image pushed to a registry. The container definition will also use these images # docker_registry=172.30.1.1:5000 # docker_registry_repository=awx # docker_registry_username=developer # Set pg_hostname if you have an external postgres server, otherwise # a new postgres service will be created # pg_hostname=postgresql #使用已有pg数据库时启用该项 pg_username=awx #pg数据库用户名 # pg_password should be random 10 character alphanumeric string, when postgresql is running on kubernetes # NB: it's a limitation of the "official" postgres helm chart pg_password=awxpass #密码 pg_database=awx #库名 pg_port=5432 #端口号 #pg_sslmode=require # If requiring SSL communication (e.g. pg_sslmode='verify-full') with Postgres # and using a self-signed certificate or a certificate signed by a custom CA # set pg_root_ca_file to a file containing the self-signed certificate or the # root CA certificate chain. # pg_root_ca_file='example_root_ca.crt' # The following variable is only required when using the provided # containerized postgres deployment on OpenShift # pg_admin_password=postgrespass # Use a local distribution build container image for building the AWX package # This is helpful if you don't want to bother installing the build-time dependencies as # it is taken care of already. # NOTE: IMPORTANT: If you are running a mininshift install, using this container might not work # if you are using certain drivers like KVM where the source tree can't be mapped # into the build container. # Thus this setting must be set to False which will trigger a local build. To view the # typical dependencies that you might need to install see: # installer/image_build/files/Dockerfile.sdist # use_container_for_build=true # This will create or update a default admin (superuser) account in AWX, if not provided # then these default values are used admin_user=admin #awx管理员用户 admin_password=password #awx管理员密码 # Whether or not to create preload data for demonstration purposes create_preload_data=True # AWX Secret key # It's *very* important that this stay the same between upgrades or you will lose the ability to decrypt # your credentials secret_key=awxsecret # By default a broadcast websocket secret will be generated. # If you would like to *rerun the playbook*, you need to set a unique password. # Otherwise it would generate a new one every playbook run. # broadcast_websocket_secret= # Build AWX with official logos # Requires cloning awx-logos repo as a sibling of this project. # Review the trademark guidelines at https://github.com/ansible/awx-logos/blob/master/TRADEMARKS.md # awx_official=false # Proxy #网络代理相关配置,默认不启用 #http_proxy=http://proxy:3128 #https_proxy=http://proxy:3128 #no_proxy=mycorp.org # Container networking configuration # Set the awx_task and awx_web containers' search domain(s) #awx_container_search_domains=example.com,ansible.com # Alternate DNS servers #awx_alternate_dns_servers="10.1.2.3,10.2.3.4" # AWX project data folder. If you need access to the location where AWX stores the projects # it manages from the docker host, you can set this to turn it into a volume for the container. project_data_dir=/awx/projects #ansibe项目存放在本地文件路径 # AWX custom virtual environment folder. Only usable for local install. #custom_venv_dir=/opt/my-envs/ # CA Trust directory. If you need to provide custom CA certificates, supplying # this variable causes this directory on the host to be bind mounted over # /etc/pki/ca-trust in the awx_task and awx_web containers. # If you are deploying on openshift or kubernetes, set the variable to /etc/pki/ca-trust instead, # as the awx_web and awx_task containers will not run the `update-ca-trust` command. #ca_trust_dir=/etc/pki/ca-trust/source/anchors # Include /etc/nginx/awx_extra.conf # Note the use of glob pattern for nginx # which makes include "optional" - i.e. not fail # if file is absent #extra_nginx_include="/etc/nginx/awx_extra[.]conf" # Docker compose explicit subnet. Set to avoid overlapping your existing LAN networks. #docker_compose_subnet="172.17.0.1/16" # # Allow for different docker logging drivers # By Default; the logger will be json-file, however you can override # that by uncommenting the docker_logger below. # Be aware that journald may rate limit your log messages if you choose it. # See: https://docs.docker.com/config/containers/logging/configure/ # docker_logger=journald # # Add extra hosts to docker compose file. This might be necessary to # sneak in servernames. For example for DMZ self-signed CA certificates. # Equivialent to using the --add-host parameter with "docker run". #docker_compose_extra_hosts="otherserver.local:192.168.0.1,ldap-server.local:192.168.0.2"
-
执行安装脚本
[root@localhost installer]# ansible-playbook -i inventory install.yml
-
验证