SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
How To Create An Ubuntu Repository Mirror on ...           http://ubuntu-tutorials.com/2008/06/10/how-to-cr...



         How To Create An Ubuntu Repository Mirror on
         Ubuntu 8.04
         June 10th, 2008 Christer Edwards Leave a comment Go to comments


          If you're new here, you may want to subscribe to my RSS feed. Thanks for
          visiting!


         I was discussing the creation and maintenance of an Ubuntu repository mirror
         in IRC today and realized that I haven’t blogged about how to do that. Its funny
         sometimes how topics pop up, and something I’ve been using for months never
         made it onto the blog. In any event, below I’ll outline how to create your own
         Ubuntu repository mirror–great for consolidating and saving bandwidth for
         multiple machines!

         Creating the Mirror

         To create an Ubuntu repository mirror we’ll use the apt-mirror tool. This can be
         installed by issuing the following command or clicking the link:

              sudo aptitude install apt-mirror


         Once this package is installed you’ll need to configure a few items:

           1. Where will your mirror be stored?
           2. How aggressive will you be about downloading?
           3. What do you want to mirror?

         To edit these values you’ll want to edit the /etc/apt/mirror.list file. I’ve displayed
         mine below, and broken it down into the three main sections.

         Where Will Your Mirror Be Stored?

         I’ve configured my apt-mirror to be stored on an external USB drive. This is
         defined via the line:

              set base_path      /media/gurudisk/UBUNTU/MIRROR


         This overrides the default value, which stores the data in /var/spool/apt.

         How Aggressive Will You Be About Downloading?

         This title may be a bit misleading but this is the way I think about it.
         Technically its the number of download threads you want to use. The higher the
         number, the more threads, the faster its done. This will depend on your

1 de 6                                                                                      21-06-2011 14:51
How To Create An Ubuntu Repository Mirror on ...           http://ubuntu-tutorials.com/2008/06/10/how-to-cr...

         number, the more threads, the faster its done. This will depend on your
         bandwidth connection though. On my home DSL I can’t put this number any
         higher than 2. In faster locations you’ll be able to put the number much higher.
         Your milage may vary.

              set nthreads    2


         What Do You Want To Mirror?

         Now, the most important part, is what do you actually want to mirror? The
         syntax for this section is pretty simple. It looks just like a normal sources.list
         entry, but for each address you want to mirror. Here is an example of my entry
         for Ubuntu 8.04, i386:

              # Ubuntu 8.04 "Hardy" i386
              deb-i386 http://archive.ubuntu.com/ubuntu hardy main restricted universe
              multiverse
              deb-i386 http://archive.ubuntu.com/ubuntu hardy-updates main restricted
              universe multiverse
              deb-i386 http://archive.ubuntu.com/ubuntu hardy-backports main restricted
              universe multiverse
              deb-i386 http://archive.ubuntu.com/ubuntu hardy-security main restricted
              universe multiverse
              deb-i386 http://archive.ubuntu.com/ubuntu hardy-proposed main restricted
              universe multiverse

         If you want amd64 bit mirrored you might add entries like this:

              # Ubuntu 8.04 "Hardy" amd64
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy main restricted universe
              multiverse
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy-updates main restricted
              universe multiverse
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy-backports main restricted
              universe multiverse
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy-security main restricted
              universe multiverse
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy-proposed main restricted
              universe multiverse

         Notice that I’m mirroring main, restricted, universe and multiverse plus the
         security, proposed, backports and updates sections. This gives me a complete
         mirror of everything that would normally be available. If you don’t want/need
         proposed or backports, etc you can simply remove those lines.

         If you want to be able to use your mirror to support network based installations
         you’ll also need to add the following (depending on your architecture):

