CentOS 8 FAQ

# CentOS 8 关闭防火墙

sudo systemctl stop firewalld.service       # 停止firewall
sudo systemctl disable firewalld.service    # 禁止firewall开机启动
1
2

# CentOS 8 安装 docker

sudo yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum install -y containerd.io
sudo yum install -y --nobest docker-ce docker-ce-cli
sudo systemctl start docker
sudo systemctl enable docker
1
2
3
4
5
6
7
8

# CentOS 8 安装 docker-compose

sudo yum install -y epel-release
sudo yum-config-manager --enable epel
pip3 install --user docker-compose
1
2
3

# linux 下使用 cpu 并发解压缩来加快速度

sudo apt install pigz
tar --use-compress-program=pigz -cvpf package.tgz ./package
tar --use-compress-program=pigz -xvpf package.tgz -C ./package
1
2
3

# 修改成中国时区

cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
1