centos常用软件安装

一、安装Apache

# 安装 Apache
yum -y install httpd
# 设置 Apache 开机自启动
systemctl enable httpd
# 启动 Apache
systemctl start httpd
# 查看 Apache 运行状态
systemctl status httpd

二、安装网络工具

  yum -y install net-tools



 

二、安装Docker

    官网安装文档地址:https://docs.docker.com/engine/install/centos/

#安装仓库Repository
sudo yum install -y yum-utils sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
#安装Docker Engine
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
#启动Docker
sudo systemctl start docker
#验证(运行hello-world镜像验证是否安装成功)
sudo docker run hello-world

#配置开机启动
sudo systemctl enable docker

#配置镜像加速器(阿里云或华为云等)
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors":["https://3cilz2k3.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker
##卸载Docker(centos)
sudo yum remove docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
sudo rm -rf /var/lib/docker
sudo rm -rf /var/lib/containerd

三、安装Redis
参考地址:https://redis.io/docs/install/install-redis/





 

 

posted @ 2023-12-06 14:59  蓝一  阅读(37)  评论(0)    收藏  举报