|
676.
|
|
|
When vmbuilder creates builds your system, it has to go fetch each one of the packages that composes it over the network to one of the official repositories, which, depending on your internet connection speed and the load of the mirror, can have a big impact on the actual build time. In order to reduce this, it is recommended to either have a local repository (which can be created using <application>apt-mirror</application>) or using a caching proxy such as <application>apt-cache</application>. The later option being much simpler to implement and requiring less disk space, it is the one we will pick in this tutorial. To install it, simply type:
|
|
|
|
Quando o vmbuilder cria o seu sistema, ele precisa obter cada um dos pacotes que o compõe, através da internet e em um dos repositórios oficiais, o que, dependendo da velocidade da sua conexão à internet e a carga do servidor escolhido, pode produzir um grande impacto no tempo real da criação. Para reduzir isto, é recomendado ou utilizar um repositório local (que pode ser criado utilizando <application>apt-mirror</application>) ou utilizar um proxy de cache assim como <application>apt-cache</application>. Esta última opção é bem mais simples de ser implementada e requer menos espaço em disco, e será a utilizada neste tutorial. Para instala-la, digite:
|
|
Translated by
Ursula Junque
|
|
Reviewed by
André Gondim
|
|
|
|
677.
|
|
|
sudo apt-get install apt-proxy
|
|
|
|
sudo apt-get install apt-proxy
|
|
Translated and reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:912(command)
|
|
678.
|
|
|
Once this is complete, your (empty) proxy is ready for use on http://mirroraddress:9999 and will find ubuntu repository under /ubuntu. For vmbuilder to use it, we'll have to use the <emphasis>--mirror</emphasis> option:
|
|
|
|
Uma vez isso completado , seu(a) (vazio) proxy esta pronto para uso em http://mirroraddress:9999 e voce encontrara o repositorio do ubuntu dentro de /ubuntu . Para o vmbuilder poder usa-lo , teremos que usar o <emphasis>--mirror</emphasis> option:
|
|
Translated and reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:915(para)
|
|
679.
|
|
|
--mirror=URL Use Ubuntu mirror at URL instead of the default, which
is http://archive.ubuntu.com/ubuntu for official
arches and http://ports.ubuntu.com/ubuntu-ports
otherwise
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
represents a space character.
Enter a space in the equivalent position in the translation.
|
|
|
|
--mirror=URL Use um repositório do Ubuntu no lugar do padrão, o qual
é http://archive.ubuntu.com/ubuntu para o official
e http://ports.ubuntu.com/ubuntu-ports
para outros
|
|
Translated by
Marcio José Atanásio
|
|
Reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:920(programlisting)
|
|
680.
|
|
|
So we add to the command line:
|
|
|
|
Então, adicione a linha de comando:
|
|
Translated by
Filipe Rosset
|
|
Reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:927(para)
|
|
681.
|
|
|
--mirror http://mirroraddress:9999/ubuntu
|
|
|
|
--mirror http://mirroraddress:9999/ubuntu
|
|
Translated and reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:932(command)
|
|
682.
|
|
|
The mirror address specified here will also be used in the <filename>/etc/apt/source.list</filename> of the newly created guest, so it is usefull to specify here an address that can be resolved by the guest or to plan on reseting this address later on, such as in a <emphasis>--firstboot</emphasis> script.
|
|
|
|
O endereco especificado aqui sera usado no <filename>/etc/apt/source.list</filename> do mais novo convidado criado , entao sera util especificar aqui um endereco que pode ser resolvido pelo convidado ou para planejar resetar esse endereco depois ,assim como no <emphasis>--firstboot</emphasis> script.
|
|
Translated and reviewed by
André Gondim
|
|
|
|
683.
|
|
|
Install a Local Mirror
|
|
|
|
Instale um repositório local
|
|
Translated and reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:945(title)
|
|
684.
|
|
|
If we are in a larger environment, it may make sense to setup a local mirror of the Ubuntu repositories. The package apt-mirror provides you with a script that will handle the mirroring for you. You should plan on having about 20 gigabyte of free space per supported release and architecture.
|
|
|
|
Se estivermos em ambiente maior , pode fazer sentido criar um espelho local dos repositorios do Ubuntu . O pacote apt-mirror lhe fornece um script que se encarregara' do espelhamento para voce . Voce deve planejar em ter cerca de 20 gigabytes de espaco livre para cada versao e arquitetura suportada .
|
|
Translated and reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:947(para)
|
|
685.
|
|
|
By default, <application>apt-mirror</application> uses the configuration file in <filename>/etc/apt/mirror.list</filename>. As it is set up, it will replicate only the architecture of the local machine. If you would like to support other architectures on your mirror, simply duplicate the lines starting with “deb”, replacing the deb keyword by /deb-{arch} where arch can be i386, amd64, etc... For example, on an amd64 machine, to have the i386 archives as well, you will have:
|
|
|
|
Por padrão , <application>apt-mirror</application> usa a configuracao no arquivo <filename>/etc/apt/mirror.list</filename>. Quando instalado , irá replicar apenas na arquitetura da maquina local. Se você quiser suporte para outras arquiteturas em seu espelho, apenas duplique as linhas que começam com " deb" substituindo a palavra chave deb por /deb --{arch} onde arch pode ser i386 , amd64, etc ... Por exemplo , em uma maquina amd64 , para ter o i386 arquivos também , você terá :
|
|
Translated and reviewed by
André Gondim
|
|
|
|
Located in
serverguide/C/virtualization.xml:953(para)
|