如何配置gentoo的源

來源:互聯網
上載者:User

問:我如何修改源。

答:Gentoo中沒有源的概念。portage 與 distfiles 合起來可以跟源的概念等問。
portage裡裝的是ebuild, 可以說是軟體包的資料庫,指導portage從哪裡下載源碼包以及從何外下載。

distfile裡就是源碼包了。一般的源碼包會被放在gentoo伺服器中的distfiles檔案夾中。
其他有些特殊的源碼包(協議或體積大小等關係),要從軟體的官方網站下載,
這可以由ebuild指定。再有些,必須簽定使用者協議的,portage會提示使用者手動到官網下載,
並放置於 /usr/portage/distfiles 中。

portage對應的就是SYNC鏡像,distfiles對應的就是GENTOO_MIRRORS。
可以通過修改 /etc/make.conf 中的 SYNC 和 GENTOO_MIRRORS 變數進行指定。我現在的設定檔:

代碼:

 SYNC="rsync://64.127.121.98/gentoo-portage" GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo/ ftp://ftp.linuxforum.net/gentoo http://mirror.uni-c.dk/pub/gentoo/ http://mirror.gentoo.gr.jp/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO ftp://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO" 

======================================================================

實際上只要把/etc/make.conf檔案寫成如下形式即可(蘭大gentoo源):
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-O2 -march=i686 -pipe"
#CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
#CHOST="i686-pc-linux-gnu"

GENTOO_MIRRORS="ftp://mirror.lzu.edu.cn/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.