2 de 6                                                                                      21-06-2011 14:51
How To Create An Ubuntu Repository Mirror on ...           http://ubuntu-tutorials.com/2008/06/10/how-to-cr...


         you’ll also need to add the following (depending on your architecture):

              deb-amd64 http://archive.ubuntu.com/ubuntu hardy main main/debian-installer
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy restricted restricted/debian-
              installer
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy universe universe/debian-
              installer
              deb-amd64 http://archive.ubuntu.com/ubuntu hardy multiverse multiverse/debian-
              installer

         or

              deb-i386 http://archive.ubuntu.com/ubuntu hardy main main/debian-installer
              deb-i386 http://archive.ubuntu.com/ubuntu hardy restricted restricted/debian-
              installer
              deb-i386 http://archive.ubuntu.com/ubuntu hardy universe universe/debian-
              installer
              deb-i386 http://archive.ubuntu.com/ubuntu hardy multiverse multiverse/debian-
              installer

         Basically just add the sources.list entry to this file for anything you want to
         mirror. I also mirror Medibuntu and a few PPA locations. It sure makes for
         faster installation when I am able to use the LAN as compared to the public
         tubes.

         To keep your mirror updated activate the cron entry in /etc/cron.d/apt-mirror.
         By default it will try to update your mirror at 4:00am, and it is disabled. To
         activate it simply uncomment the line and change the 4 to the preferred hour of
         your choice. Enjoy!

         Update: My mirror, including main, restricted, universe, multiverse, -proposed,
         -backports, -security, Medibuntu and the network installation sections takes up
         37G. I do mirror i386 and amd64, so if you just need one architecture you could
         half-that.

         Categories: Ubuntu Tags: apt-mirror, mirror, repository

         Related Posts

              Automatically Find Fastest Repository Server in Ubuntu 8.04
              Apt-Cacher and Apt-Mirror : Revisited
              Five Tips to Prepare for Release Day!
              Adding Additional Repositories
              How to add extra repositories : Ubuntu (5.10 / 6.06.1 / 6.10)

         Comments (12) Leave a comment


3 de 6                                                                                      21-06-2011 14:51
How To Create An Ubuntu Repository Mirror on ...      http://ubuntu-tutorials.com/2008/06/10/how-to-cr...



          1. Ian Barton
             June 21st, 2008 at 03:14 | #1
             Reply | Quote

             Nice tutorial. However, note that the default ubuntu config file is /etc/apt
             /mirror.list, so you should run the update:

             apt-mirror -c /etc/apt/mirror.list

             The config file name in the original article was wrongly specified as
             apt-mirror.

             Ian.

          2. Ian Barton
             June 23rd, 2008 at 01:54 | #2
             Reply | Quote

             Whoops… made a mistake myself:) The correct command is:

             apt-mirror /etc/apt/mirror.list

             Ian.

          3. Nicco
             June 23rd, 2008 at 08:24 | #3
             Reply | Quote

             So after creating the repository mirror how does one access it from the
             client computers?

             -Thank You

          4. Christer Edwards
             June 23rd, 2008 at 19:56 | #4
             Reply | Quote

             @Nicco – simply update the clients to point to something like:

             deb http://ip.address.of.mirror/ubuntu hardy main restricted, etc..

             It’ll require that the mirror machine has some web server installed
             (apache, lightty, etc). Otherwise its the same format as normal, just using
             your local IP vs the public address.

          5. Nicco
             June 24th, 2008 at 11:32 | #5

4 de 6                                                                                 21-06-2011 14:51
How To Create An Ubuntu Repository Mirror on ...        http://ubuntu-tutorials.com/2008/06/10/how-to-cr...

             June 24th, 2008 at 11:32 | #5
             Reply | Quote

             Thank You!

          6. DP
             June 30th, 2008 at 17:25 | #6
             Reply | Quote

             Hi Christer,

             I’m a little unclear about the syntax in the mirror.list file.

             Is it necessary to list the d-i packages as:

             deb-i386 http://archive.ubuntu.com/ubuntu hardy main main/debian-
             installer

             ?

             Can the debian-installer branches be listed as:

             deb-i386 http://archive.ubuntu.com/ubuntu hardy main/debian-installer

             Or just incorporated into the first set?

             Also, I’ve found that mirroring the d-i packages under updates and security
             breaks my network install: ie. placing:

             deb http://archive.ubuntu.com/ubuntu hardy-security main/debian-installer

             Resulted in a broken install. I had to clean and and purge the mirror. Any
             idea why this is the case?

             Thanks for the tutorial.

             -DP

          7. Johnnie
             August 21st, 2008 at 18:52 | #7
             Reply | Quote

             I am doing your steps into Hardy Heron but I can´t do than it works. I give
             me an error from ../bin/apt-mirror

             I am not sure what can be but is difficult to me find the solve.

             Thxs


