成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

如何創建和使用本地UbuntuSource鏡像服務器?

運維 系統運維
本文介紹了創建和使用本地UbuntuSource鏡像服務器的方法,從需求開始,也詳細介紹了筆者選擇sohu的UbuntuSource服務器作為復制的source的原因,希望能夠對讀者有素幫助。

創建和使用本地UbuntuSource鏡像服務器可能還有很多用戶并不知道方法,下文就給出了詳細的描述,具體內容如下所述。

什么需要創建Ubuntu本地鏡像

Ubuntu發行版光盤中都只有少數常用軟件包。Ubuntu上要安裝的軟件,常常需要到Ubuntu源服務器上下載。

使用如下命令可以搜索和安裝可用的軟件包。

 

  1. apt-cachesearchpackageName  
  2.  
  3. sudoapt-getinstallpackageName 

 

apt-get實際使用wget命令,從/etc/apt/sources.list配置文件指定的源上下載對應的.deb軟件包,然后使用dpkg-ipackageName.deb安裝軟件。

如果Ubuntu電腦所在的環境網絡性能較差,或者不能連接互聯網,那么就很難安裝UbuntuSource服務器上的海量軟件包。

此時,你可以在局域網內創建自己的UbuntuSource服務器,從而節省大量網絡流量,并且可以大大提高安裝軟件的速度!

本文將介紹如何創建UbuntuSource的本地鏡像。

創建Ubuntu本地鏡像

需求

為了創建Ubuntumirror服務器,你需要至少60G硬盤剩余空間。Ubuntu每一個版本分為32bit和64bit兩個版本,有兩組deb包。***的ubuntu版本兩組deb包需要大約90GB的空間。

你可以創建Ubuntu一個版本的32或者64bit服務器,也可以創建同時服務于32和64bit的服務器。也可以創建服務于所有ubuntu版本的source服務器。根據你的硬盤剩余空間和你的需要而定。

使用sohu的UbuntuSource服務器作為源服務器

Sohu公司提供了多種Linux和BSD操作系統發行版的source服務器。點擊下面鏈接

http://mirrors.sohu.com/

可以看到sohu公司提供的所有種類的source服務器。

點擊http://mirrors.sohu.com/help/Ubuntu.html頁面可以看到UbuntuSource服務器的使用幫助。

你可以直接修改/etc/apt/sources.list文件,添加上sohu的source服務器,從而使用sohu的source服務器,這比使用國外的Ubuntu官方source服務器速度要快很多。

我接下來,要根據sohu的UbuntuSource服務器,構建本地的UbuntuSource服務器。

我選擇sohu的UbuntuSource服務器作為復制的source的原因:

1,sohu的UbuntuSource服務器速度相當快。如果我使用ubuntu官方的source服務器作為復制的源,顯然會花費更多的時間。

2,sohu的UbuntuSource服務器每天都會和ubuntu官方source服務器同步一次。因此可以保證我www.linuxidc.com能夠使用***版本的deb包。

我構建的UbuntuSource服務器也會每天和sohu的UbuntuSource服務器同步一次。

使用apt-mirror創建UbuntuSource服務器的本地鏡像服務器

 

  1. Sudoapt-getinstallapt-mirror  
  2.  
  3. sudoapt-getinstallapache2 

 

我們需要上面這兩個軟件來構建我們的本地UbuntuSource服務器。

我現在以構建Ubuntu10.10和ubuntu10.04的32和64位版本的本地ubuntsource服務器為例進行介紹。

如果你需要服務于其他版本,請修改對應的配置。

