2、安裝映象軟體 並修改映象引數檔案
sudo apt-get install apt-mirror
sudo vim /etc/apt/mirror.list
############# config ##################這是我的source.list內容#set base_path /data/apt-mirror
## 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
# set postmirror_script $var_path/postmirror.sh
# set run_postmirror 0
set nthreads 20
set _tilde 0
############## end config ##############
#映象 64位2進製包 (個人用足以)
deb trusty main restricted universe multiverse
deb trusty-security main restricted universe multiverse
deb trusty-updates main restricted universe multiverse
deb trusty-proposed main restricted universe multiverse
deb trusty-backports main restricted universe multiverse
# 映象64位原始碼(企業)
deb-src trusty main restricted universe multiverse
deb-src trusty-security main restricted universe multiverse
deb-src trusty-updates main restricted universe multiverse
deb-src trusty-proposed main restricted universe multiverse
deb-src trusty-backports main restricted universe multiverse
#映象 32位2進製包 (企業)
deb-i386 trusty main restricted universe multiverse
deb-i386 trusty-security main restricted universe multiverse
deb-i386 trusty-updates main restricted universe multiverse
deb-i386 trusty-proposed main restricted universe multiverse
deb-i386 trusty-backports main restricted universe multiverse
# 映象32位原始碼 (我常常出現儲物)
deb-i386-src trusty main restricted universe multiverse
deb-i386-src trusty-security main restricted universe multiverse
deb-i386-src trusty-updates main restricted universe multiverse
deb-i386-src trusty-proposed main restricted universe multiverse
deb-i386-src trusty-backports main restricted universe multivers
clean
set base_path /data/apt-mirror——》
設定映象放在哪個目錄
set nthreads 20 ——》
3、建立映象根目錄
mkidr
/data/apt-mirror
4、開始映象(支援斷點續傳,任何中斷都不會照成影響)
sudo apt-mirror
定時執行上面的命令,可以達到定時同步遠端倉庫的效果
4、使用本地源cd /etc/apt
sudo mv source.list source.list.bak
sudo vim source.list
加入如下內容
5、發布到區域網
建立乙個軟鏈結
區域網中每個ubuntu使用者都可以執行以下命令
cd /etc/apt
sudo mv source.list source.list.bak
sudo vim source.list
加入如下內容
deb trusty main restricted universe multiversedeb trusty-security main restricted universe multiverse
deb trusty-updates main restricted universe multiverse
deb trusty-proposed main restricted universe multiverse
deb trusty-backports main restricted universe multiverse
Ubuntu映象源和pypi映象源
ubuntu映象源 映象源的位置在系統中的 ubuntu zhangl vim etc apt sources.list ubuntu系統 注意系統版本 原映象內容如下 com ubuntu trusty main國內163的映象源內容如下 deb wily main restricted univ...
ubuntu更改映象源
修改apt源 vim etc apt sources.list然後修改為下面的內容,金山雲 deb xenial main restricted deb xenial updates main restricted deb xenial universe deb xenial updates uni...
ubuntu映象源切換
換源準備 換源之前明確使用平台,x86架構 arm架構的源,ubuntu18.04和unbuntu16.04等源均不同,切忌病急亂投醫,看到乙個源複製過來新增後沒用。分析一條源 debubuntu bionic updates main restricted universe multiverse ...