5 de 6                                                                                   21-06-2011 14:51
How To Create An Ubuntu Repository Mirror on ...      http://ubuntu-tutorials.com/2008/06/10/how-to-cr...



          8. Bart
             October 31st, 2008 at 14:29 | #8
             Reply | Quote

             I found a “low-tech” solution for when setting a local mirror is too much for
             a few computers:
             http://nxadm.wordpress.com/2008/10/31/home-network-low-tech-trick-
             for-a-very-fast-ubuntu-release-upgrade/

             (BTW: I set up your solution at work and I am the hero       )

          9. Clinton
             February 11th, 2009 at 18:20 | #9
             Reply | Quote

             I have configured a machine with the mirror but do I need to update the
             mirror list and remove the http entries and simply just add the ip address
             of the server that mirrors all the updates?

         10. Zzypty Zzyp
             March 12th, 2009 at 03:59 | #10
             Reply | Quote

             Hi!

             If the amount of memory allotted on a particular server is small (less than
             the 37GB or 18gB you mentioned), what are the directories that can be
             excluded without causing too much of a flutter?

         11. adrianherr
             June 12th, 2009 at 09:45 | #11
             Reply | Quote

             Hi,

             I am new to the forum. Please can you help me with a apt-mirror issue.

             I have three repository's but I no longer need one of them. How do I
             remove it without re-downloading the once I want?

             Regards.




6 de 6                                                                                 21-06-2011 14:51

Contenu connexe

Tendances

Lpi 101 study_guide
Lpi 101 study_guideLpi 101 study_guide
Lpi 101 study_guide
ousman1
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
Beni Krisbiantoro
 
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrhTransparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Hichem Chehida
 

Tendances (19)

pfSense Installation Slide
pfSense Installation SlidepfSense Installation Slide
pfSense Installation Slide
 
Presentation1
Presentation1Presentation1
Presentation1
 
Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
How to install Open Atrium over LAMP stack
How to install Open Atrium over LAMP stackHow to install Open Atrium over LAMP stack
How to install Open Atrium over LAMP stack
 
PHP selber bauen
PHP selber bauenPHP selber bauen
PHP selber bauen
 
Planning for the Horizontal: Scaling Node.js Applications
Planning for the Horizontal: Scaling Node.js ApplicationsPlanning for the Horizontal: Scaling Node.js Applications
Planning for the Horizontal: Scaling Node.js Applications
 
Lpi 101 study_guide
Lpi 101 study_guideLpi 101 study_guide
Lpi 101 study_guide
 
Install odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debianInstall odoo v8 the easiest way on ubuntu debian
Install odoo v8 the easiest way on ubuntu debian
 
Ubuntu server guide
Ubuntu server guideUbuntu server guide
Ubuntu server guide
 
RPM: Speed up your deploy
RPM: Speed up your deployRPM: Speed up your deploy
RPM: Speed up your deploy
 
MySql Restore Script
MySql Restore ScriptMySql Restore Script
MySql Restore Script
 
20110701 zsc2011-opensuse
20110701 zsc2011-opensuse20110701 zsc2011-opensuse
20110701 zsc2011-opensuse
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
 
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrhTransparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
Transparent firewall filtering bridge - pf sense 2.0.2 by william tarrh
 
Cent os 5 ssh
Cent os 5 sshCent os 5 ssh
Cent os 5 ssh
 
Buildstrapping Aloofix
Buildstrapping AloofixBuildstrapping Aloofix
Buildstrapping Aloofix
 
How to compile a kernel suse 2
How to compile a kernel   suse 2How to compile a kernel   suse 2
How to compile a kernel suse 2
 
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone Star PHP 2013 - Sysadmin Skills for PHP DevelopersLone Star PHP 2013 - Sysadmin Skills for PHP Developers
Lone Star PHP 2013 - Sysadmin Skills for PHP Developers
 
