担心忘记了,一点一点记录过程。
packages.ubuntu.com 的站长非不肯公布架设方法,只好一点一点摸索。
架设packages.ubuntu.org.cn过程。
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
一:从服务器下载Debian的脚本
cvs -d :pserver:anonymous@cvs.debian.org:/cvs/webwml login
cvs -d :pserver:anonymous@cvs.debian.org:/cvs/webwml checkout packages
cvs -d :pserver:anonymous@cvs.debian.org:/cvs/webwml login
cvs -d :pserver:anonymous@cvs.debian.org:/cvs/webwml checkout packages
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
第二 vim config.sh 根据情况修改如下:
代码: 全选
# Configuration for packages.debian.org
#
topdir=/share/packages
tmpdir=${topdir}/tmp
bindir=${topdir}/bin
scriptdir=${topdir}/htmlscripts
libdir=${topdir}/lib
filesdir=${topdir}/files
htmldir=${topdir}/www
archivedir=${topdir}/archive
podir=${topdir}/po
localedir=${topdir}/locale
staticdir=${topdir}/static
configdir=${topdir}/etc
# unset this if packages.debian.org moves somewhere where the packages files
# cannot be obtained locally
#
#localdir=/org/ftp.debian.org/ftp
# path to private ftp directory
#ftproot=/org/ftp.root
ftpsite=http://ubuntu.cn99.com/ubuntu
#nonus_ftpsite=http://ftp.uk.debian.org/debian-non-US
#security_ftpsite=http://security.debian.org/debian-security
#volatile_ftpsite=http://volatile.debian.net/debian-volatile
#amd64_ftpsite=http://amd64.debian.net/debian
# Architectures
#
polangs="de fi nl fr uk"
ddtplangs="de cs da eo es fi fr hu it ja nl pl pt_BR pt_PT ru sk sv_SE uk"
parts="main multiverse restricted universe"
dists="warty hoary breezy dapper"
arch_warty="i386 amd64 powerpc"
arch_hoary="i386 amd64 powerpc"
arch_breezy="i386 amd64 powerpc"
arch_dapper="i386 amd64 powerpc"
#arch_oldstable="alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sparc"
#arch_stable="${arch_oldstable} amd64"
#arch_testing="${arch_stable}"
#arch_unstable="${arch_stable} hurd-i386"
#arch_experimental="${arch_unstable}"
#arch_testing_proposed_updates="${arch_testing}"
#arch_stable_proposed_updates="${arch_stable}"
# Miscellaneous
#
admin_email="root@ubuntu.org.cn"
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
vim cgi-bin/search_packages.pl 修改:
my $HOME = "http://www.debian.org";
my $ROOT = "";
my $SEARCHPAGE = "http://packages.debian.org/";
my @DISTS = qw( oldstable stable testing unstable experimental );
为
my $HOME = "http://www.ubuntu.org.cn";
my $ROOT = "";
my $SEARCHPAGE = "http://packages.ubuntu.org.cn";
my @DISTS = qw( warty hoary breezy dapper );
my $HOME = "http://www.debian.org";
my $ROOT = "";
my $SEARCHPAGE = "http://packages.debian.org/";
my @DISTS = qw( oldstable stable testing unstable experimental );
为
my $HOME = "http://www.ubuntu.org.cn";
my $ROOT = "";
my $SEARCHPAGE = "http://packages.ubuntu.org.cn";
my @DISTS = qw( warty hoary breezy dapper );
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
建立虚拟主机
代码: 全选
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName packages.ubuntu.org.cn
CustomLog /var/log/apache2/packages.wubuntu.org.cn-access.log combined
ScriptAlias /cgi-bin /disk/packages/cgi-bin/
DocumentRoot /share/packages/
RewriteEngine on
RewriteRule ^/([^/+]*)([+])([^/]*)$ "/$1%%{%}2B$3" [N]
RewriteRule ^/src:([^/]+)$ http://packages.ubuntu.org.cn/cgi-bin/search_packages.pl?searchon=sourcenames&version=all&exact=1&keywords=$1 [R,L,NE]
RewriteRule ^/file:(.+)$ http://packages.ubuntu.org.cn/cgi-bin/search_contents.pl?word=$1&searchmode=searchfiles [R,L,NE]
RewriteRule ^/dirs:(.+)$ http://packages.ubuntu.org.cn/cgi-bin/search_contents.pl?word=$1&searchmode=searchfilesanddirs [R,L,NE]
RewriteRule ^/word:(.+)$ http://packages.ubuntu.org.cn/cgi-bin/search_contents.pl?word=$1&searchmode=searchword [R,L,NE]
RewriteRule ^/list:([^/]+)$ http://packages.ubuntu.org.cn/cgi-bin/search_contents.pl?word=$1&searchmode=filelist [R,L,NE]
RewriteCond %{LA-U:SCRIPT_FILENAME} "!-f"
RewriteCond %{LA-U:SCRIPT_FILENAME} "!-d"
RewriteRule ^/([^/]+)$ http://packages.ubuntu.org.cn/cgi-bin/search_packages.pl?searchon=names&version=all&exact=1&keywords=$1 [R,L,NE]
<Directory /share/packages/www/>
Options +MultiViews +FollowSymLinks +Indexes
AddHandler type-map var
AllowOverride AuthConfig FileInfo
AddType application/rss+xml .rdf .xml
</Directory>
</VirtualHost>
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04