一 查看系统内核是否为Ubuntu 1
root@kylinroot-computer:/home/kylinroot/myDownloads/awx-14.1.0/installer# cat /proc/version
Linux version 4.11.0-14-generic (buildd@builder211) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #20~16.04.1kord0k1-Ubuntu SMP Wed Oct 18 00:56:13 UTC 2017
注:如果可以,直接切换root用户操作如下命令2
sudo -i
二 安装ansible
1、修改Ubuntu 软件管理命令apt的镜像源为国内源
修改source.list
文件
sudo vi /etc/apt/source.list
文件内容改为如下:
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic stable
# deb-src [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu bionic stable
升级apt管理的软件
sudo apt update
sudo apt upgrade
2、设置系统
- 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
- 关闭selinux
修改config
文件
vi /etc/selinux/config
将文件中的SELINUX值修改为如下
SELINUX=disabled
3、安装python
- 先检查系统是否存在
python3
环境
ll /usr/bin/python*
root@kylinroot-computer:~# ll /usr/bin/python*
lrwxrwxrwx 1 root root 9 6月 18 21:28 /usr/bin/python -> python3.6*
lrwxrwxrwx 1 root root 9 4月 16 2018 /usr/bin/python2 -> python2.7*
-rwxr-xr-x 1 root root 3637096 3月 9 2023 /usr/bin/python2.7*
lrwxrwxrwx 1 root root 9 10月 25 2018 /usr/bin/python3 ->