READ ONLY FORUM: m23 :: makes software distribution easy Forum Index READ ONLY FORUM: m23 :: makes software distribution easy
The m23 discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NFS server installation

 
Post new topic   Reply to topic    READ ONLY FORUM: m23 :: makes software distribution easy Forum Index -> Tips and tricks / Tipps und Tricks
View previous topic :: View next topic  
Author Message
Hauke



Joined: 02 Mar 2003
Posts: 1072

PostPosted: Tue Aug 02, 2011 10:27    Post subject: NFS server installation Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    READ ONLY FORUM: m23 :: makes software distribution easy Forum Index -> Tips and tricks / Tipps und Tricks All times are GMT - 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group