linux centos7 配置yum源

1,軟件及系統版本java

使用lsb_release -a 能夠查看系統發行版本信息node

[root@localhost ~]# lsb_release -apython

LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchlinux

Distributor ID: CentOSvim

Description: CentOS Linux release 7.6.1810 (Core) centos

Release: 7.6.1810curl

Codename: Coreurl

 

2,系統環境準備centos7

2.1 開啓防火牆及關係SElinuxspa

systemctl enable firewalld && systemctl start firewalld

sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config && setenforce 0

2.2 系統軟件源配置

curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

curl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

2.3 經常使用軟件安裝

  yum -y intall vim

2.4 部署時間服務

  yum -y install chrony

  systemctl enable chronyd && systemctl start chronyd

  timedateclt status

3,centos7中yum安裝jdk及配置環境變量

3.1 安裝以前先查看一下有無系統自帶jdk

    rpm -qa | grep java

    rpm -qa | grep jdk

    rpm -qa | grep gcj

3.2 若是有就使用批量卸載命令

  rpm -qa | grep java | xargs rpm -e --nodeps

 

    直接yum安裝1.8.0版本openjdk

    yum -y install java-1.8.0-openjdk* -y

4,centos 7 中yum 安裝python3.6

    

    yum install -y  python36

5,安裝ansible

    yum install ansible -y

相關文章
相關標籤/搜索