目录
- 1.下载镜像
- 2.运行镜像 进入镜像
- 3.执行常用工具安装
- 4.安装网络包(需要使用ifconfig和ping命令)
- 5.安装keepalived环境依赖
- 6. 安装keepalived
1.下载镜像
docker pull centos
- 1
2.运行镜像 进入镜像
docker run -it -d --privileged=true --name centos1 -d centos:7
docker exec -it centos1 bash
- 1
- 2
3.执行常用工具安装
yum updateyum install -y vimyum install -y wgetyum install -y gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum install -y openssl openssl--develyum install -y popt-develyum install -y initscripts
yum install -y net-tools
- 1
- 2
4.安装网络包(需要使用ifconfig和ping命令)
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
yum install net-tools
yum install vim
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
5.安装keepalived环境依赖
yum install -y gcc openssl-devel popt-devel
- 1
6. 安装keepalived
yum install keepalived
- 1
/qq_21108311/article/details/82973763
/jinjiangongzuoshi/p/