Setting up the OS X Server

Fairly straightforward initial Mac installation. Under SystemPreferences/Network I set the IP config to be static IP, as per Brandon's supplied IP address. For other machines it could just as easily be DHCP since the MolBio DHCP configuration appears to be mostly-static-IP. Initial naming for the Facility machine was xray_facility, somewhat arbitrary. In Unix space it's referred to as xray0.Princeton.EDU.

I disabled most of the power saving features (e.g. spinning down the hard drive) but left the screen saver active.

Unix Applications

Most of the following is taken from Bill Scott's Crystallography on OS X web pages. I registered with the Darwin source code project site - but this probably isn't important.

1. X Windows

X Windows and the necessary libraries are on the CD supplied with the computer so you don't actually have to go wandering around finding them on the net (this link for X11 for OSX 10.3). You'll also want the X11 SDK files from the Xcode installation CD (this link for X11 SDK for 10.3).

Set the display to let you run X-windows applications from your non-X terminal windows by putting this in your .cshrc or equivalent:

if (!  $?DISPLAY) then	
    setenv DISPLAY :0.0
endif
I also changed a couple of default settings:
defaults write com.apple.x11 wm_ffm -bool true
defaults write com.apple.x11 no_quit_alert -bool true

See man Xquartz and man quartz-wm for more options but X11's integration into Quartz for window managing is still not entirely seamless - window focus seems to require an additional click.

2. Developer Tools

Install Xcode from the 10.3 CD or Xcode 2.0 with the 10.4 DVD. Do a custom install and install the X11 SDK package too which comes with header files etc. Update to Xcode 1.5 (Nov 2004) if using 10.3.9.

IBM also has C and Fortran compilers for the Mac, at a price (60 day free trial, however).

3. Fink - installed 3rd party software

1. Install the Fink binary installer, following the steps described on their quickstart page. If you're using the Princeton standard /labcshrc file, the line
source /sw/bin/init.csh
will be executed if source /labcshrc is in your .cshrc. If it's not, you'll want to put the above line in there, otherwise fink won't be able to find the installed software.

2. Configure fink to use cvs releases:

% fink selfupdate-cvs

% sudo apt-get update
3. Tell fink where you have installed X-windows:
% fink install system-xfree86
4. Use the command % fink list to see what is available.

5. Use the command

% sudo apt-get install  packagename
to install binaries from Debian packages prepared by fink. These are not available in all cases, so if apt-get reports that it is not found, or if you want to compile stuff yourself, instruct fink to do so with
% fink install  packagename
Fink installs programs into machine-wide locations under /sw, so can be useful to build a general default installation. This is Phil's list of Fink commands/installs as of March 2003 but that is a little while ago and it pays to carefully peruse :
fink scanpackages
fink selfupdate-cvs
sudo apt-get update
fink list
sudo apt-get install g77
sudo apt-get install f2c
sudo apt-get install fort77
sudo apt-get install fftw
sudo apt-get install tcltk
sudo apt-get install blt
fink install scientificpython
fink install povray
fink install xv
sudo apt-get install xemacs
fink install rasmol
sudo apt-get install ghostscript
sudo apt-get install imagemagick
sudo apt-get install ispell
sudo apt-get install openssh
sudo apt-get install xtraceroute
sudo apt-get install xforms
sudo apt-get install nedit
sudo apt-get install openmotif3
sudo apt-get install pymol
Note that you can get applications like Mozilla, Netscape etc in the normal download/install way in the Mac. They just install in different places - either in /Applications or /Applications/Utilities. There's probably no point installing any package via fink that you can install via more Mac-typical mechanisms (e.g. Firefox, Mozilla).

You can also install the same software in more Unix-traditional locations, but which version you will use depends on the relative position of /sw and the other locations within your PATH variable.

Software Installation

OS X automatically launches Classic (OS 9.2) if you try and launch OS 9-based installers. Generally, place OS X applications in the regular Applications directory and put OS 9 apps in the "Applications (Mac OS 9)" directory.

Some installations, particularly those for Microsoft Office, Eudora and Endnote are simply drag it into the applications folder.

Other software that I have installed that I find useful:

Netinfo and Configuration Files

Adding hosts via NETINFO: create yourself a HOSTS file from one of the SGI/LINUX files using:
grep 128.112.16 /etc/hosts > HOSTS
and copy it somehow to your OSX box (e.g. cut and paste into a editor window). Then, save the current contents of the netinfo machine "directory":
% nidump -r /machines / > machines.original
% cat machines.original 
then merge the contents of the HOSTS flat file that you've just created
% sudo niload -v hosts / < HOSTS 
and check your entries
% nidump -r /machines /
This approach was culled from this article which was actually more to do with suppressing popup ads (by lying about the IP addresses of notorious popup ad servers). Because MolBio keeps a fairly accurate DNS list of all machines on it's network, it's not necessary to do this, and it's probably better that you don't in case of changes to the DNS entries.

Adding NFS mounts via NETINFO: read this to make your G4 an NFS client, or this article to run an NFS server. Running an NFS server seems a little pointless if you enable file sharing, frankly, unless you want your G4 to strictly impersonate one of my SGI or Linux installations. NFS mounts are not going to be viable with variable-IP G4's (i.e. ones with DHCP settings), because of the security restrictions I use when defining NFS exports.

Adding Users

Tips, tricks and Random Ideas

If the only administrator account forgets their password, look at this link to work out the solution. Specifically, boot using the OS X operating system CD, and pull down the Installer menu and select Reset password, type the new password and hit Save just once. If you hit save more than once it seems to overwrite your new password.

The root password can be set via the Netinfo Manager found in the /Applications/Utilities directory.

This document gives a simple primer as to the use of Netinfo instead of traditional Unix flat files in /etc for system administration (/etc/hosts, /etc/fstab, /etc/exports etc). Netinfo is somewhat of a badly-documented nightmare, however.

OS X login via SSH

ssh, scp, and sftp are the secure versions of the Unix utilities rsh, rcp and ftp. Whereas automatic usage of rsh and rcp is controlled by the file .rhosts, and ftp via .netrc, the ssh procedure is slightly more cumbersome. What you have to generate is a key, and then propagate this key to the machine you want to auto-login to:

On the host, one generates the key-pair using:

ssh-keygen -d
and then just propagate it to the destination machine:
ssh xray0 mkdir .ssh
ssh xray0 chown go-rwx .ssh
scp ~/.ssh/id_dsa.pub xray0:.ssh/authorized_keys2
Really only the last command is necessary, but if the .ssh directory does not exist you might need to create it. After the keys are in place, you shouldn't need to supply passwords for future transactions.

Note that to display X windows over an ssh connection you apparently have to do

ssh -X