Linux之Ubuntu与银河麒麟(内核Ubuntu)操作系统上部署ansible+awx

一 查看系统内核是否为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、设置系统

  1. 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
  1. 关闭selinux
    修改config文件
vi /etc/selinux/config

将文件中的SELINUX值修改为如下

SELINUX=disabled

3、安装python

  1. 先检查系统是否存在python3环境
ll /usr/bin/python*
root@kylinroot-computer:~# ll  /usr/bin/python*
lrwxrwxrwx 1 root root       9 618 21:28 /usr/bin/python -> python3.6*
lrwxrwxrwx 1 root root       9 416  2018 /usr/bin/python2 -> python2.7*
-rwxr-xr-x 1 root root 3637096 39  2023 /usr/bin/python2.7*
lrwxrwxrwx 1 root root       9 1025  2018 /usr/bin/python3 ->
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值