1、 执行# yum update命令
2, 安装docker
#Yum install docker(如图2-3)
图2-3
3,启动docker
输入#systemtl start docker(如图2-4)
图2-4
4,删除软件docker
#yum remove docker(如图2-5)
图2-5
#wget-O/etc/yum.repos.d/CentOS-Base.repohttp://mirrors.aliyun.com/repo/Centos-7.repo(如图2-6)
图2-6
6, #yum clean all
(如图2-7)
图2-7
7,#yum makecache(如图2-8)
图2-8
# docker pull centos:latest(如图2-9)
图2-9
#docker images
#uname -a(如图2-32)
图2-32
、#cat /etc/centos-release(如图2-33)
图2-33
#docker run --privileged --name centos-mysql-php-redis-" 个人id" -it -p 80:80 -v /home/prjs/:/var/www/html/ 9f38484d220f /usr/sbin/init
#exit(如图2-35)
图2-35
15、启动容器
# docker start "docker IP"
16、进入容器
# docker exec -it "docker IP bash
查看httpd包是否可用
#yum list | grep httpd(如图3-44)
图3-44
18,安装http
#yum install httpd
19安装php
#um install epel-release
20,
#rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
21,
#Yum install mod_php72w php72w-opcache
在浏览器里输入个人ip/域名,出现相关页面,安装成功。
原文:https://www.cnblogs.com/rmlrml/p/dabaideLinuxzhilu.html