Linux and servers etc

I started to build a new computer and then found the case was too big to put where my current computer is so I decided to continue using my current computer and to use the new one as a server but not only that - I'll let the server take over the processor load that slows down my current computer - ie antivirus checking and firewall activities.

My question is: can somebody explain to somebody whose experience of computers is limited to C++/Delphi programming under NT Workstation and Windows 95/98 and whose experience is also limited to a modicum of Win NT4 workstation admin, how I go about setting up Linux for the
aforementioned activites? I'm thinking of using Cheep Linux (because I already have that). If that's going to be a pain then SME Linux is a possibility.

Good idea. I run Mozilla on my grunt box too.
Firewalling is normally not a grunty job.

If you have the disc space, do a full install on both machines. Leave the server in text (aka "console") mode - no GUI login. On your client machine, run a GUI login or not as you see fit; if you're a windows user by background you may be more happy with the GUI login. Personally, I run in console mode and start X11 by hand, which is easy enough.

Oh yeah. If it's easy, make /home a separate partition or even a separate hard drive from the other stuff, much as you would probably make a D: partition for windows for user data. This will mean you can install other Linux distros later leaving /home intact.

All the other setup can take place after install.

If you want to use your server box also as a workstation, running grunty stuff on it but _displayed_ on your current machine you will want to share your home directory to it with NFS so you can log into it from your desktop machine and use the same files. This requires two things:
- a /etc/exports file on your workstation to say you're sharing (exporting)
- your homedir to other machines and on the server a corresponding line in the /etc/fstab file to mount the directory ("connect the network drive" in windows parlance) on the server for use.

Inside a firewall you can usually be pretty generous with your exports file. This line:
/home *(rw)
says to make your /home directory tree available to anyone who asks. Your personal home directory will be /home/rhys (or suchlike) - Linux systems are all multiuser and so there's a subdirectory in /home for each user.
After adding that line run the command:

exportfs -av

which will activate the change.

On the server you will want a line in the fstab file. This is a tad more tricky. Everything you mount must have a premade location for it and you should pick some scheme which will scale as you add more stuff.
There are schemes like autofs for scaling this to large installations, but let us not go there. On my LAN I have a /nfs directory tree for NFS mounts. It takes the form:

/nfs/hostname/dir

where hostname is the machine the directory is taken from, and dir is the base of the directory. For example, my home directory on my grunt machine (amadeus) has the pathname:

/nfs/amadeus/home/cameron

So, on the server you must make a /nfs/amadeus/home directory:

mkdir -p /nfs/amadeus/home

(Naturally replace "amadeus" as needed.)
Then the line for mounting the /home from amadeus in the /etc/fstab.

amadeus:/home /nfs/amadeus/home nfs defaults 0 0

That says
1) you're getting the "/home" directory from the host "amadeus",
2) and making it available as the directory "/nfs/amadeus/home" on your
server,
3) usings NFS,
4) with the default options and the last two fields control filesystem checking, which has meaning only for local filesystems.

Then test it by saying:

mount /nfs/amadeus/home

If that's ok it remains to make sure you have an account on both machines. Their uids should match. The home directory on the server should either be "/nfs/amadeus/home/cameron" (hack to match your desktop and login)
or an ordinary /home/rhys, which should probably be a symbolic link to /nfs/amadeus/home/cameron. This second approach is basic so that the home directory is "/home/rhys" on both machines, because that string
tends to creep into personal config files and it's useful if those files work unchanged on both machines.

Have a Linux Issue?
Do you have a Linux Question?

Linux Home: Linux System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.