centos_envirment_v1.sh

浏览:18
jackios 2020-07-31 11:11

#!/bin/bash

# by jackios

#2020年7月31日09:48:08

#######

yum install lrzsz net-tools vim  wget -y

cd /etc/yum.repos.d/

wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

echo >qinghua-epel.repo<<-EOF

[qinghua-epel]

name=qinghua-cenots-epel

baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/x86_64/

gpgkey=https://mirrors.tuna.tsinghua.edu.cn/epel/RPM-GPG-KEY-EPEL-7

gpgcheck=1

EOF

wget http://tel.mirrors.163.com/.help/CentOS7-Base-163.repo

echo >sohu.repo<<-EOF

[sohu]

name=sohu-centos

baseurl=http://mirrors.sohu.com/centos/7/os/x86_64/

gpgcheck=1

gpgkey=http://mirrors.sohu.com/centos/7/os/x86_64/RPM-GPG-KEY-CentOS-7

EOF

echo >maraidb.repo<<-EOF

[mariadb]

name=Mariadb

baseurl=https://mirrors.tuna.tsinghua.edu.cn/mariadb/yum/10.5/centos74-amd64/

gpgcheck=1

gpgkey=https://mirrors.tuna.tsinghua.edu.cn/mariadb/yum/RPM-GPG-KEY-MariaDB

EOF

echo >nginx.repo<<-EOF

[nginx-stable]

name=nginx stable repo

baseurl=http://nginx.org/packages/centos/$releasever/$basearch/

gpgcheck=1

enabled=1

gpgkey=https://nginx.org/keys/nginx_signing.key

module_hotfixes=true

[nginx-mainline]

name=nginx mainline repo

baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/                                                                                 

gpgcheck=1

enabled=0

gpgkey=https://nginx.org/keys/nginx_signing.key

module_hotfixes=true

EOF

sed -i "s/keepcache=0/keepcache=1/g" /etc/yum.conf

yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

yum makecache -y



如果觉得我的文章对你有用,请随意赞赏

待完善
不要去追一匹马,用追马的时间种草,待到春暖花开时,就会有一批骏马任你挑选;不要去刻意巴结一个人,用暂时没有朋友的时间,去提升自己的能力,待到时机成熟时,就会有一批的朋友与你行。用人情做出来的朋友只是暂时的,用人格吸引来的朋友才是长久的。所以种下梧桐树,引得凤凰来。你若盛开,蝴蝶自来,你若精彩,天自安排
微信扫码登录测试

Powered by Jackios V1.0 Copyright © 2019-2020 liuql 版权所有 备案号: 鲁ICP19026293号