概述
debian 使用iso镜像搭建源
需求:有一些很旧的debian7的系统,需要安装一些软件包,可是官方已经没有他的源了,无赖之下,只能看能不能用iso镜像来制作源。
镜像如下
debian-7.11.0-amd64-DVD-1.iso
debian-7.11.0-amd64-DVD-2.iso
debian-7.11.0-amd64-DVD-3.iso
debian-update-7.11.0-amd64-DVD-1.iso
debian-update-7.11.0-amd64-DVD-2.iso
debian-update-7.11.0-amd64-DVD-3.iso
新建目录
mkdir -p /aptdata/debian7/{dvd1,dvd2,dvd3}/debian
mkdir -p /aptdata/debian7/{update1,update2,update3}/debian
先挂载一个镜像
mount debian-7.11.0-amd64-DVD-1.iso -o loop /mnt
cd mnt
rsync -vzrtopgu -progress dists /aptdata/debian7/dvd1/debian/
rsync -vzrtopgu -progress pool /aptdata/debian7/dvd1/debian/
然后依次挂载6个iso镜像,最后6个目录全部都是有文件的
服务端新建nginx配置文件
server {
listen 8001;
server_name 192.168.1.100;
location / {
autoindex on;
autoindex_exact_size off;
root /aptdata/debian7/dvd1/;
}
}
server {
listen 8002;
server_name 192.168.1.100;
location / {
autoindex on;
autoindex_exact_size off;
root /aptdata/debian7/dvd2/;
}
}
server {
listen 8003;
server_name 192.168.1.100;
location / {
autoindex on;
autoindex_exact_size off;
root /aptdata/debian7/dvd3/;
}
}
server {
listen 8004;
server_name 192.168.1.100;
location / {
autoindex on;
autoindex_exact_size off;
root /aptdata/debian7/update1/;
}
}
server {
listen 8005;
server_name 192.168.1.100;
location / {
autoindex on;
autoindex_exact_size off;
# autoindex_localtime on;
root /aptdata/debian7/update2/;
}
}
server {
listen 8006;
server_name 192.168.1.100;
location / {
autoindex on;
autoindex_exact_size off;
root /aptdata/debian7/update3/;
}
}
客户端配置文件
vi /etc/apt/sources.list
deb [trusted=yes] http://192.168.1.100:8001/debian/ wheezy main non-free contrib
deb http://192.168.1.100:8001/debian/ wheezy-updates main non-free contrib
deb [trusted=yes] http://192.168.1.100:8002/debian/ wheezy main non-free contrib
deb http://192.168.1.100:8002/debian/ wheezy-updates main non-free contrib
deb [trusted=yes] http://192.168.1.100:8003/debian/ wheezy main non-free contrib
deb http://192.168.1.100:8003/debian/ wheezy-updates main non-free contrib
deb [trusted=yes] http://192.168.1.100:8004/debian/ wheezy main non-free contrib
deb http://192.168.1.100:8004/debian/ wheezy-updates main non-free contrib
deb [trusted=yes] http://192.168.1.100:8006/debian/ wheezy main non-free contrib
deb http://192.168.1.100:8006/debian/ wheezy-updates main non-free contrib
deb [trusted=yes] http://192.168.1.100:8006/debian/ wheezy main non-free contrib
deb http://192.168.1.100:8006/debian/ wheezy-updates main non-free contrib
最后
以上就是粗犷巨人为你收集整理的debian使用iso镜像搭建源debian 使用iso镜像搭建源的全部内容,希望文章能够帮你解决debian使用iso镜像搭建源debian 使用iso镜像搭建源所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复