Monday, June 16, 2008

setup dhcp, nfs on FC5

setup dhcp server
I need to setup dhcp server under my router.
Here is the configuration file (/etc/dhcpd.conf)

ddns-updates on;
subnet netmask {
option routers;
option subnet-mask;
option domain-name "";
option domain-name-servers;
host trgt {
hardware ethernet 08:00:28:01:15:F7;
option root-path "/opt/eldk/ppc_8xx";
option host-name "trgt";
filename "tftpboot/pImage";
ddns-update-style ad-hoc;

Here "trgt" is a linux device which has fixed ip address, and need boot image through NFS from linux host with ip "".

Start dhcp-server with: `/etc/rc.d/init.d/dhcpd start`

Setup nfs

Edit /etc/exports


Edit /etc/hosts.allow


And edit /etc/hosts.deny

portmap: ALL
lockd: ALL
mountd: ALL
statd: ALL

run: `exportfs -ra`

scripts on start nfs

/etc/init.d/portmap start
/etc/init.d/nfslock start
/etc/init.d/nfs start
/etc/init.d/netnfs start

Check nfs status with: `/sbin/service nfs status`

rpc.mountd (pid 4181) is running...
nfsd (pid 4183 4182 4181 4180) is running
rpc.rquotead (pid 4170) is running

You may need to "/sbin/service iptables stop" sometimes if you can the ip but can not mount while getting "no route and host" message.