/etc/apt/mirror.list配置文件修改為如下:

 

  1. #############config###################  
  2.  
  3. #setbase_path/var/spool/apt-mirror  
  4.  
  5. #  
  6.  
  7. #setmirror_path$base_path/mirror  
  8.  
  9. #setskel_path$base_path/skel  
  10.  
  11. #setvar_path$base_path/var  
  12.  
  13. #setcleanscript$var_path/clean.sh  
  14.  
  15. #setdefaultarch  
  16.  
  17. #setpostmirror_script$var_path/postmirror.sh  
  18.  
  19. #setrun_postmirror0  
  20.  
  21. setnthreads20  
  22.  
  23. set_tilde0  
  24.  
  25. ##############endconfig##############  
  26.  
  27. debhttp://mirrors.sohu.com/Ubuntulucidmainmain/debian-installerrestrictedrestricted/debian-installeruniversemultiverse  
  28.  
  29. debhttp://mirrors.sohu.com/Ubuntumaverickmainmain/debian-installerrestrictedrestricted/debian-installeruniversemultiverse  
  30.  
  31. debhttp://mirrors.sohu.com/Ubuntulucid-securitymainrestricteduniversemultiverse  
  32.  
  33. debhttp://mirrors.sohu.com/Ubuntumaverick-securitymainrestricteduniversemultiverse  
  34.  
  35. debhttp://mirrors.sohu.com/Ubuntulucid-updatesmainrestricteduniversemultiverse  
  36.  
  37. debhttp://mirrors.sohu.com/Ubuntumaverick-updatesmainrestricteduniversemultiverse  
  38.  
  39. #debhttp://archive.Ubuntu.com/ubuntumaverick-proposedmainrestricteduniversemultiverse  
  40.  
  41. #debhttp://archive.Ubuntu.com/ubuntumaverick-backportsmainrestricteduniversemultiverse  
  42.  
  43. deb-srchttp://mirrors.sohu.com/Ubuntulucidmainrestricteduniversemultiverse  
  44.  
  45. deb-srchttp://mirrors.sohu.com/Ubuntumaverickmainrestricteduniversemultiverse  
  46.  
  47. deb-srchttp://mirrors.sohu.com/Ubuntulucid-securitymainrestricteduniversemultiverse  
  48.  
  49. deb-srchttp://mirrors.sohu.com/Ubuntumaverick-securitymainrestricteduniversemultiverse  
  50.  
  51. deb-srchttp://mirrors.sohu.com/Ubuntulucid-updatesmainrestricteduniversemultiverse  
  52.  
  53. deb-srchttp://mirrors.sohu.com/Ubuntumaverick-updatesmainrestricteduniversemultiverse  
  54.  
  55. #deb-srchttp://archive.Ubuntu.com/ubuntumaverick-proposedmainrestricteduniversemultiverse  
  56.  
  57. #deb-srchttp://archive.Ubuntu.com/ubuntumaverick-backportsmainrestricteduniversemultiverse  
  58.  
  59. deb-i386http://mirrors.sohu.com/Ubuntulucidmainmain/debian-installerrestrictedrestricted/debian-installeruniversemultiverse  
  60.  
  61. deb-i386http://mirrors.sohu.com/Ubuntumaverickmainmain/debian-installerrestrictedrestricted/debian-installeruniversemultiverse  
  62.  
  63. deb-i386http://mirrors.sohu.com/Ubuntulucid-securitymainrestricteduniversemultiverse  
  64.  
  65. deb-i386http://mirrors.sohu.com/Ubuntumaverick-securitymainrestricteduniversemultiverse  
  66.  
  67. deb-i386http://mirrors.sohu.com/Ubuntulucid-updatesmainrestricteduniversemultiverse  
  68.  
  69. deb-i386http://mirrors.sohu.com/Ubuntumaverick-updatesmainrestricteduniversemultiverse  
  70.  
  71. #debhttp://archive.Ubuntu.com/ubuntumaverick-proposedmainrestricteduniversemultiverse  
  72.  
  73. #debhttp://archive.Ubuntu.com/ubuntumaverick-backportsmainrestricteduniversemultiverse  
  74.  
  75. #deb-srchttp://mirrors.sohu.com/Ubuntulucidmainrestricteduniversemultiverse  
  76.  
  77. #deb-srchttp://mirrors.sohu.com/Ubuntumaverickmainrestricteduniversemultiverse 

 

