Hauke
Joined: 02 Mar 2003 Posts: 1072
|
Posted: Tue Aug 02, 2011 10:27 Post subject: NFS server installation |
|
|
An NFS server can be installed (non-interactively) with the following short script. There you have to adjust the network settings (192.168.1.0/24) to your setup.
The m23 clients can use the address
(nfs server IP)/m23/nfs-homes
(e.g. 192.168.1.23/m23/nfs-homes) for storing the home directories afterwards.
Code: | export DEBIAN_FRONTEND=noninteractive
#Disable loopback for portmap
echo "portmap portmap/loopback boolean false" | debconf-set-selections
portmapInstalledBefore=$(dpkg --get-selections | grep portmap -c)
#Install the needed packages
apt-get -y -m --force-yes install nfs-kernel-server nfs-common portmap
#Reconfigure portmap, if it was isntalled before
if [ $portmapInstalledBefore -gt 0 ]
then
dpkg-reconfigure portmap
/etc/init.d/portmap restart
fi
#Create the directory for storing the home directories
mkdir -m 777 /m23/nfs-homes
#Add the directory so it gets exported by NFS
echo "/m23/nfs-homes 192.168.1.0/24(rw,no_root_squash,async)" >> /etc/exports
/etc/init.d/nfs-kernel-server restart |
_________________ Hauke Goos-Habermann
- project leader m23 (http://m23.sf.net) -
Jabber: dodgerm23@jabber.org
Schulung, Entwicklung und Support zu m23 und anderen OpenSource-Produkten: www.goos-habermann.de
Auch DU kannst etwas gegen Softwarepatente tun! www.patentfrei.de |
|