View previous topic :: View next topic |
Author |
Message |
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Mon Mar 08, 2004 2:13 am Post subject: how to start with nfs? |
|
|
i just bought a nice small notebook as a second computer. it had a very strange OS on it, so i just formatted it and put gentoo on it now, i of course want to connect it to my main gentoo box. in particular, i want to do the following:
get access to the internet trough my desktop machine,
share my data folders so i can access them on the notebook
share my printer so i can - guess what - print
share /usr/portage so that i save disk space & bandwidth
i just need a little hint where to start. i already know how to make my desktop an inet gateway, i've already done that before. but how do i share a dir/partition with NFS? what else do i need besides the nfs client/server modules in the kernel?
for cups, i think i know how to make cups listen to request not coming from localhost, but how do i tell cups on the notebook to print on the networked printer?
and for portage: could i just share /usr/portage on my desktop, mount it into /usr/portage on my notebook and thats it? i suppose i could then just rsync on my desktop, and then do an emerge --update world on the notebook, am i right?
thanks for your answers
tom |
|
Back to top |
|
|
ebruning Tux's lil' helper
Joined: 27 Nov 2002 Posts: 104
|
Posted: Mon Mar 08, 2004 3:48 am Post subject: |
|
|
You will need to emerge nfs-utils (i think that is what is is called). You will then need to edit your /etc/exports file and set which directories to share. To keep things simple you should make sure your user on both machines have the same UID.
You can search the forums for examples of the exports file. I'm not on my gentoo machine right now or i would post mine, sorry.
You can configure cups on the laptop with a web browser, i think it listen on port 631 but not sure you will need to look at the config files to be sure and then instead of using the local host you specify the ip and printer name(ipp://ipaddress/printers/Photosmart). There used to be a post called Cups to Cups printing that was really good, but I cant seem to find it now.
Yes you can share your /usr/portage directory and just run emerge sync once. I used to do that. |
|
Back to top |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Mon Mar 08, 2004 12:05 pm Post subject: |
|
|
thanks, that'll help me a lot. i just didn't know where to start. so at least i know about /etc/exports about the uid's: it doesn't matter how the users on the desktop and the notebook are called, as long as they have the same uid and are in the same group, they appear as the 'same' user to the system (at least when it is about file system permissions)?
tom |
|
Back to top |
|
|
appetitus Apprentice
Joined: 28 Sep 2003 Posts: 210
|
Posted: Tue Mar 09, 2004 12:19 am Post subject: |
|
|
read the Networking Howto for background if you need it
read the NFS Howto, it has most details
emerge nfs-utils
add to rc-update portmap and nfsmount - on client, on server it is 'nfs'
add remote mount to /etc/fstab - on client
read system logs for error info
works fine here, about 5-6 machines share /usr/portage, about the only problems were
with using names rather than IP addresses in /etc/hosts.allow and /etc/exports. NFS starts before BIND, so IP addresses are required. Be VERY careful with whitespace in these config files, just use "one" space and be sure that it is in the right place.
--
For your printer, use cups or samba
For routing, you need to enable IP forwarding in /etc/conf.d/ after getting the network up. _________________ Being a Gentoo user means living in a house inhabited by a family of crazed carpenters. When you wake up, the house is different. Maybe there is a new turret, or some walls have moved, or perhaps someone has removed the floor under your bed. |
|
Back to top |
|
|
peaceful Apprentice
Joined: 06 Jun 2003 Posts: 287 Location: Utah
|
Posted: Fri Mar 19, 2004 4:52 pm Post subject: |
|
|
appetitus wrote: |
read the NFS Howto, it has most details
|
Where is the "NFS Howto"?? I've searched the forums and looked in the "User Docs" section on the main Gentoo site and haven't been able to find it. |
|
Back to top |
|
|
neysx Retired Dev
Joined: 27 Jan 2003 Posts: 795
|
|
Back to top |
|
|
peaceful Apprentice
Joined: 06 Jun 2003 Posts: 287 Location: Utah
|
Posted: Mon May 03, 2004 4:29 pm Post subject: |
|
|
"emerge -s howto" doesn't bring up any NFS howtos, but there is a link on the sourceforge page to:
http://nfs.sourceforge.net/nfs-howto/
which works for me. Thanks. |
|
Back to top |
|
|
|