特殊:Badtitle/NS100:AptMoveHowto/simple:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/AptMoveHowto/simple}} {{Languages|UbuntuHelp:AptMoveHowto/simple}} How can I easily transfer all the packages I have downloaded with apt to anothe... |
小无编辑摘要 |
||
第5行: | 第5行: | ||
This How To is a simpler way to transfer downloaded packages from one machine to another. It does not require the recipient to enter GPG keys. It is not reccommended for someone who wants to distribute a cd publicly, for that reason. This is a "quick-and-dirty" way of getting the job done. | This How To is a simpler way to transfer downloaded packages from one machine to another. It does not require the recipient to enter GPG keys. It is not reccommended for someone who wants to distribute a cd publicly, for that reason. This is a "quick-and-dirty" way of getting the job done. | ||
* You can need to install apt-move from the Universe Repository and dpkg-deve packages. | |||
* Then you need to run this command in the terminal | |||
<pre><nowiki> | <pre><nowiki> | ||
sudo mkdir --parents --mode=a+w /mirrors/debian | sudo mkdir --parents --mode=a+w /mirrors/debian | ||
</nowiki></pre> | |||
**** If it comes back saying /mirrors/debian already existed then you need to put this line in the terminal. | |||
<pre><nowiki> | |||
sudo chmod a+w --recursive /mirrors/debian | sudo chmod a+w --recursive /mirrors/debian | ||
</nowiki></pre> | </nowiki></pre> | ||
* Next you need to update apt-move | |||
<pre><nowiki> | <pre><nowiki> | ||
apt-move update | apt-move update | ||
</nowiki></pre> | </nowiki></pre> | ||
Because of ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake the Packages.gz file. | * Because of ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake the | ||
Packages.gz file. | |||
<pre><nowiki> | <pre><nowiki> | ||
cd /mirrors/debian | cd /mirrors/debian | ||
dpkg-scanpackages pool /dev/null | gzip -9 > dists/stable/main/binary-i386/Packages.gz | dpkg-scanpackages pool /dev/null | gzip -9 > dists/stable/main/binary-i386/Packages.gz | ||
</nowiki></pre> | |||
**** Problem: The restricted section (e.g. restricted linux drivers) is also taken into account | |||
<pre><nowiki> | |||
mkdir /mirrors/debian/.disk | mkdir /mirrors/debian/.disk | ||
echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info | echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info | ||
</nowiki></pre> | </nowiki></pre> | ||
Then, using nautilus-cd-burner burn the contents of the /mirrors/debian folder to a disk. Be sure to show hidden files so that you can copy the .disk file. | * Then, using nautilus-cd-burner burn the contents of the /mirrors/debian folder to a disk. Be sure to show hidden files so that you can copy the .disk file. | ||
* Insert that disk into the non-networked computer and add the cdrom as a repository using your favorite package manager. When installing the packages from this cd, you will be asked if you want to install these packages without authentification. For the sake of simplicity, the GPG keys and the release file are not included on this simple packages cd. The packages will still be installed without any problems if you answer yes. | |||
Apt will prefer to use an authenticated source over an unauthenticated one. If you are on dialup and enable the universe repository, it will still try to download the package from the net and not from the local (unsigned) cd. You must disable the universe repository (or any other repository), update and install the package from the custom cd. | * Apt will prefer to use an authenticated source over an unauthenticated one. If you are on dialup and enable the universe repository, it will still try to download the package from the net and not from the local (unsigned) cd. You must disable the universe repository (or any other repository), update and install the package from the custom cd. | ||
Note: Dapper will not copy deb packages from the install cd to the /var/cache/apt/archives directory, so we no longer need to clean it... | Note: Dapper will not copy deb packages from the install cd to the /var/cache/apt/archives directory, so we no longer need to clean it... | ||
---- | ---- | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月22日 (四) 12:02的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/AptMoveHowto/simple }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/af | • {{#if: UbuntuHelp:AptMoveHowto/simple|Afrikaans| [[::AptMoveHowto/simple/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ar | • {{#if: UbuntuHelp:AptMoveHowto/simple|العربية| [[::AptMoveHowto/simple/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/az | • {{#if: UbuntuHelp:AptMoveHowto/simple|azərbaycanca| [[::AptMoveHowto/simple/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/bcc | • {{#if: UbuntuHelp:AptMoveHowto/simple|جهلسری بلوچی| [[::AptMoveHowto/simple/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/bg | • {{#if: UbuntuHelp:AptMoveHowto/simple|български| [[::AptMoveHowto/simple/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/br | • {{#if: UbuntuHelp:AptMoveHowto/simple|brezhoneg| [[::AptMoveHowto/simple/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ca | • {{#if: UbuntuHelp:AptMoveHowto/simple|català| [[::AptMoveHowto/simple/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/cs | • {{#if: UbuntuHelp:AptMoveHowto/simple|čeština| [[::AptMoveHowto/simple/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/de | • {{#if: UbuntuHelp:AptMoveHowto/simple|Deutsch| [[::AptMoveHowto/simple/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/el | • {{#if: UbuntuHelp:AptMoveHowto/simple|Ελληνικά| [[::AptMoveHowto/simple/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/es | • {{#if: UbuntuHelp:AptMoveHowto/simple|español| [[::AptMoveHowto/simple/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/fa | • {{#if: UbuntuHelp:AptMoveHowto/simple|فارسی| [[::AptMoveHowto/simple/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/fi | • {{#if: UbuntuHelp:AptMoveHowto/simple|suomi| [[::AptMoveHowto/simple/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/fr | • {{#if: UbuntuHelp:AptMoveHowto/simple|français| [[::AptMoveHowto/simple/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/gu | • {{#if: UbuntuHelp:AptMoveHowto/simple|ગુજરાતી| [[::AptMoveHowto/simple/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/he | • {{#if: UbuntuHelp:AptMoveHowto/simple|עברית| [[::AptMoveHowto/simple/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/hu | • {{#if: UbuntuHelp:AptMoveHowto/simple|magyar| [[::AptMoveHowto/simple/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/id | • {{#if: UbuntuHelp:AptMoveHowto/simple|Bahasa Indonesia| [[::AptMoveHowto/simple/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/it | • {{#if: UbuntuHelp:AptMoveHowto/simple|italiano| [[::AptMoveHowto/simple/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ja | • {{#if: UbuntuHelp:AptMoveHowto/simple|日本語| [[::AptMoveHowto/simple/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ko | • {{#if: UbuntuHelp:AptMoveHowto/simple|한국어| [[::AptMoveHowto/simple/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ksh | • {{#if: UbuntuHelp:AptMoveHowto/simple|Ripoarisch| [[::AptMoveHowto/simple/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/mr | • {{#if: UbuntuHelp:AptMoveHowto/simple|मराठी| [[::AptMoveHowto/simple/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ms | • {{#if: UbuntuHelp:AptMoveHowto/simple|Bahasa Melayu| [[::AptMoveHowto/simple/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/nl | • {{#if: UbuntuHelp:AptMoveHowto/simple|Nederlands| [[::AptMoveHowto/simple/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/no | • {{#if: UbuntuHelp:AptMoveHowto/simple|norsk| [[::AptMoveHowto/simple/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/oc | • {{#if: UbuntuHelp:AptMoveHowto/simple|occitan| [[::AptMoveHowto/simple/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/pl | • {{#if: UbuntuHelp:AptMoveHowto/simple|polski| [[::AptMoveHowto/simple/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/pt | • {{#if: UbuntuHelp:AptMoveHowto/simple|português| [[::AptMoveHowto/simple/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ro | • {{#if: UbuntuHelp:AptMoveHowto/simple|română| [[::AptMoveHowto/simple/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/ru | • {{#if: UbuntuHelp:AptMoveHowto/simple|русский| [[::AptMoveHowto/simple/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/si | • {{#if: UbuntuHelp:AptMoveHowto/simple|සිංහල| [[::AptMoveHowto/simple/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/sq | • {{#if: UbuntuHelp:AptMoveHowto/simple|shqip| [[::AptMoveHowto/simple/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/sr | • {{#if: UbuntuHelp:AptMoveHowto/simple|српски / srpski| [[::AptMoveHowto/simple/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/sv | • {{#if: UbuntuHelp:AptMoveHowto/simple|svenska| [[::AptMoveHowto/simple/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/th | • {{#if: UbuntuHelp:AptMoveHowto/simple|ไทย| [[::AptMoveHowto/simple/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/tr | • {{#if: UbuntuHelp:AptMoveHowto/simple|Türkçe| [[::AptMoveHowto/simple/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/vi | • {{#if: UbuntuHelp:AptMoveHowto/simple|Tiếng Việt| [[::AptMoveHowto/simple/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/yue | • {{#if: UbuntuHelp:AptMoveHowto/simple|粵語| [[::AptMoveHowto/simple/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/zh | • {{#if: UbuntuHelp:AptMoveHowto/simple|中文| [[::AptMoveHowto/simple/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/zh-hans | • {{#if: UbuntuHelp:AptMoveHowto/simple|中文(简体)| [[::AptMoveHowto/simple/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:AptMoveHowto/simple | UbuntuHelp:AptMoveHowto/simple | {{#if: | :}}AptMoveHowto/simple}}/zh-hant | • {{#if: UbuntuHelp:AptMoveHowto/simple|中文(繁體)| [[::AptMoveHowto/simple/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:AptMoveHowto/simple|:AptMoveHowto/simple|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :AptMoveHowto/simple/zh | | {{#ifexist: AptMoveHowto/simple/zh | | {{#ifeq: {{#titleparts:AptMoveHowto/simple|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:AptMoveHowto/simple|1|-1|}} | zh | | }}
How can I easily transfer all the packages I have downloaded with apt to another box which is not connected to the internet?
This How To is a simpler way to transfer downloaded packages from one machine to another. It does not require the recipient to enter GPG keys. It is not reccommended for someone who wants to distribute a cd publicly, for that reason. This is a "quick-and-dirty" way of getting the job done.
- You can need to install apt-move from the Universe Repository and dpkg-deve packages.
- Then you need to run this command in the terminal
sudo mkdir --parents --mode=a+w /mirrors/debian
- If it comes back saying /mirrors/debian already existed then you need to put this line in the terminal.
sudo chmod a+w --recursive /mirrors/debian
- Next you need to update apt-move
apt-move update
- Because of ubuntu repository structure, not all packages are inserted into the Packages.gz file by apt-move. We must remake the
Packages.gz file.
cd /mirrors/debian dpkg-scanpackages pool /dev/null | gzip -9 > dists/stable/main/binary-i386/Packages.gz
- Problem: The restricted section (e.g. restricted linux drivers) is also taken into account
mkdir /mirrors/debian/.disk echo "Custom packages" $(hostname) $(date +%y%m%d) > /mirrors/debian/.disk/info
- Then, using nautilus-cd-burner burn the contents of the /mirrors/debian folder to a disk. Be sure to show hidden files so that you can copy the .disk file.
- Insert that disk into the non-networked computer and add the cdrom as a repository using your favorite package manager. When installing the packages from this cd, you will be asked if you want to install these packages without authentification. For the sake of simplicity, the GPG keys and the release file are not included on this simple packages cd. The packages will still be installed without any problems if you answer yes.
- Apt will prefer to use an authenticated source over an unauthenticated one. If you are on dialup and enable the universe repository, it will still try to download the package from the net and not from the local (unsigned) cd. You must disable the universe repository (or any other repository), update and install the package from the custom cd.
Note: Dapper will not copy deb packages from the install cd to the /var/cache/apt/archives directory, so we no longer need to clean it...