Ubuntu 本地存储库服务器:
我的 UBUNTU repo 服务器上挂载了一个 NFS 文件。我将其用作/mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo/
镜像
# df -h /mnt
Filesystem Size Used Avail Use% Mounted on
172.20.42.133:/vol/ums_repository/qt1 3.0T 2.4T 620G 80% /mnt
在这个文件上我创建了一个文件夹来存储 UBUNTU 镜像仓库。
root@FR6-U-V-1115-229:/mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo/mirror/archive.ubuntu.com/ubuntu# du -sh *
145M dists
76G pool
4.0K ubuntu
root@FR6-U-V-1115-229:/mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo/mirror/archive.ubuntu.com/ubuntu#
root@FR6-U-V-1115-229:~# cat /etc/apt/mirror.list|grep -v "#"
set base_path /mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo
set nthreads 20
set _tilde 0
deb http://archive.ubuntu.com/ubuntu trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
clean http://archive.ubuntu.com/ubuntu
参考了这篇文章http://www.tecmint.com/setup-local-repositories-in-ubuntu/
root@FR6-U-V-1115-229:/# apt-get update
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security/main Sources
Hit http://security.ubuntu.com trusty-security/restricted Sources
Hit http://security.ubuntu.com trusty-security/universe Sources
Ign http://us.archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/multiverse Sources
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty-updates InRelease
Hit http://us.archive.ubuntu.com trusty-backports InRelease
Hit http://us.archive.ubuntu.com trusty Release.gpg
Hit http://us.archive.ubuntu.com trusty-updates/main Sources
Hit http://us.archive.ubuntu.com trusty-updates/restricted Sources
Get:1 http://security.ubuntu.com trusty-security/universe amd64 Packages [151 kB]
Hit http://us.archive.ubuntu.com trusty-updates/universe Sources
Hit http://us.archive.ubuntu.com trusty-updates/multiverse Sources
Get:2 http://security.ubuntu.com trusty-security/multiverse amd64 Packages [3,526 B]
Get:3 http://security.ubuntu.com trusty-security/main i386 Packages [420 kB]
Get:4 http://security.ubuntu.com trusty-security/restricted i386 Packages [19.2 kB]
Get:5 http://security.ubuntu.com trusty-security/universe i386 Packages [151 kB]
Hit http://us.archive.ubuntu.com trusty-backports/main Sources
Hit http://us.archive.ubuntu.com trusty-backports/restricted Sources
Hit http://us.archive.ubuntu.com trusty-backports/universe Sources
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Sources
Hit http://us.archive.ubuntu.com trusty-backports/main amd64 Packages
Get:6 http://security.ubuntu.com trusty-security/multiverse i386 Packages [3,690 B]
Get:7 http://security.ubuntu.com trusty-security/main Translation-en [231 kB]
Get:8 http://security.ubuntu.com trusty-security/multiverse Translation-en [1,498 B]
Get:9 http://security.ubuntu.com trusty-security/restricted Translation-en [2,620 B]
Get:10 http://security.ubuntu.com trusty-security/universe Translation-en [81.8 kB]
Hit http://us.archive.ubuntu.com trusty-backports/restricted amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/restricted i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/universe i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/multiverse i386 Packages
Hit http://us.archive.ubuntu.com trusty-backports/main Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/multiverse Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/restricted Translation-en
Hit http://us.archive.ubuntu.com trusty-backports/universe Translation-en
Hit http://us.archive.ubuntu.com trusty Release
Hit http://us.archive.ubuntu.com trusty/main Sources
Hit http://us.archive.ubuntu.com trusty/restricted Sources
Hit http://us.archive.ubuntu.com trusty/universe Sources
Hit http://us.archive.ubuntu.com trusty/multiverse Sources
Hit http://us.archive.ubuntu.com trusty/main amd64 Packages
Hit http://us.archive.ubuntu.com trusty/restricted amd64 Packages
Get:11 http://us.archive.ubuntu.com trusty/universe amd64 Packages [5,859 kB]
Get:12 http://us.archive.ubuntu.com trusty/multiverse amd64 Packages [132 kB]
Get:13 http://us.archive.ubuntu.com trusty/main i386 Packages [1,348 kB]
Get:14 http://us.archive.ubuntu.com trusty/restricted i386 Packages [13.4 kB]
Get:15 http://us.archive.ubuntu.com trusty/universe i386 Packages [5,866 kB]
Get:16 http://us.archive.ubuntu.com trusty/multiverse i386 Packages [134 kB]
Get:17 http://us.archive.ubuntu.com trusty/main Translation-en [762 kB]
Get:18 http://us.archive.ubuntu.com trusty/multiverse Translation-en [102 kB]
Get:19 http://us.archive.ubuntu.com trusty/restricted Translation-en [3,457 B]
Get:20 http://us.archive.ubuntu.com trusty/universe Translation-en [4,089 kB]
Get:21 http://us.archive.ubuntu.com trusty-updates/main amd64 Packages [793 kB]
Get:22 http://us.archive.ubuntu.com trusty-updates/restricted amd64 Packages [22.7 kB]
Get:23 http://us.archive.ubuntu.com trusty-updates/universe amd64 Packages [421 kB]
Get:24 http://us.archive.ubuntu.com trusty-updates/multiverse amd64 Packages [12.9 kB]
Get:25 http://us.archive.ubuntu.com trusty-updates/main i386 Packages [769 kB]
Get:26 http://us.archive.ubuntu.com trusty-updates/restricted i386 Packages [22.4 kB]
Get:27 http://us.archive.ubuntu.com trusty-updates/universe i386 Packages [422 kB]
Get:28 http://us.archive.ubuntu.com trusty-updates/multiverse i386 Packages [13.1 kB]
Get:29 http://us.archive.ubuntu.com trusty-updates/main Translation-en [375 kB]
Get:30 http://us.archive.ubuntu.com trusty-updates/multiverse Translation-en [6,294 B]
Get:31 http://us.archive.ubuntu.com trusty-updates/restricted Translation-en [3,053 B]
Get:32 http://us.archive.ubuntu.com trusty-updates/universe Translation-en [216 kB]
Ign http://us.archive.ubuntu.com trusty/main Translation-en_US
Ign http://us.archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://us.archive.ubuntu.com trusty/universe Translation-en_US
Fetched 18.7 MB in 1min 31s (205 kB/s)
Reading package lists... Done
root@FR6-U-V-1115-229:/#
apt-mirror completed successfully
root@FR6-U-V-1115-229:~# apt-mirror
Downloading 76 index files using 20 threads...
Begin time: Tue Oct 20 04:33:23 2015
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Tue Oct 20 04:33:29 2015
Processing tranlation indexes: [TT]
Downloading 189 translation files using 20 threads...
Begin time: Tue Oct 20 04:33:29 2015
[20]... [19]... [18]... [17]... [16]... [15]... [14]... [13]... [12]... [11]... [10]... [9]... [8]... [7]... [6]... [5]... [4]... [3]... [2]... [1]... [0]...
End time: Tue Oct 20 04:33:30 2015
Processing indexes: [PP]
94.0 MiB will be downloaded into archive.
Downloading 5 archive files using 5 threads...
Begin time: Tue Oct 20 04:34:36 2015
[5]... [4]... [3]... [2]... [1]... [0]...
End time: Tue Oct 20 04:37:02 2015
1.1 MiB in 80 files and 0 directories can be freed.
Run /mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo/var/clean.sh for this purpose.
Running the Post Mirror script ...
(/mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo/var/postmirror.sh)
/bin/sh: 0: Can't open /mnt/orange-proftpd/Catalog/OS/UBUNTU/Ubuntu_Repo/var/postmirror.sh
Post Mirror script has completed. See above output for any possible errors.
root@FR6-U-V-1115-229:~#
我proftpd
也在这个服务器上进行了配置
在 Ubuntu 桌面客户端上:
#:~# cat /etc/apt/sources.list|grep -v "#"
deb http://10.1.235.229/ubuntu trusty main restricted universe multiverse
deb http://10.1.235.229/ubuntu trusty-security main restricted universe multiverse
deb ftp://10.1.235.229/ubuntu trusty main restricted universe multiverse
deb ftp://10.1.235.229/ubuntu trusty-security main restricted universe multiverse
root@FR6-U-V-1115-227:~# apt-get install open-vm-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package open-vm-tools is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'open-vm-tools' has no installation candidate
root@FR6-U-V-1115-227:~#<
我无法在客户端下载任何软件包。请针对此问题提出建议。