wget -nd -r -l1 -A.rpm --no-parent http://mirrors.aliyun.com/centos/7.6.1810/os/x86_64/Packages/ -e robots=off
wget -nd -r -l1 -A.rpm --no-parent http://mirrors.163.com/centos/7.6.1810/os/x86_64/Packages/ -e robots=off
wget -nd -r -nc -p -A.rpm --no-parent http://mirrors.aliyun.com/epel/7/x86_64/Packages/ -e robots=offcd
-nd 不创建目录, wget默认会创建一个目录
-r 递归下载
-l1 (L one) 递归一层,只下载指定文件夹中的内容, 不下载下一级目录中的.
–no-parent 不下载父目录中的文件
-p 下载网页所需的所有文件,如图片等
-nc:下载时跳过已经存在的文件
-e robots=off 忽略robots
下载阿里yum源 打开内容如下
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=