說明:

maverick和lucid分別是Ubuntu10.10和10.04的代號。

debhttp://*表示下載64位版本的deb軟件。

deb-i386http://*表示下載32位版本的deb軟件。

然后執行:sudoapt-mirror

這會啟動20個線程【上面文件中配置】運行wget到http://mirrors.sohu.com/Ubuntu下面下載相應的deb包。

sudoapt-mirror執行完成后,/var/spool/apt-mirror目錄下就有了所有需要的deb包和相應的配置文件。

因為我現在是從sohu下載的,所以實際的文件在:/var/spool/apt-mirror/mirror/mirrors.sohu.com/Ubuntu目錄下。

如果你選擇其他UbuntuSource服務區,那么會下載到其他對應的目錄下。

總結:

希望本文介紹的創建和使用本地UbuntuSource鏡像服務器的方法能夠對讀者有所幫助,更多有關linux系統的知識還有待于讀者去探索和學習。

【編輯推薦】

  1. Ubuntu10.04下如何移植QtE?
  2. 如何在Ubuntu下訪問局域網服務器?
  3. 如何在Ubuntu下安裝媒體中心XBMC?
  4. 在Ubuntu下如何編譯***個內核模塊? 
  5. Ubuntu10.10下MySQL5.1如何進行集群配置? 
責任編輯:韓亞珊 來源: 雨林木風
相關推薦

2012-12-03 14:21:02

服務器群集

2010-09-29 15:00:04

DHCP服務器

2010-08-31 17:33:24

DHCP服務器

2010-08-03 15:31:42

Ubuntu NFS服

2018-01-22 09:04:06

鏡像服務器作用

2022-12-13 10:45:12

無服務器架構物聯網工具

2022-03-11 06:47:30

MSSQL數據庫MySQL

2010-03-16 13:47:48

Java多線程服務器

2014-03-06 09:23:19

Git服務器Github

2012-05-09 10:30:29

RHEL5.7DHCP服務器

2012-05-09 10:33:56

RHEL5.7DNS服務器

2011-03-23 15:13:08

Nagios監控oracle

2020-03-16 09:10:41

bindDNS服務器系統運維

2010-07-05 11:14:32

2010-08-05 13:23:05

NFS協議

2010-08-03 15:53:07

CentOSNFS服務器

2009-09-24 16:25:16

打印服務器

2010-05-18 14:34:41

IIS服務器

2011-08-16 17:19:59

linux加密分區

2010-08-04 11:04:48

UbuntuNFS服務器
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 涩涩操| 99成人在线视频 | 二区视频| 免费在线观看一区二区三区 | 日韩在线观看网站 | 成人在线观看黄 | 在线看一区二区三区 | 精品99久久久久久 | 成人一区二区三区 | 91大片| 亚洲一区二区三区在线播放 | 观看av| 欧美一级片在线观看 | 视频三区| 欧美黄色一区 | 九色在线观看 | 网页av| 在线观看成人av | 成人av一区二区三区 | 五月激情综合 | 欧美日韩一区二区三区不卡视频 | 国产区在线视频 | 日本精品视频一区二区三区四区 | 成人在线视频一区 | 国产精品久久久久久久久久久久久 | 欧美一级特黄aaa大片在线观看 | 中文在线观看视频 | 欧美另类视频在线 | 日韩视频区 | 免费视频一区二区三区在线观看 | 欧美精品v国产精品v日韩精品 | 波多野吉衣久久 | 一区 | 中文字幕在线一 | 亚洲精彩免费视频 | 欧美一级免费看 | 国产精品久久精品 | 精品久草| 久久精品久久久久久 | 天天操天天插天天干 | 少妇久久久 |