install CentOS 6.3 minimal on Hyper-V
install CentOS 6.3 minimal on Hyper-Vinstall CentOS 6.3 minimal on Hyper-V
install CentOS 6.3 minimal on Hyper-V
 

Similaire à Como criar um repositório Ubuntu

How to Install ArchLinux to a USB Flashdrive in 2012
How to Install ArchLinux to a USB Flashdrive in 2012How to Install ArchLinux to a USB Flashdrive in 2012
How to Install ArchLinux to a USB Flashdrive in 2012
Chukwuma Onyeije, MD, FACOG
 
Howtoinstallarchlinuxtousb final-120610172253-phpapp01
Howtoinstallarchlinuxtousb final-120610172253-phpapp01Howtoinstallarchlinuxtousb final-120610172253-phpapp01
Howtoinstallarchlinuxtousb final-120610172253-phpapp01
decenttr
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
Joshua Thijssen
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linux
techlug
 

Similaire à Como criar um repositório Ubuntu (20)

Xen time machine
Xen time machineXen time machine
Xen time machine
 
How to Install ArchLinux to a USB Flashdrive in 2012
How to Install ArchLinux to a USB Flashdrive in 2012How to Install ArchLinux to a USB Flashdrive in 2012
How to Install ArchLinux to a USB Flashdrive in 2012
 
TinyOS installation Guide And Manual
TinyOS installation Guide And ManualTinyOS installation Guide And Manual
TinyOS installation Guide And Manual
 
Howtoinstallarchlinuxtousb final-120610172253-phpapp01
Howtoinstallarchlinuxtousb final-120610172253-phpapp01Howtoinstallarchlinuxtousb final-120610172253-phpapp01
Howtoinstallarchlinuxtousb final-120610172253-phpapp01
 
Respositórios do Ubuntu, santo apt-get e outras coisas
Respositórios do Ubuntu, santo apt-get e outras coisasRespositórios do Ubuntu, santo apt-get e outras coisas
Respositórios do Ubuntu, santo apt-get e outras coisas
 
Kernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using BuildrootKernel Recipes 2013 - Easy rootfs using Buildroot
Kernel Recipes 2013 - Easy rootfs using Buildroot
 
OpenWRT and Perl
OpenWRT and PerlOpenWRT and Perl
OpenWRT and Perl
 
How to compile a kernel suse 1
How to compile a kernel   suse 1How to compile a kernel   suse 1
How to compile a kernel suse 1
 
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios CoreNrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
Nrpe - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core
 
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
NRPE - Nagios Remote Plugin Executor. NRPE plugin for Nagios Core 4 and others.
 
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceCrafting GNU/Linux distributions for Embedded target from Scratch/Source
Crafting GNU/Linux distributions for Embedded target from Scratch/Source
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
 
BeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream ComponentsBeagleBone Black: Platform Bring-Up with Upstream Components
BeagleBone Black: Platform Bring-Up with Upstream Components
 
Building For Mer
Building For MerBuilding For Mer
Building For Mer
 
snortinstallguide
snortinstallguidesnortinstallguide
snortinstallguide
 
Getting Started with Buildroot - Lab
Getting Started with Buildroot - LabGetting Started with Buildroot - Lab
Getting Started with Buildroot - Lab
 
MongoSV 2011
MongoSV 2011MongoSV 2011
MongoSV 2011
 
Intro To Linux
Intro To LinuxIntro To Linux
Intro To Linux
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
 

Plus de Carlos Eduardo

Criando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCriando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ Nagios
Carlos Eduardo
 
Iptables bridging and firewalling
Iptables bridging and firewallingIptables bridging and firewalling
Iptables bridging and firewalling
Carlos Eduardo
 
Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003
Carlos Eduardo
 
Configuração dns memorial descritivo
Configuração dns   memorial descritivoConfiguração dns   memorial descritivo
Configuração dns memorial descritivo
Carlos Eduardo
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wiki
Carlos Eduardo
 
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Carlos Eduardo
 
Migrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseMigrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail database
Carlos Eduardo
 
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Carlos Eduardo
 
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36   privilege escalation exploitExploit access root to kernel 2.6.32 2.6.36   privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Carlos Eduardo
 
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
How to root phones or tablets running android 2.3 gingerbread    jailbreak an...How to root phones or tablets running android 2.3 gingerbread    jailbreak an...
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
Carlos Eduardo
 
Compartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCompartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupo
Carlos Eduardo
 
Converting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxConverting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual box
Carlos Eduardo
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
Carlos Eduardo
 
Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machine
Carlos Eduardo
 
Instalando e configurando o serviço snmpd no red hat 5.3 cent_os
Instalando e configurando o serviço snmpd no red hat 5.3   cent_osInstalando e configurando o serviço snmpd no red hat 5.3   cent_os
Instalando e configurando o serviço snmpd no red hat 5.3 cent_os
Carlos Eduardo
 

Plus de Carlos Eduardo (20)

Criando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ NagiosCriando plugin para o Nagios em Shell Script _ Nagios
Criando plugin para o Nagios em Shell Script _ Nagios
 
Iptables bridging and firewalling
Iptables bridging and firewallingIptables bridging and firewalling
Iptables bridging and firewalling
 
Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003Alterar nome do_domínio–rendom_win-2008_e_2003
Alterar nome do_domínio–rendom_win-2008_e_2003
 
Configuração dns memorial descritivo
Configuração dns   memorial descritivoConfiguração dns   memorial descritivo
Configuração dns memorial descritivo
 
Additional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wikiAdditional resources repositories_rpm_forge - centos wiki
Additional resources repositories_rpm_forge - centos wiki
 
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...Postfix amavisd   connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
Postfix amavisd connect to 127.0.0.1[127.0.0.1]-10024_ connection refused _...
 
Migrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail databaseMigrate linux user password to postfix vmail database
Migrate linux user password to postfix vmail database
 
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
Samsung r440 com wireless broadcom bcm4313 no ubuntu 11.10
 
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36   privilege escalation exploitExploit access root to kernel 2.6.32 2.6.36   privilege escalation exploit
Exploit access root to kernel 2.6.32 2.6.36 privilege escalation exploit
 
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
How to root phones or tablets running android 2.3 gingerbread    jailbreak an...How to root phones or tablets running android 2.3 gingerbread    jailbreak an...
How to root phones or tablets running android 2.3 gingerbread jailbreak an...
 
Compartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupoCompartilhamento no samba com permissão de grupo
Compartilhamento no samba com permissão de grupo
 
Canivete shell
Canivete shellCanivete shell
Canivete shell
 
Lsof
LsofLsof
Lsof
 
Converting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual boxConverting parallels or vm ware to virtual box
Converting parallels or vm ware to virtual box
 
Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6Startup guide for kvm on cent os 6
Startup guide for kvm on cent os 6
 
Alterar memória kvm virtual machine
Alterar memória kvm virtual machineAlterar memória kvm virtual machine
Alterar memória kvm virtual machine
 
Comando kvm terminal
Comando kvm terminalComando kvm terminal
Comando kvm terminal
 
Instalação geo ip
Instalação geo ipInstalação geo ip
Instalação geo ip
 
Otimizando seu Squid
Otimizando seu SquidOtimizando seu Squid
Otimizando seu Squid
 
Instalando e configurando o serviço snmpd no red hat 5.3 cent_os
Instalando e configurando o serviço snmpd no red hat 5.3   cent_osInstalando e configurando o serviço snmpd no red hat 5.3   cent_os
Instalando e configurando o serviço snmpd no red hat 5.3 cent_os
 

