Chinaunix首页 | 论坛 | 博客
  • 博客访问: 115700
  • 博文数量: 14
  • 博客积分: 1979
  • 博客等级: 大尉
  • 技术积分: 182
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-02 21:20
文章分类
文章存档

2012年(2)

2011年(1)

2010年(2)

2009年(2)

2008年(7)

分类: LINUX

2008-12-02 11:02:00

Debian etch  系统下本地源的安装方法
创建本地源
apt-get install dpkg-dev
(dpkg-scanpackages命令安装)
mkdir /z 
(作为安装源目录)
cd /z
//mkdir pool
//(软件包存放的物理地址,要先把所有的软件包放进来)
//此步骤并不需要操作
mkdir -p dists/etch/main/binary-i386
(其中etch是cd镜像对应的版本)
进入到iso的存放目录,etch共有20个iso文件
mount -o loop debian-40r4a-i386-CD-1.iso /mnt/1
mount -o loop debian-40r4a-i386-CD-2.iso /mnt/2
mount -o loop debian-40r4a-i386-CD-3.iso /mnt/3
mount -o loop debian-40r4a-i386-CD-4.iso /mnt/4
mount -o loop debian-40r4a-i386-CD-5.iso /mnt/5
mount -o loop debian-40r4a-i386-CD-6.iso /mnt/6
mount -o loop debian-40r4a-i386-CD-7.iso /mnt/7
mount -o loop debian-40r4a-i386-CD-8.iso /mnt/8
mount -o loop debian-40r4a-i386-CD-9.iso /mnt/9
mount -o loop debian-40r4a-i386-CD-10.iso /mnt/10
mount -o loop debian-40r4a-i386-CD-11.iso /mnt/11
mount -o loop debian-40r4a-i386-CD-12.iso /mnt/12
mount -o loop debian-40r4a-i386-CD-13.iso /mnt/13
mount -o loop debian-40r4a-i386-CD-14.iso /mnt/14
mount -o loop debian-40r4a-i386-CD-15.iso /mnt/15
mount -o loop debian-40r4a-i386-CD-16.iso /mnt/16
mount -o loop debian-40r4a-i386-CD-17.iso /mnt/17
mount -o loop debian-40r4a-i386-CD-18.iso /mnt/18
mount -o loop debian-40r4a-i386-CD-19.iso /mnt/19
mount -o loop debian-40r4a-i386-CD-20.iso /mnt/20
全部挂在上
scp -r /mnt/2/pool
scp -r /mnt/3/pool
scp -r /mnt/4/pool
scp -r /mnt/5/pool
scp -r /mnt/6/pool
scp -r /mnt/7/pool
scp -r /mnt/8/pool
scp -r /mnt/9/pool
scp -r /mnt/10/pool
scp -r /mnt/11/pool
scp -r /mnt/12/pool
scp -r /mnt/13/pool
scp -r /mnt/14/pool
scp -r /mnt/15/pool
scp -r /mnt/16/pool
scp -r /mnt/17/pool
scp -r /mnt/18/pool
scp -r /mnt/19/pool
scp -r /mnt/20/pool
将pool目录复制到/z目录下面
ls -1 pool | sed 's/_.*$/ extra BOGUS/' | uniq > override
(把pool目录下所有的deb包包名写入文件override中)
dpkg-scanpackages pools override > dists/etch/main/binary-i386/Packages
(把所有包的包名、版本号、依赖关系等信息写入文件Packages中)
gzip Packages
[etch版本中要把Packages文件变成Packages.gz文件]
vi dists/etch/main/Release
vi dists/etch/main/binary-i386/Release
cat /z/dists/etch/Release
Origin: Debian
Label: Debian
Suite: stable
Version: 4.0r4a
Codename: etch
Date: Thu, 31 Jul 2008 22:04:13 UTC
Architectures: i386
Components: main

建立apache的软连接
cd /var/www
ln -s /z /var/www/debian


/etc/apt/source.list
deb etch main

阅读(2256) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~