安装制作软件包:
yum -y install createrepo
创建仓库目录:
mkdir -p /yum/centos/6/{i386,x86_64}
生成repodata索引
createrepo -d /yum/centos/6/x86_64/
#更新索引
createrepo --update /yum/centos/6/x86_64/
配置Nginx:
location / {
root /yum;
autoindex_exact_size off;
autoindex_localtime on;
autoindex on;
}
配置yum使用源:
[testrepo]
name=test repo
baseurl=http://192.168.1.1/centos/6/$basearch/
gpgcheck=0
enabled=1
标签:none