Dernier

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Dernier (20)

Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Como criar um repositório Ubuntu

  • 1. How To Create An Ubuntu Repository Mirror on ... http://ubuntu-tutorials.com/2008/06/10/how-to-cr... How To Create An Ubuntu Repository Mirror on Ubuntu 8.04 June 10th, 2008 Christer Edwards Leave a comment Go to comments If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting! I was discussing the creation and maintenance of an Ubuntu repository mirror in IRC today and realized that I haven’t blogged about how to do that. Its funny sometimes how topics pop up, and something I’ve been using for months never made it onto the blog. In any event, below I’ll outline how to create your own Ubuntu repository mirror–great for consolidating and saving bandwidth for multiple machines! Creating the Mirror To create an Ubuntu repository mirror we’ll use the apt-mirror tool. This can be installed by issuing the following command or clicking the link: sudo aptitude install apt-mirror Once this package is installed you’ll need to configure a few items: 1. Where will your mirror be stored? 2. How aggressive will you be about downloading? 3. What do you want to mirror? To edit these values you’ll want to edit the /etc/apt/mirror.list file. I’ve displayed mine below, and broken it down into the three main sections. Where Will Your Mirror Be Stored? I’ve configured my apt-mirror to be stored on an external USB drive. This is defined via the line: set base_path /media/gurudisk/UBUNTU/MIRROR This overrides the default value, which stores the data in /var/spool/apt. How Aggressive Will You Be About Downloading? This title may be a bit misleading but this is the way I think about it. Technically its the number of download threads you want to use. The higher the number, the more threads, the faster its done. This will depend on your 1 de 6 21-06-2011 14:51
  • 2. How To Create An Ubuntu Repository Mirror on ... http://ubuntu-tutorials.com/2008/06/10/how-to-cr... number, the more threads, the faster its done. This will depend on your bandwidth connection though. On my home DSL I can’t put this number any higher than 2. In faster locations you’ll be able to put the number much higher. Your milage may vary. set nthreads 2 What Do You Want To Mirror? Now, the most important part, is what do you actually want to mirror? The syntax for this section is pretty simple. It looks just like a normal sources.list entry, but for each address you want to mirror. Here is an example of my entry for Ubuntu 8.04, i386: # Ubuntu 8.04 "Hardy" i386 deb-i386 http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse deb-i386 http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse If you want amd64 bit mirrored you might add entries like this: # Ubuntu 8.04 "Hardy" amd64 deb-amd64 http://archive.ubuntu.com/ubuntu hardy main restricted universe multiverse deb-amd64 http://archive.ubuntu.com/ubuntu hardy-updates main restricted universe multiverse deb-amd64 http://archive.ubuntu.com/ubuntu hardy-backports main restricted universe multiverse deb-amd64 http://archive.ubuntu.com/ubuntu hardy-security main restricted universe multiverse deb-amd64 http://archive.ubuntu.com/ubuntu hardy-proposed main restricted universe multiverse Notice that I’m mirroring main, restricted, universe and multiverse plus the security, proposed, backports and updates sections. This gives me a complete mirror of everything that would normally be available. If you don’t want/need proposed or backports, etc you can simply remove those lines. If you want to be able to use your mirror to support network based installations you’ll also need to add the following (depending on your architecture): 2 de 6 21-06-2011 14:51
  • 3. How To Create An Ubuntu Repository Mirror on ... http://ubuntu-tutorials.com/2008/06/10/how-to-cr... you’ll also need to add the following (depending on your architecture): deb-amd64 http://archive.ubuntu.com/ubuntu hardy main main/debian-installer deb-amd64 http://archive.ubuntu.com/ubuntu hardy restricted restricted/debian- installer deb-amd64 http://archive.ubuntu.com/ubuntu hardy universe universe/debian- installer deb-amd64 http://archive.ubuntu.com/ubuntu hardy multiverse multiverse/debian- installer or deb-i386 http://archive.ubuntu.com/ubuntu hardy main main/debian-installer deb-i386 http://archive.ubuntu.com/ubuntu hardy restricted restricted/debian- installer deb-i386 http://archive.ubuntu.com/ubuntu hardy universe universe/debian- installer deb-i386 http://archive.ubuntu.com/ubuntu hardy multiverse multiverse/debian- installer Basically just add the sources.list entry to this file for anything you want to mirror. I also mirror Medibuntu and a few PPA locations. It sure makes for faster installation when I am able to use the LAN as compared to the public tubes. To keep your mirror updated activate the cron entry in /etc/cron.d/apt-mirror. By default it will try to update your mirror at 4:00am, and it is disabled. To activate it simply uncomment the line and change the 4 to the preferred hour of your choice. Enjoy! Update: My mirror, including main, restricted, universe, multiverse, -proposed, -backports, -security, Medibuntu and the network installation sections takes up 37G. I do mirror i386 and amd64, so if you just need one architecture you could half-that. Categories: Ubuntu Tags: apt-mirror, mirror, repository Related Posts Automatically Find Fastest Repository Server in Ubuntu 8.04 Apt-Cacher and Apt-Mirror : Revisited Five Tips to Prepare for Release Day! Adding Additional Repositories How to add extra repositories : Ubuntu (5.10 / 6.06.1 / 6.10) Comments (12) Leave a comment 3 de 6 21-06-2011 14:51
  • 4. How To Create An Ubuntu Repository Mirror on ... http://ubuntu-tutorials.com/2008/06/10/how-to-cr... 1. Ian Barton June 21st, 2008 at 03:14 | #1 Reply | Quote Nice tutorial. However, note that the default ubuntu config file is /etc/apt /mirror.list, so you should run the update: apt-mirror -c /etc/apt/mirror.list The config file name in the original article was wrongly specified as apt-mirror. Ian. 2. Ian Barton June 23rd, 2008 at 01:54 | #2 Reply | Quote Whoops… made a mistake myself:) The correct command is: apt-mirror /etc/apt/mirror.list Ian. 3. Nicco June 23rd, 2008 at 08:24 | #3 Reply | Quote So after creating the repository mirror how does one access it from the client computers? -Thank You 4. Christer Edwards June 23rd, 2008 at 19:56 | #4 Reply | Quote @Nicco – simply update the clients to point to something like: deb http://ip.address.of.mirror/ubuntu hardy main restricted, etc.. It’ll require that the mirror machine has some web server installed (apache, lightty, etc). Otherwise its the same format as normal, just using your local IP vs the public address. 5. Nicco June 24th, 2008 at 11:32 | #5 4 de 6 21-06-2011 14:51
  • 5. How To Create An Ubuntu Repository Mirror on ... http://ubuntu-tutorials.com/2008/06/10/how-to-cr... June 24th, 2008 at 11:32 | #5 Reply | Quote Thank You! 6. DP June 30th, 2008 at 17:25 | #6 Reply | Quote Hi Christer, I’m a little unclear about the syntax in the mirror.list file. Is it necessary to list the d-i packages as: deb-i386 http://archive.ubuntu.com/ubuntu hardy main main/debian- installer ? Can the debian-installer branches be listed as: deb-i386 http://archive.ubuntu.com/ubuntu hardy main/debian-installer Or just incorporated into the first set? Also, I’ve found that mirroring the d-i packages under updates and security breaks my network install: ie. placing: deb http://archive.ubuntu.com/ubuntu hardy-security main/debian-installer Resulted in a broken install. I had to clean and and purge the mirror. Any idea why this is the case? Thanks for the tutorial. -DP 7. Johnnie August 21st, 2008 at 18:52 | #7 Reply | Quote I am doing your steps into Hardy Heron but I can´t do than it works. I give me an error from ../bin/apt-mirror I am not sure what can be but is difficult to me find the solve. Thxs 5 de 6 21-06-2011 14:51
  • 6. How To Create An Ubuntu Repository Mirror on ... http://ubuntu-tutorials.com/2008/06/10/how-to-cr... 8. Bart October 31st, 2008 at 14:29 | #8 Reply | Quote I found a “low-tech” solution for when setting a local mirror is too much for a few computers: http://nxadm.wordpress.com/2008/10/31/home-network-low-tech-trick- for-a-very-fast-ubuntu-release-upgrade/ (BTW: I set up your solution at work and I am the hero ) 9. Clinton February 11th, 2009 at 18:20 | #9 Reply | Quote I have configured a machine with the mirror but do I need to update the mirror list and remove the http entries and simply just add the ip address of the server that mirrors all the updates? 10. Zzypty Zzyp March 12th, 2009 at 03:59 | #10 Reply | Quote Hi! If the amount of memory allotted on a particular server is small (less than the 37GB or 18gB you mentioned), what are the directories that can be excluded without causing too much of a flutter? 11. adrianherr June 12th, 2009 at 09:45 | #11 Reply | Quote Hi, I am new to the forum. Please can you help me with a apt-mirror issue. I have three repository's but I no longer need one of them. How do I remove it without re-downloading the once I want? Regards. 6 de 6 21-06-2011 14:51