03. A fizikai nodeok előkészítése

georgio küldte be k, 2008-04-08 14:29 időpontban

node1/node2:

A csomagadatbázis frissítése.
[geshifilter-code]apt-get update[/geshifilter-code]

Telepítsük az OpenSSH-z és a vim-et:
[geshifilter-code]apt-get install ssh openssh-server vim[/geshifilter-code]

node1:
Mivel a Debian telepítő alapból DHCP-ve állítja be a hálózatot, ezért állítsuk most át statikus IP címre. Szerkesszük a [geshifilter-code]/etc/network/interfaces[/geshifilter-code] fájlt és módosítsuk a saját igényeknek megfelelően. A példának megfelelően a következő legyen:
[geshifilter-code]
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
network 172.16.2.0
address 172.16.2.1
gateway 172.16.2.254
broadcast 172.16.2.255
netmask 255.255.255.0
[/geshifilter-code]

Indítsuk újra a hálózatot:
[geshifilter-code]/etc/init.d/networking restart[/geshifilter-code]

Szerkesszük a [geshifilter-code]/etc/hosts[/geshifilter-code] fájlt. Írjük be a szükséges bejehyzéseket.
[geshifilter-code]
127.0.0.1 localhost.localdomain localhost
172.16.2.1 node1.pelda.hu node1
172.16.2.2 node2.pelda.hu node2
172.16.2.10 cluster1.pelda.hu cluster1
172.16.2.101 gep1.pelda.hu gep1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
[/geshifilter-code]

Ellenőrizzük a következő két parancs kimenetét
[geshifilter-code]hostname[/geshifilter-code]
és
[geshifilter-code]hostname -f[/geshifilter-code]
Ennek a teljes hosztnevet kell visszaadnia ([geshifilter-code]node1.pelda.hu[/geshifilter-code]). Ha valami mást ad vissza (pl. csak [geshifilter-code]node1[/geshifilter-code]), akkor a következőt tedd:
[geshifilter-code]echo node1.example.com > /etc/hostname
/etc/init.d/hostname.sh start[/geshifilter-code]
Ezután a [geshifilter-code]hostname[/geshifilter-code] parancsnak már vissza kell adni a teljes hosztnevet.

node2:
Szerkesszük a [geshifilter-code]/etc/network/interfaces[/geshifilter-code] fájlt és módosítsuk a saját igényeknek megfelelően. A példának megfelelően a következő legyen:
[geshifilter-code]
# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
#iface eth0 inet dhcp
auto eth0
iface eth0 inet static
network 172.16.2.0
address 172.16.2.2
gateway 172.16.2.254
broadcast 172.16.2.255
netmask 255.255.255.0
[/geshifilter-code]

Indítsuk újra a hálózatot:
[geshifilter-code]/etc/init.d/networking restart[/geshifilter-code]

Szerkesszük a [geshifilter-code]/etc/hosts[/geshifilter-code] fájlt. Írjük be a szükséges bejehyzéseket.
[geshifilter-code]
127.0.0.1 localhost.localdomain localhost
172.16.2.1 node1.pelda.hu node1
172.16.2.2 node2.pelda.hu node2
172.16.2.10 cluster1.pelda.hu cluster1
172.16.2.101 gep1.pelda.hu gep1

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
[/geshifilter-code]

[geshifilter-code]echo node1.example.com > /etc/hostname
/etc/init.d/hostname.sh start[/geshifilter-code]

node1/node2:
Szerkesszük a [geshifilter-code]/etc/apt/sources.list[/geshifilter-code] fájlt:
[geshifilter-code]
deb ftp://ftp.hu.debian.org/debian/ etch main non-free contrib
deb ftp://ftp.hu.debian.org/debian-security/ etch/updates main contrib non-free
deb http://www.backports.org/debian etch-backports main contrib non-free
[/geshifilter-code]

Frissítsük a csomaglistákat:
[geshifilter-code]apt-get update[/geshifilter-code]

Majd a csomagokat is:
[geshifilter-code]apt-get upgrade[/geshifilter-code]

Végül telepítsük a [geshifilter-code]build-essential[/geshifilter-code] csomagot:
[geshifilter-code]apt-get install build-essential[/geshifilter-code]