dhcpd için bir DNS kurmadım. Siz bu yöntemi büyük bir ağa uygulamak içn DNS kullanmak isterseniz sizin bileceğiniz birşey. Benim 2 makinalık bir ağ için DNS'ye ihtiyacım yoktu.
Ağ yapılandırması:
~> cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
IPADDR=10.10.10.1
NETMASK=255.255.255.0
NETWORK=10.10.10.0
BROADCAST=10.10.10.255
ONBOOT=yes
BOOTPROTO=static
~> cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=nilgun.buguner.home
~> cat /etc/sysconfig/static-routes
eth0 net 10.10.10.0 netmask 255.255.255.0 gw 10.10.10.254
~> cat /etc/sysconfig/hosts
127.0.0.1 localhost localdomain
10.10.10.1 nilgun.buguner.home
10.10.10.100 belma.buguner.home
~> cat /etc/hosts.allow
# Bu dosyada yerel ag hizmetlerinden hangi makinalarin
# faydalanabilecegi belirtilir.
#
ALL: .buguner.home
ALL: 127
Makina isminin .home içermesi sizi şaşırtmasın, yerel ağlar için isim sınırlaması yoktur. :-). Bakalım makinada dhcpd namına ne kuruluymuş:
~> rpm -qa | grep dhcp
dhcp-3.0pl2-6.16
dhcp-devel-3.0pl2-6.16
dhcpd yapılandırma dosyası
/etc/dhcpd.conf[53]:
~> cat /etc/dhcpd.conf
allow booting;
allow bootp;
ddns-update-style none;
# Standart yapilandirma yonergeleri...
option domain-name "buguner.home";
max-lease-time 120;
default-lease-time 120;
subnet 10.10.10.0 netmask 255.255.255.0 {
}
group {
server-name "nilgun.buguner.home";
get-lease-hostnames true;
use-host-decl-names on;
# istemci makina bilgileri; makinanin ismi: belma
host belma {
# bu adres, istemci makinadaki ag kartinin ethernet adresi
hardware ethernet 00:80:ad:77:72:7c;
# sabit bir adres veriyoruz. Kimden bahsettigimizi bilelim.
fixed-address 10.10.10.100;
}
}
Şimdi dhcpd'yi başlatalım ve bakalım çalışıyor mu?
~> /sbin/service dhcpd start
dhcpd başlatılıyor: [ TAMAM ]
~> netstat -Nlp | grep dhcp
udp 0 0 0.0.0.0:bootps 0.0.0.0:* 1181/dhcpd
raw 0 0 0.0.0.0:icmp 0.0.0.0:* 7 1181/dhcpd
Çalışıyormuş :-). Çalışma seviyenizde başlatılan hizmetlere dhcpd'yi eklemeyi unutmayın.
xfs, X Pencere Sisteminin yazıtipi sunucusudur (XFS - X Font Server). İstemci makinaya X yazıtiplerini kurmayacağız, tabii xfs'i de kurmayacağız. İstemci makinanın X Pencere Sistemi sunucu makinadaki xfs sunucusunu kullanacak. Bunun için bu makinadaki xfs sunucusunu dinlemeye almamız lazım. Hemen yapalım:
/etc/X11/fs/config dosyasının en alt satırına gidin,
# don't listen to TCP ports by default for security reasons
no-listen = tcp
son satırı iptal edeceğiz ki, xfs ağdan gelen istekleri dinlesin:
# don't listen to TCP ports by default for security reasons
# no-listen = tcp
Eğer xfs'i kullanmıyorsanız başlatın, ben kullanıyordum, yeniden başlatıyorum ve dinlemeye geçmiş mi bakıyorum:
~> /sbin/service xfs restart
xfs yeniden başlatılıyor:
xfs durduruluyor: [ TAMAM ]
xfs başlatılıyor: [ TAMAM ]
~> netstat -Npl | grep xfs
tcp 0 0 0.0.0.0:xfs 0.0.0.0:* LISTEN 1249/xfs
unix 2 [ ACC ] STREAM LISTENING 9433 1249/xfs /tmp/.font-unix/fs7100
Bu da tamamdııır. Çalışma seviyenizde başlatılan hizmetlere xfs'i eklemeyi unutmayın. Bu arada unutmadan belirteyim, makinada x-4.3.0 kurulu.
Geldik işin en canalıcı kısmına... gdm, xdm'yi kullanmaz. Bu bakımdan /etc/X11/xdm
dizinindeki dosyalarda daha önce xdm için bazı değişiklikler yaptınızsa onları
öntanımlı durumlarına getirin. Oradaki dosyalara dokunmayacağız.
Kullandığım gdm sürümü 2.6.0.2 (güncel sürüm, kaynak paketinden kurdum). gdm yapılandırmasını uzun uzadıya anlatmayacağım, merak ediyorsanız, belgelerini okuyun. Sadece /etc/X11/gdm/gdm.conf dosyasının /etc/X11/gdm/factory-gdm.conf dosyasına göre fark dosyasını veriyorum. Bu fark dosyasına bakarak /etc/X11/gdm/gdm.conf dosyanızı düzeltin:
/etc/X11/gdm> diff -u factory-gdm.conf gdm.conf > gdm.conf.diff
/etc/X11/gdm> cat gdm.conf.diff
--- factory-gdm.conf 2004-06-07 07:35:12.000000000 +0300
+++ gdm.conf 2004-06-08 17:41:14.000000000 +0300
@@ -46,10 +46,12 @@
# The greeter for local (non-xdmcp) logins. Change gdmlogin to gdmgreeter to
# get the new graphical greeter.
#Greeter=/usr/bin/gdmlogin
+Greeter=/usr/bin/gdmgreeter
# The greeter for xdmcp logins, usually you want a less graphically intensive
# greeter here so it's better to leave this with gdmlogin
#RemoteGreeter=/usr/bin/gdmlogin
+RemoteGreeter=/usr/bin/gdmgreeter
# Launch the greeter with an additional list of colon seperated gtk
# modules. This is useful for enabling additional feature support
@@ -111,7 +113,7 @@
# for backwards compatibility reasons with 2.4.4.x
#SessionDesktopDir=/etc/X11/sessions/:/etc/X11/dm/Sessions/:/usr/share/gdm/BuiltInSessions/:/usr/share/xsessions/
# This is the default .desktop session. One of the ones in SessionDesktopDir
-#DefaultSession=gnome.desktop
+DefaultSession=kde.desktop
# Better leave this blank and HOME will be used. You can use syntax ~/ below
# to indicate home directory of the user. You can also set this to something
# like /tmp if you don't want the authorizations to be in home directories.
@@ -135,8 +137,8 @@
# Automatic VT allocation. Right now only works on Linux. This way
# we force X to use specific vts. turn VTAllocation to false if this
# is causing problems.
-#FirstVT=7
-#VTAllocation=true
+FirstVT=7
+VTAllocation=true
# Should double login be treated with a warning (and possibility to change
# vts on linux systems for console logins)
#DoubleLoginWarning=true
@@ -179,7 +181,7 @@
# Note: Anytime we find a -query or -indirect on the command line we do
# not add a "-nolisten tcp", as then the query just wouldn't work, so
# this setting only affects truly local sessions.
-#DisallowTCP=true
+DisallowTCP=false
# By default never place cookies if we "detect" NFS. We detect NFS
# by detecting "root-squashing". It seems bad practice to place
# cookies on things that go over the network by default and thus we
@@ -199,7 +201,7 @@
# allow local access is another alternative but not the safest.
# Firewalling port 177 is the safest if you wish to have xdmcp on.
# Read the manual for more notes on the security of XDMCP.
-Enable=false
+Enable=true
# Honour indirect queries, we run a chooser for these, and then redirect
# the user to the chosen host. Otherwise we just log the user in locally.
#HonorIndirect=true
@@ -313,6 +315,7 @@
#BackgroundImage=
#BackgroundScaleToFit=true
#BackgroundColor=#76848F
+BackgroundColor=#a3bbce
# XDMCP session should only get a color, this is the sanest setting since
# you don't want to take up too much bandwidth
#BackgroundRemoteOnlyColor=true
@@ -333,6 +336,7 @@
#ShowLastSession=true
# Always use 24 hour clock no matter what the locale.
#Use24Clock=false
+Use24Clock=true
# Use circles in the password field. Looks kind of cool actually,
# but only works with certain fonts.
#UseCirclesInEntry=false
@@ -406,7 +410,7 @@
#
# If you wish to run the XDMCP chooser on the local display use the following
# line
-#0=Chooser
+0=Chooser
## Note:
# is your X server not listening to TCP requests? Perhaps you should look
Son satırdaki 0=Chooser gerekli değil, istemci makinanın gdm yapılandırması olmuş mu diye bakmak isterseniz faydalı, o da kendini sunucu zannediyor çünkü. Yapılandırmalar bittikten sonra isterseniz denemek için ona bağlanabilirsiniz :-)
Şimdi sıra /etc/inittab dosyasında. Bu dosyayı da düzenledikten sonra sistemi yeniden başlatacaksınız. Dosyada iki satır önemli,
bu iki satırı bulup onları aşağıdaki gibi değiştirin:
id:5:initdefault:
...
x:5:respawn:/usr/bin/gdm
gdm bu makinada artalanda bir sunucu olarak çalışacağından alışılmış olan -nodaemon seçeneğini kullanmıyoruz.