Tuesday, January 26, 2010

NFS

Network file system:-

sharing directories in unix/linux systems

shared nfs directories:-

configured in /etc/exports

ex:- /home 192.168.0.0/255.255.255.0(rw,sync)

192.168.0.0/255.255.255.0(ro,sync)

no_root_squash = allows root level access



NFS kernel server packages:-
portmap, nfs-common, nfs-kernel-server


exporting shared directories:-

exportfs -a

shares exported when nfs server restarts:-

exportfs -r

confirm directories are shared:-

showmount -e localhost


makesure the NFS server works:-

try sudo /etc/int.d/portmap restart

review portmap related services:-
rpcinfo -p


Tuesday, January 12, 2010

Friday, January 8, 2010

How to change host name ?

Permanent hostname change on Debian based systems

Debian based systems use the file /etc/hostname to read the hostname of the system at boot time and set it up using the init script /etc/init.d/hostname.sh

/etc/hostname
server

So on a Debian based system we can edit the file /etc/hostname and change the name of the system and then run:

/etc/init.d/hostname.sh start



Use sysctl to change the hostname

Why would someone need a different method of doing the same thing as above? No idea, but here is anyway: use sysctl to change the variable kernel.hostname:

Use:

sysctl kernel.hostname

to read the current hostname, and

sysctl kernel.hostname=NEW_HOSTNAME

to change it.