Difference between pages "Template:Subarch" and "Install/pt-br/Network"

(Difference between pages)
 
(Configurando sua rede)
 
Line 1: Line 1:
<includeonly>{{#widget:AddThis}}{{#if:{{{title|}}}|
+
=== Configurando sua rede ===
{{DISPLAYTITLE:Download - {{{title}}}}}
+
|
+
{{DISPLAYTITLE:Download - {{{subarch}}}}}
+
}}'''This page lists CPU-optimized builds of Funtoo Linux for {{#if:{{{title|}}}|{{{title}}} ({{{subarch}}} subarch)|{{{subarch}}}}} [[{{{CPU Family}}}]].'''
+
  
{{{Description|}}}
+
É importante assegurar-se de que você será capaz de se conectar a sua rede de área local (local-area network) depois que você reinicializar no Funtoo Linux. Há três acessos que você pode utilizar para a configuração da sua rede: NetworkManager, dhcpcd, e os scripts [[Funtoo Linux Networking]]. Aqui está como escolher qual utilizar baseado no tipo de rede você queira cofigurar.
{{#seo:
+
 
|title={{#if:{{{title|}}}|Download - {{{title}}}|Download - {{{subarch}}}}}
+
==== Wi-Fi ====
|keywords=funtoo,linux,build,subarch,{{{subarch}}},{{{title}}}
+
===== Utilizando o NetworkManager =====
|description=his page describes a CPU-optimized build of Funtoo Linux for {{#if:{{{title|}}}|{{{title}}} ({{{subarch}}} subarch)|{{{subarch}}}}} [[{{{CPU Family}}}]].  
+
Para sistemas laptop/mobile onde você estará utilizando Wi-Fi e conectando-se em várias redes, NetworkManager é fortemente recomendado. A versão do NetworkManager do Funtoo é totalmente funcional mesmo a partir da linda de comando, então você pode utiulizá-la mesmo sim o X ou sim a o Network Manager applet. Aqui estão os passos envolvidos em configurar o NetworkManager:
}}
+
 
{{#set:CPU Family={{{CPU Family|}}}|subarch={{{subarch|}}}|CHOST={{{CHOST|}}}|CFLAGS={{{CFLAGS|}}}|USE={{{USE|}}}|CPU Features={{{CPU Features|}}}|Description={{{Description|}}}|title={{{title|}}}}}
+
<console>
=== Optimizations ===
+
(chroot) # ##i##emerge linux-firmware
__NOTOC__
+
(chroot) # ##i##emerge networkmanager
{{TableStart}}
+
(chroot) # ##i##rc-update add NetworkManager default
<tr><td>CHOST</td><td><code>{{{CHOST|}}}</code></td></tr>
+
</console>
<tr><td>CFLAGS</td><td><code>{{{CFLAGS|}}}</code></td></tr>
+
 
<tr><td>USE</td><td>{{#if:{{{USE|}}}|<code>{{{USE}}}</code>|(none)}}</td></tr>
+
Above, we installed linux-firmware which contains a complete collection of available firmware for many hardware devices including Wi-Fi adapters, plus NetworkManager to manage our network connection. Then we added NetworkManager to the <code>default</code> runlevel so it will start when Funtoo Linux boots.
{{TableEnd}}{{#vardefine:subarch|{{{subarch|}}}}}{{#get_web_data:url=http://build.funtoo.org/index.xml|format=xml|use xpath|data=builds=/subarches/subarch[@name='{{{subarch|}}}']/@builds}}{{#vardefine:builds|{{#external_value:builds}}}}
+
 
=== Download ===
+
After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:
{{#if:{{#var:builds}}|This section lists the Funtoo Linux builds currently available for download for '''{{{subarch}}}'''.  A full list of Funtoo Linux builds can be found on the [[Subarches]] page.
+
 
{{table|1=
+
{{Note|The following command will not work as long as you are in chroot environment. The reason for this is that addwifi will need dbus and rfkill to be set up. So don't forget to reboot!}}
<tr><th class="active">Build</th><th class="active">Variant</th><th class="active">Latest Build</th><th class="active">Download</th><th class="active">Browse Mirror</th></tr>{{#arraymaptemplate:{{#var:builds}}|DisplayBuilds|,|}}}}|No downloadable stage builds are currently available for this sub-architecture.}}
+
 
[[Category:Subarches]]
+
<console>
__NOEDITSECTION__
+
# ##i##addwifi -S wpa -K 'wifipassword' mywifinetwork
=== Detailed Description ===
+
</console>
</includeonly>
+
 
 +
The <code>addwifi</code> command is used to configure and connect to a WPA/WPA2 Wi-Fi network named <code>mywifinetwork</code> with the password <code>wifipassword</code>. This network configuration entry is stored in <code>/etc/NetworkManager/system-connections</code> so that it will be remembered in the future. You should only need to enter this command once for each Wi-Fi network you connect to.
 +
 
 +
===== Using wpa_supplicant =====
 +
If for some reason you don't want to use a tool such as NetworkManager or <code>wicd</code>, you can use wpa_supplicant for wireless network connections.
 +
 
 +
First, emerge wpa_supplicant:
 +
 
 +
<console>
 +
(chroot) ###i## emerge -a wpa_supplicant
 +
</console>
 +
 
 +
Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant/wpa_supplicant.conf.
 +
The syntax is very easy:
 +
<pre>
 +
network={
 +
ssid="MyWifiName"
 +
psk="lol42-wifi"
 +
}
 +
 
 +
network={
 +
ssid="Other Network"
 +
psk="6d96270004515a0486bb7f76196a72b40c55a47f"
 +
}
 +
</pre>
 +
 
 +
You will need to add both <code>wpa_supplicant</code> and <code>dhcpcd</code> to the default runlevel. <code>wpa_supplicant</code> will connect to your access point, and <code>dhcpcd</code> will acquire an IP address via DHCP:
 +
 
 +
<console>
 +
(chroot) # ##i##rc-update add dhcpcd default
 +
(chroot) # ##i##rc-update add wpa_supplicant default
 +
</console>
 +
 
 +
==== Desktop (Wired Ethernet) ====
 +
 
 +
For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add <code>dhcpcd</code> to the default runlevel:
 +
 
 +
<console>
 +
(chroot) # ##i##rc-update add dhcpcd default
 +
</console>
 +
 
 +
When you reboot, <code>dhcpcd</code> will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.
 +
 
 +
==== Server (Static IP) ====
 +
 
 +
For servers, the [[Funtoo Linux Networking]] scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See [[Funtoo Linux Networking]] for information on how to use Funtoo Linux's template-based network configuration system.

Revision as of 15:50, March 2, 2015

Configurando sua rede

É importante assegurar-se de que você será capaz de se conectar a sua rede de área local (local-area network) depois que você reinicializar no Funtoo Linux. Há três acessos que você pode utilizar para a configuração da sua rede: NetworkManager, dhcpcd, e os scripts Funtoo Linux Networking. Aqui está como escolher qual utilizar baseado no tipo de rede você queira cofigurar.

Wi-Fi

Utilizando o NetworkManager

Para sistemas laptop/mobile onde você estará utilizando Wi-Fi e conectando-se em várias redes, NetworkManager é fortemente recomendado. A versão do NetworkManager do Funtoo é totalmente funcional mesmo a partir da linda de comando, então você pode utiulizá-la mesmo sim o X ou sim a o Network Manager applet. Aqui estão os passos envolvidos em configurar o NetworkManager:

(chroot) # emerge linux-firmware
(chroot) # emerge networkmanager
(chroot) # rc-update add NetworkManager default

Above, we installed linux-firmware which contains a complete collection of available firmware for many hardware devices including Wi-Fi adapters, plus NetworkManager to manage our network connection. Then we added NetworkManager to the default runlevel so it will start when Funtoo Linux boots.

After you reboot into Funtoo Linux, you will be able to add a Wi-Fi connection this way:

Note

The following command will not work as long as you are in chroot environment. The reason for this is that addwifi will need dbus and rfkill to be set up. So don't forget to reboot!

# addwifi -S wpa -K 'wifipassword' mywifinetwork

The addwifi command is used to configure and connect to a WPA/WPA2 Wi-Fi network named mywifinetwork with the password wifipassword. This network configuration entry is stored in /etc/NetworkManager/system-connections so that it will be remembered in the future. You should only need to enter this command once for each Wi-Fi network you connect to.

Using wpa_supplicant

If for some reason you don't want to use a tool such as NetworkManager or wicd, you can use wpa_supplicant for wireless network connections.

First, emerge wpa_supplicant:

(chroot) # emerge -a wpa_supplicant

Now, edit the wpa_supplicant configuration file, located at /etc/wpa_supplicant/wpa_supplicant.conf. The syntax is very easy:

network={
ssid="MyWifiName"
psk="lol42-wifi"
}

network={
ssid="Other Network"
psk="6d96270004515a0486bb7f76196a72b40c55a47f"
}

You will need to add both wpa_supplicant and dhcpcd to the default runlevel. wpa_supplicant will connect to your access point, and dhcpcd will acquire an IP address via DHCP:

(chroot) # rc-update add dhcpcd default
(chroot) # rc-update add wpa_supplicant default

Desktop (Wired Ethernet)

For a home desktop or workstation with wired Ethernet that will use DHCP, the simplest and most effective option to enable network connectivity is to simply add dhcpcd to the default runlevel:

(chroot) # rc-update add dhcpcd default

When you reboot, dhcpcd will run in the background and manage all network interfaces and use DHCP to acquire network addresses from a DHCP server.

Server (Static IP)

For servers, the Funtoo Linux Networking scripts are recommended. They are optimized for static configurations and things like virtual ethernet bridging for virtualization setups. See Funtoo Linux Networking for information on how to use Funtoo Linux's template-based network configuration system.