以哪个镜像作为基础镜像

centos:centos8

1
docker run -it --rm centos:centos8

换源

阿里源

1
2
3
4
5
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* \
&& sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
&& curl https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo -L -o /etc/yum.repos.d/CentOS-Base.repo \
&& yum clean all \
&& yum makecache

安装Git

yum 安装

1
yum install git -y

二进制安装

1

安装Clang

yum安装

1
yum install clang -y

二进制安装

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
```



# 安装SSH

## yum安装

```shell
yum install openssh-server openssh-clients passwd -y \
&& sed -i "s/^UsePAM yes/UsePAM no/g" /etc/ssh/sshd_config \
&& echo 123456 | passwd root --stdin \
&& ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa \
&& cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys \
&& chmod 0600 ~/.ssh/authorized_keys \
&& ssh-keygen -q -N "" -t rsa -f /etc/ssh/ssh_host_rsa_key \
&& ssh-keygen -q -N "" -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key \
&& ssh-keygen -q -N "" -t ed25519 -f /etc/ssh/ssh_host_ed25519_key

启动

1
/usr/sbin/sshd

请我喝[茶]~( ̄▽ ̄)~*

fightinggg 微信支付

微信支付

fightinggg 支付宝

支付宝

fightinggg 贝宝

贝宝