yum makecache#查看repo标识yum repolist#同步base库reposync -r base -p /mnt/yum/ #如果没有这个命令,先安装: yum install yum-utils- y#安装createrepoyum install createrepo#制作yum源,生成索引信息,-o指定目录,-p格式化xmlcreaterepo -po /mnt/yum/base /mnt/yum/base#后续更新了rpm软件库包的文件后,利用createrepo update进行同步createrepo --update /mnt/yum/base#配置yum源地址#清理缓存,重新缓存yum clean allyum makecache
_注:_reposync -r base -p /mnt/yum/ 同步下载源时,可以不指定 repoid,默认下载所有开启的yum仓库reposync - n -p /mnt/yum/
-n :下载最新的
nginx配置使用
server {listen 80 default_server;listen [::]:80 default_server;server_name _;root /usr/share/nginx/html;# Load configuration files for the default server block.include /etc/nginx/default.d/*.conf;location / {root /mirror;autoindex on;}error_page 404 /404.html;location = /404.html {}error_page 500 502 503 504 /50x.html;location = /50x.html {}}
