安装软件包dpkg-dev
apt-get install dpkg-dev
apt 软件包索引创建
sudo rsync -av /var/cache/apt/archives/* /opt/debs/
cd /opt/debs # 注意目录需要读写权限
sudo dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
NGINX 服务提供私有仓库
cat /etc/nginx/conf.d/apt.sinux.com.cn.conf
server {
listen 80;
server_name apt.sinux.com.cn;
location / {
autoindex on;
root /opt/debs;
}
}
# vsftpd 允许匿名用户访问
anonymous_enable=YES #设置匿名用户可用
write_enable=YES # 设置用户写的权限 YES
anon_upload_enable=YES #设置匿名用户上传YES
anon_mkdir_write_enable=YES # 设置匿名用户新建目录YES