【编译】Linux 音频系统简析
此贴的目的:
让ubuntu星星之火,可以燎原!
首先,部分本地源的制作:
平时apt-get 或新立得安装软件时,下载的deb文件都会存放在/var/cache/apt/archives/下, 为了今后重装或给别人用,特别是没有网络时,这些deb文件实际上是可以派上用途的,也就是可以用这些deb制作成本地源
下面给出可行且实用的部分本地源制作步骤:
1 sudo apt-get install nautilus-open-terminal dpkg-dev
2 将 /var/cache/apt/archives/下的所有deb文件拷到(cp命令,图形界面都没问题) 你想要的地方,拷贝前建议执行一下
比方说拷至一个windows分区下的APT1目录中: /media/hda3/APT1
3 拷完后用文件浏览器(nautilus)进入刚才新建的目录APT1所在的上一级目录,也就是: /media/hda3
4 在文件浏览器(nautilus) 中的空白处点右键,选在终端中打开,这时会打开一个新的终端。
5 在新打开的终端中执行: sudo dpkg-scanpackages APT1 /dev/null |gzip >APT1/Packages.gz
6 gksu gedit /etc/apt/sources.list
把 deb file:///media/hda3/ APT1/
注意APT1后面有一个斜杠,前面还要有空格
加入到sources.list即可。
如果你安装了apache2,也可以把这个部分源对外开放,方法如下:
sudo ln -s /media/hda3/APT1/ /var/www/ubuntu-local
gksu gedit /etc/apt/sources.list
把 deb http://127.0.0.1/ubuntu-local /
加入到sources.list即可。
注意空格后有一个斜杠
网上其它电脑修改源时,要把127.0.0.1改为你的ip地址或域名
另外,也可以:
aptoncd可以把/var/cache/apt/archives/下的所有deb文件打包到iso文件,并且自动生成一个虚包,在新立得中加入这个光盘源后,只要安装这个虚包,即可把所有deb一次性安装好。
接下来,完整的镜相源制作,这一步大部分人都用不着,除非你在局域网者或者上行网速很快:
镜像目录为/var/spool/下的 apt-mirror
安装前一定要注意:
尽量用官方源或找口碑不错的镜像站进行镜像
安装不放心的镜像站软件时,没有认证的软件要慎重安装
制作好的朋友,建议对自己的朋友共享出来,对于没有网络的朋友,可以通过同城交流来进行拷贝。
我试了不少镜像方案,发现下面的方法比较简单
下面以镜像中国科技大学(USTC) ubuntu源 和 ubuntu-cn 以及 ubuntu 终级版 7.04 三个 pc 源为例
注意,/var下要有35G以上的空间,建议在35G的基础上再保留30%以上的余量
/var下没有空间的朋友可以把镜像目录改到windows分区中,可以参考本贴81楼的方法,也可修改mirror.list中的第一行base_path指定apt-mirror所在路径 同时在这个目录下建立mirror skel var三个文件夹,对应三行的注释(#)去掉即可, 7.10 或以上版本空间上要留一定的余量,就如同安装xp,如果说安装xp c盘至少要2G的空间,你会只给c盘分2G吗?
如果镜像其它ubuntu源,只要把下面提到的源做相应修改即可!url全部用颜色标出,根据自身情况修改,feisty为7.04 ,如果镜像ubuntu 7.10 ,改为gutsy ,8.04 改为hardy...............8.10改为intrepid ........9.04 改为Jaunty..............10.04 改为.................................
1。安装相应软件
apt-get install apache2 #如果不打算对局域网或互联网开放,这个不必装
2。配制镜像
#
# set base_path /var/spool/apt-mirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch <running host architecture>
#默认为20线程下载,雕推荐3线程,20可能会造成服备器或网络loading太重
set nthreads 20
set tilde 0
#
############# end config ##############
#ubuntu-cn 7.04源
deb http://archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
# ubuntu 终级版 7.04 源, ubuntu 7.04可用
deb http://ubuntusoftware.info/ feisty all
#中国科技大学(USTC) ubuntu 7.04 源
deb http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
#ubuntu 7.04 src源不进行同步,因为大部分人用不上,如果同步,要多增加一倍空间
#deb-src http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
#deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
#同步了三个源,所以有三行,下面的代码是为了镜像成功后节省空间的,实际上下面的三行不写也是可以的
clean http://archive.ubuntu.org.cn/ubuntu-cn
clean http://debian.ustc.edu.cn/ubuntu
clean http://ubuntusoftware.info
3。进行镜像
网速不同,时间不同,完成后有提示,如果时间太长,可以关闭终端或ctrl+c ,如果电脑关机,什么时候要继续,再重新执行代码即可,这时原来下载过的是不会重新下载的。
直到完成,完成后有如何节约空间的提示,可以不去理会
4。接下来,配制镜像源/本地源/更新源/离线升级包,颜色部分根据你镜像的源进行修改即可,如果只同步一个,就只执行其中一行即可
sudo ln -s /var/spool/apt-mirror/mirror/archive.ubuntu.org.cn/ /var/www/ubuntu-cn #如果第一步中的apache2 没装,这一步跳过
sudo ln -s /var/spool/apt-mirror/mirror/ubuntusoftware.info/ /var/www/ubuntu-ultimate #如果第一步中的apache2 没装,这一步跳过
修改源,
deb http://127.0.0.1/ubuntu/ubuntu/ feisty main restricted universe multiverse
deb http://127.0.0.1/ubuntu/ubuntu/ feisty-backports restricted universe multiverse
deb http://127.0.0.1/ubuntu/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://127.0.0.1/ubuntu/ubuntu/ feisty-security main restricted universe multiverse
deb http://127.0.0.1/ubuntu/ubuntu/ feisty-updates main restricted universe multiverse
deb http://127.0.0.1/ubuntu-cn/ubuntu-cn/ feisty main restricted universe multiverse
deb http://127.0.0.1/ubuntu-ultimate/ feisty all
deb file:///var/spool/apt-mirror/mirror/archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/ubuntusoftware.info/ feisty all
deb file:///var/spool/apt-mirror/mirror/debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/debian.ustc.edu.cn/ubuntu/ feisty-backports restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb file:///var/spool/apt-mirror/mirror/debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
如果镜像完成后想对镜像源进行更新,只要再
这时原来下载过的是不会重新下载的
An advantage to free software is that it is an environment where competition can thrive, choice is always available and different solutions exist for the same problem. However, it’s also fair to say that free software is disadvantaged where competition breeds, choices are forced on unsuspecting users and diverse technologies fight each other.
您没有权限查看这个主题的附件。
作者: skyx 发布时间: 2007-05-10
作者: zhuqin_83 发布时间: 2007-05-10
谢谢zhuqin_83版主的加精,希望ubuntu镜像源遍地开花!!
那只雕只知道耍流氓,不提他,提他就生气。
作者: skyx 发布时间: 2007-05-10
用file写的格式,不会复制文件,而且即使在安装一个最小的基本系统的情况下只要有apt的支持可以用,适合skyx这种喜欢玩mini系统的高手MM...
deb file:///directories/archive.ubuntu.org.cn/ubuntu-cn/ feisty main restricted universe multiverse
deb file:///directories/packs feisty/
#deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
#deb http://security.ubuntu.com/ubuntu feisty-security main restricted
#deb-src http://security.ubuntu.com/ubuntu feisty-security main restricted
#deb http://security.ubuntu.com/ubuntu feisty-security universe
#deb-src http://security.ubuntu.com/ubuntu feisty-security universe
#deb http://security.ubuntu.com/ubuntu feisty-security multiverse
#deb-src http://security.ubuntu.com/ubuntu feisty-security multiverse
哪里流氓了? <--------闭关中,出来透口气
作者: 雕啸长空 发布时间: 2007-05-10
学习~~
有机会的话一定亲自尝试
作者: hao123liu 发布时间: 2007-05-10
作者: 雕啸长空 发布时间: 2007-05-10
作者: zhan 发布时间: 2007-05-10
用file写的格式,不会复制文件,
我就只道这只流氓雕只会说风凉话,开apache也会是不少新学者人生的第一个网站,开了apache又怎么了? 哪有你那么自私,没有一点共享精神? 不想开apache 关掉apache不就行了,难道不可以本地源?
作者: skyx 发布时间: 2007-05-10
作者: stlxv 发布时间: 2007-05-10
话又说会来,假ee比雕讨厌多了,雕的讨厌程度也只是轻度让人讨厌。
假ee是中度以上的让人讨厌
作者: skyx 发布时间: 2007-05-10
这个只要将/var/spool/apt-mirror/mirror 链接到有足够空间的分区也可以的<---------闭关中,出来透口气
作者: 雕啸长空 发布时间: 2007-05-10
明知道我是菜鸟,我不会写
作者: skyx 发布时间: 2007-05-10
这个只要将/var/spool/apt-mirror/mirror 链接到有足够空间的分区也可以的<---------闭关中,出来透口气
这样对系统或软件而言还是 /var下
可以不用ln ,直接改apt-mirror配制,但是没必要写那么多,要不然很多新来的又会知难而退
我的目的是: 简单,人人都会,希望这个帖能让ubuntu 镜像源遍地开花。
作者: skyx 发布时间: 2007-05-10
如果你和雕大侠一样没有共享精神,可以不安装apache 2
同时本地源推荐不用http方式,这是为了节约硬盘空间,提高安装速度,本地的sources.lis写成这样的格式:
再次对雕大侠的指点表示感谢
热烈欢送 雕大侠回去继续闭关。
作者: skyx 发布时间: 2007-05-10
作者: rhfcaesar 发布时间: 2007-05-10