Difference between pages "Funtoo:User Services/Containers" and "Install/pt-br/Portage"

From Funtoo
< Funtoo:User Services(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
== Funtoo Linux Hosting ==
=== Introduzindo o Portage ===


If you support Funtoo Linux, we also want to support ''you'' in your Funtoo Linux adventure. Supporters of Funtoo Linux of at least $10/mo can request a Funtoo Linux virtual container. Here are the configurations currently being offered:
Portage, o gerenciador de pacotes do Funtoo Linux possui um comando chamado <code>emerge</code> que é utilizado para construir e instalar pacotes a partir do código fonte. ele também cuida para instalar todas as dependências de pacotes. Você invoca o emerge assim:


* $10/mo : '''3GB''' RAM, '''4''' CPU threads, 50GB disk
<console>
* $15/mo : '''6GB''' RAM, '''8''' CPU threads, 100GB disk
(chroot) # ##i##emerge packagename
* $30/mo : '''12GB''' RAM, '''12''' CPU threads, 200GB disk
</console>
* $45/mo : '''48GB''' RAM, '''24''' CPU threads, 300GB disk


As you can see, this pricing is well below market rates, and includes fast SSD (solid state disk) storage, one IPv4 address, and lots of bandwidth. We believe that by enabling you to do with great things with Funtoo Linux, our community and technology will benefit. So we see this as a win for everyone.
Quando você instala um pacote especificando seu nome na linha de comando, o Portage grava seu nome no arquivo <code>/var/lib/portage/world</code>. Ele faz assim por que ele assume que, desde que você tem instalado o pacote por nome, você quer considerá-lo parte do seu sistema e quer manter o pacote atualizado no futuro. Isso é recurso útil, desde quando pacotes estão sendo adicionados a configuração <code>world</code>, podemos atualizar nosso sistema inteiro ao digitar:


== Container FAQ ==
<console>
(chroot) # ##i##emerge --sync
(chroot) # ##i##emerge -auDN @world
</console>


;Do I get root access?: Yes, you get full root access to your container.
Esse é o modo "oficial" de atualizar o seu sistema Funtoo Linux. Acima, nós atualizamos nossa arvore Portage (Portage tree) utilizando o git para obter a ultima versão dos ebuilds (scripts), e depois executar um comando emerge para atualizar o conjunto de pacotes <code>world</code>. As opções especificadas diz ao <code>emerge</code> para:


;Can I reboot my container?: Yes, reboot normally and it will come back up.
* '''<code>a</code>''' - Nos mostra o que será emergido (emerged), e nos '''perguntará''' se queremos prosseguir.
* '''<code>u</code>''' - ''Atualiza'' os pacotes que especificarmos -- não emerja-os novamente se eles já estão emergidos.
* '''<code>D</code>''' - Considere a arvore de dependência inteira de pacotes quando procurar por atualizações. Em outras palavras, faça uma atualização '''profunda'''.
* '''<code>N</code>''' - Atualizar quaisquer pacotes que tenha alterado ('''novas''') configurações de USO.


;How do I upgrade the kernel in my VPS?: A virtual container shares a kernel with the host, so you do not have the ability to change the kernel from "inside" the container.
Você deve também considerar passar <code>--with-bdeps=y</code> quando emergir @world, ao menos de vez em quando. Isso atualizará as build dependencies também.


;Can I run Docker inside my container?: The OpenVZ development team is the largest code contributor to the Linux Containers kernel code (which is part of Docker,) and we use OpenVZ, but right now it is not possible to run LXC inside an OpenVZ container. This may change with the release of newer OpenVZ kernels based on 3.x.
Of course, sometimes we want to install a package but not add it to the <code>world</code> file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:


;Can I set up my own firewall?: Before you do, please contact me (Daniel) and let me know. I need to flip a few switches in your container to make iptables work properly. Otherwise it will silently fail on stateful firewalls and you may end up locking yourself out of your container.
<console>
(chroot) # ##i##emerge -1 packagename
</console>


== Getting Started ==
Advanced users may be interested in the [[Emerge]] wiki page.


Once you have signed up for Funtoo Monthly support, contact me (drobbins@funtoo.org) and request a virtual container. You'll need to send me two things:
==== Updating World ====


# The hostname you'd like for your container. It will be ''something''.host.funtoo.org.
Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.
# Attach your SSH public key. I will use this to grant you root access to your container.


== Generating SSH Keys ==
<console>
To generate an SSH key pair, do this as the user that you'll be using to log in to your container:
(chroot) # ##i##emerge --sync
(chroot) # ##i##emerge -auDN @world
</console>


$ ssh-keygen -t rsa
{{fancyimportant|1=
 
Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.}}
If you specify a passphrase when prompted, your local private key (~/.ssh/id_rsa) will be encrypted, and ssh will prompt you for this passphrase prior to connecting. If you don't specify a passphrase, then you won't need to enter anything to connect but it you need to be extra careful that you don't allow others to access your private key.
 
The file you will need to send me is ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub. This is the public key... it's safe to send over email since all I or anyone else can use it for is to grant you access to a system using your private key. Just don't send your private key to me.
 
== Policies ==
The VPS is for '''your personal use'''. No reselling.
 
There is currently no Web panel - these servers will be set up using my own automated tool and you will be provided with ssh access. I can periodically reload VPS images as needed.
 
This service is offered as a thank-you gift to Funtoo Linux supporters as long as sufficient capacity is available, with no warranty for uptime or anything else.
 
There are no refunds.
 
While I host several production sites on this infrastructure, you assume all risk for hosting your production services on your VPS.
 
I will make a best-effort-only attempt to provide support via IRC and email, and do not offer 24/7 support for your VPS.
 
'''US-Legal activities only. No spam will be tolerated.'''
 
These VPS systems are intended for funtoo enthusiasts only. I am providing (particularly in the higher-level plans) generous default resource limits with the understanding that the VPS will be used for general Funtoo use and server stuff.
 
Compiling with -j(NUM-CPUS+1) is encouraged (this is Funtoo, after all -- I want you to enjoy fast compiles :), but it's not okay to continually max CPU, IO, or network utilization. '''So, no folding@home, massive file sharing, etc. '''
 
I am currently not supporting IPv6 but will look into adding such support if there is enough interest.
 
'''You are responsible for backups. '''
 
I reserve the right to change plans and pricing in the future.

Revision as of 14:52, February 7, 2015

Introduzindo o Portage

Portage, o gerenciador de pacotes do Funtoo Linux possui um comando chamado emerge que é utilizado para construir e instalar pacotes a partir do código fonte. ele também cuida para instalar todas as dependências de pacotes. Você invoca o emerge assim:

(chroot) # emerge packagename

Quando você instala um pacote especificando seu nome na linha de comando, o Portage grava seu nome no arquivo /var/lib/portage/world. Ele faz assim por que ele assume que, desde que você tem instalado o pacote por nome, você quer considerá-lo parte do seu sistema e quer manter o pacote atualizado no futuro. Isso é recurso útil, desde quando pacotes estão sendo adicionados a configuração world, podemos atualizar nosso sistema inteiro ao digitar:

(chroot) # emerge --sync
(chroot) # emerge -auDN @world

Esse é o modo "oficial" de atualizar o seu sistema Funtoo Linux. Acima, nós atualizamos nossa arvore Portage (Portage tree) utilizando o git para obter a ultima versão dos ebuilds (scripts), e depois executar um comando emerge para atualizar o conjunto de pacotes world. As opções especificadas diz ao emerge para:

  • a - Nos mostra o que será emergido (emerged), e nos perguntará se queremos prosseguir.
  • u - Atualiza os pacotes que especificarmos -- não emerja-os novamente se eles já estão emergidos.
  • D - Considere a arvore de dependência inteira de pacotes quando procurar por atualizações. Em outras palavras, faça uma atualização profunda.
  • N - Atualizar quaisquer pacotes que tenha alterado (novas) configurações de USO.

Você deve também considerar passar --with-bdeps=y quando emergir @world, ao menos de vez em quando. Isso atualizará as build dependencies também.

Of course, sometimes we want to install a package but not add it to the world file. This is often done because you only want the package installed temporarily or because you know the package in question is a dependnecy of another package. If this behavior is desired, you call emerge like this:

(chroot) # emerge -1 packagename

Advanced users may be interested in the Emerge wiki page.

Updating World

Now is actually a very good time to update the entire system and it can be a good idea to do so prior to first boot.

(chroot) # emerge --sync
(chroot) # emerge -auDN @world
   Important

Make sure you read any post emerge messages and follow their instructions. This is especially true if you have upgraded perl or python.