Procitao sam handbook i shvatio da sve to ustvari i nije tako tesko. Sve sto tamo pise ja sam vec radio tako da ce ovo biti lagano instaliranje (naravno zapisao sam redosled na papiru kad sta ide...). Sad sam porucio moj gentoo i trebalo bi da stigne u najskorije vreme, zar ne? Nadam se da nece biti problema, koliko su me ljudi naplasili da je instalacija teska bio sam bas u tripu da ja to ne mogu ali nije toliko tesko, mada morm da priznam da bez uputstva 8O .
Configuring your Network
Before you get that "Hey, we've had that already"-feeling, you should remember that the networking you set up in the beginning of the gentoo installation was just for the installation. Right now you are going to configure networking for your Gentoo system permanently.
All networking information is gathered in /etc/conf.d/net. It uses a straightforward yet not intuitive syntax if you don't know how to set up networking manually. But don't fear, we'll explain everything
First open /etc/conf.d/net with your favorite editor (nano is used in this example):
Code Listing 12: Opening /etc/conf.d/net for editing
# nano -w /etc/conf.d/net
The first variable you'll find is iface_eth0. It uses the following syntax:
Code Listing 13: iface_eth0 syntaxis
iface_eth0="<your ip address> broadcast <your broadcast address> netmask <your netmask>"
If you use DHCP (automatic IP retrieval), you should just set iface_eth0 to dhcp. If you use rp-pppoe (e.g. for ADSL), set it to up. If you need to set up your network manually and you're not familiar with all the above terms, please read the section on Understanding Network Terminology if you haven't done so already.
So let us give three examples; the first one uses DHCP, the second one a static IP (192.168.0.2) with netmask 255.255.255.0, broadcast 192.168.0.255 and gateway 192.168.0.1 while the third one just activates the interface for rp-pppoe usage:
Code Listing 14: Examples for /etc/conf.d/net
(For DHCP)
iface_eth0="dhcp"
# Some network admins require that you use the
# hostname and domainname provided by the DHCP server.
# In that case, add the following to let dhcpcd use them.
# That will override your own hostname and domainname definitions.
dhcpcd_eth0="-HD"
# If you intend on using NTP to keep your machine clock synchronized, use
# the -N option to prevent dhcpcd from overwriting your /etc/ntp.conf file
dhcpcd_eth0="-N"
(For static IP)
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
gateway="eth0/192.168.0.1"
(For rp-pppoe)
iface_eth0="up"
If you have several network interfaces, create extra iface_eth variables, like iface_eth1, iface_eth2 etc. The gateway variable shouldn't be reproduced as you can only set one gateway per computer.
Now save the configuration and exit to continue.
Automatically Start Networking at Boot
To have your network interfaces activated at boot, you need to add them to the default runlevel. If you have PCMCIA interfaces you should skip this action as the PCMCIA interfaces are started by the PCMCIA init script.
Code Listing 15: Adding net.eth0 to the default runlevel
# rc-update add net.eth0 default
If you have several network interfaces, you need to create the appropriate net.eth1, net.eth2 etc. initscripts for those. You can use ln to do this:
Code Listing 16: Creating extra initscripts
# cd /etc/init.d
# ln -s net.eth0 net.eth1
# rc-update add net.eth1 default
Writing Down Network Information
You now need to inform Linux about your network. This is defined in /etc/hosts and helps in resolving hostnames to IP addresses for hosts that aren't resolved by your nameserver. For instance, if your internal network consists of three PCs called jenny (192.168.0.5), benny (192.168.0.6) and tux (192.168.0.7 - this system) you would open /etc/hosts and fill in the values:
Code Listing 17: Opening /etc/hosts
# nano -w /etc/hosts
Code Listing 18: Filling in the networking information
127.0.0.1 localhost
192.168.0.5 jenny.homenetwork jenny
192.168.0.6 benny.homenetwork benny
192.168.0.7 tux.homenetwork tux
If your system is the only system (or the nameservers handle all name resolution) a single line is sufficient. For instance, if you want to call your system tux.homenetwork:
Code Listing 19: /etc/hosts for lonely or fully integrated PCs
127.0.0.1 tux.homenetwork tux localhost
Save and exit the editor to continue.
Ja nemam mreznu karticu i interesuje me da li je dovoljno da u /etc/hosts upisem
Kako mi je najlakse da updateujem kde kad instaliram gentoo pod slovom da imam kde na disku (ne preko interneta) zajedno sa dodacima (kde addons, kdeedu, kdemultimedia...). Problem je sto nisam citao handbook do kraja, onaj deo posle objasnjavanja emerge komande sam preskocio :oops: verovatno bi mi se "samo kazalo" da sam procitao