centos7配置阿里云源,docker,awvs
docker配置阿里云源
备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
下载源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
或
vim /etc/yum.repos.d/CentOS-Base.repo
输入
[base]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/$releasever/os/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6
[updates]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/$releasever/updates/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6
[extras]
name=CentOS-$releasever
enabled=1
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/$releasever/extras/$basearch/
gpgcheck=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6
[centosplus]
name=CentOS-6.10 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/$releasever/centosplus/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6
[contrib]
name=CentOS-6.10 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/centos/$releasever/contrib/$basearch/
gpgcheck=0
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/centos/RPM-GPG-KEY-CentOS-6
清除yum缓存
yum clean all
缓存阿里云源
yum makecache
测试阿里云源
yum list
centos安装docker
yum list docker-ce --showduplicates | sort -r (可忽略)
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache fast
yum install -y yum-utils device-mapper-persistent-data lvm2
yum install docker-ce -y
systemctl start docker
docker version
systemctl start docker
systemctl enable docker
配置centos,按如下配置
mkdir -p /etc/docker
vim /etc/docker/daemon.json
#复制配置内容,编辑daemon.json并保存文件
{
"registry-mirrors": ["https://63sptfve.mirror.aliyuncs.com"]
}
或
{"registry-mirrors": ["https://dockerpull.com"]}
sudo systemctl daemon-reload
sudo systemctl restart docker
安装docker-compose
curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
cd /usr/local/bin/
ls
chmod +x docker-compose
docker-compose -version
安装vulhub
mkdir -p /var/local/soft/
cd /var/local/soft/
yum -y install git
git clone https://github.com/vulhub/vulhub.git
docker 安装AWVS
# pull 拉取下载镜像
docker pull secfa/docker-awvs
# 将Docker的3443端口映射到物理机的 13443端口
docker run -it -d -p 13443:3443 secfa/docker-awvs
# 容器的相关信息
awvs13 username: admin@admin.com
awvs13 password: Admin123
AWVS版本:13.0.200217097
#访问url
https://192.168.226.161:13443/#/login