centos7新系统配置
注意防火墙问题
修改系统时区
1
| timedatectl set-timezone Asia/Shanghai
|
安装 python3
1 2 3
| sudo yum install epel-release sudo yum install python3 python3 --version
|
安装 docker
1 2 3 4 5 6 7
| sudo yum update sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker sudo systemctl enable docker
|
安装 nginx
新建文件 /etc/yum.repos.d/nginx.repo 填入内容
1 2 3 4 5
| [nginx] name=nginx repo baseurl=http://nginx.org/packages/centos/$releasever/$basearch/ gpgcheck=0 enabled=1
|
1 2 3 4
| sudo yum install nginx
sudo systemctl start nginx sudo systemctl enable nginx
|