Joakim's Mac OS X Setup
Below you will find my basic setup of my Mac running Mac OS X.
Note: This guide is intended for people at the Department of Physics, Stockholm
Univeristy. It may prove useful for other pepole too, but some topics are clearly
site and field specific.
NOTE: These instructions partly require Mac OS X 10.4 Tiger.
If you for some strange reason install an earlier version, check out the (partly
obsolete) old instructions for 10.1, 10.2
or 10.3. Also note that these instructions
should work both for Intel and PowerPC Macintoshes, just make sure to pick the
Intel (or universal) version of a package if it exists. Where there are differences
on how to install on intel and PowerPC, it will be explicitly stated below.
Consider this as a tentative guide to how you might want to set up your Mac
to get the most out of it as a physicist at Fysikum. In the following instructions
I presume that you know how to configure your machine for the network (DHCP
for laptops or static IP for stationary computers). If you have any questions,
send me an e-mail.
- Partition your hard drive.
If you want to use Unix programs, I recommend making a separate partition
for them. The reason is that the file system (HFS+, journaled) that you should
use on your start-up drive is not case sensitive. For most Unix applications
this is not a problem, but for some it might be. Hence, I recommend that you
make two partitions: a) one formatted as HFS+ (HFS extended) with journaling
where you put Mac OS X and all your regular Mac applications and files, and
b) one formatted as HFS+ (HFS extended) with journaling and case-senitivity
turned on for you Unix files. The latter partition could also be formatted
as an UFS (Unix File System) partition, but the UFS file system seems to perform
worse than HFS+, hence my recommendation above. Partitioning is done by running
the Mac OS X installer and choose 'Disk Utility' from one of the menues.This
of course wipes your hard drive completely, so only do this if you have a
new machine or have a backup of your stuff. If you are not sure you want to
do this partitioning, but later realize you need an HFS+ partition with case-sensitivity
turned on, you can always create a disk image with 'Disk Utility' (found in
Applications/Utilities/) and run your stuff there. A final note: don't take
the short-cut and format your startup partition (where you put Mac OS X) as
HFS+ (extended) with case-sensitivity turned on. There are numerous reports
on the web, that you should not have case-sensitivity turned on for your start-up
partition.
- Install Mac OS X.
Install Mac OS X onto your MacX partition. Choose a custom install and add
the bits and pieces you prefer. If you want to be able to use X Windows, click
to include 'X11' in your installation.
- Upgrade Mac OS X.
Upgrade Mac OS X to the latest version by running 'System Preferences ->
Software Update' until you have the latest Mac OS X version. You probably
have to run the Software update several times, run it until it says that your
system is upto-date.
- Install Xcode Tools.
If you are going to program in e.g. C, C++ or Fortran, install Xcode Tools
by running the installer on the Mac OS X DVD. This installer is typically
in a folder named 'Xcode Tools' on the install DVD. There may be a newer version
available which you can download from Apple
Developer Connection. You need to register to be able to download it,
so if you don't think you need it, don't bother.
- Install the Fortran compiler.
If you need Fortran, you can download the g77 Fortran compiler from Gaurav
Khanna's computation tools web page. Follow the instructions on that page
on how to install it. The g77 3.4 version seems to work fine with Tiger. Note
that you need to have root access to install the Fortran compiler. Either
you can get this by preceding your commands by 'sudo'. You will then be asked
about a password, which is your password (assuming you are classified as an
Administrator which you probably are), or you can enable the root user in
'Applications -> Utilities -> Netinfo Manager' (choose 'Security ->
Enable root user'). Only enable root if you know what you are doing!). To
finish the Fortran installation, create a link from f77 to g77 to be compatible
with some makefiles. Do this by typing
sudo ln -s /usr/local/bin/g77 /usr/local/bin/f77
If you have a PowerPC Mac, there is also an option to use IBM's commercial
xlf compiler (available from IBM's
site). This compiler is presumably faster, but costs money, and could
have problems with some code developed for g77. If you instead have an Intel
Mac, you could consider the Intel fortran that is presumably good and fast
(but costs money). See the link above to Gaurav Khanna's web page for more
information.
Finally note that there is also a Fortran 95 compiler, gfortran, available
on Guarav's page above. It can give you problems with Fortran 77 code, but
could give faster codes and this is where the development of Gnu Fortran compilers
lies these days.
- Install cernlib and paw.
a) For PowerPC Macs, download cernlib and paw from Keisuke
Fujii's HEP page. He uses the APT/RPM package mangement system for installation.
Follow the instructions on his page on how to install this and CERNLIB. Install
cernlib in /cern as usual and add /cern/pro/bin to your path by editing your
.cshrc file and add the line
SETENV PATH "${PATH}:/cern/pro/bin"
If you now start an xterm window in X11 and type paw you should get paw running
with graphics and all.
Note that cernlib and paw on Keisuke's page (as of this writing, 2007-01-11)
are not updated for Intel macs. However, the binary install of paw works anyway
(under Rosetta), whereas using cernlib with your own routines don't work on
Intel Macs as they are compiled for PowerPCs.
b) For Intel Macs, I have compiled cernlib directly from
source, following the instructions on Keisuke's page above (with some modifications
to make it compile). I have compiled the needed libraries and cernlib itself.
Not all things went through (not paw++ e.g.), but at least paw and cernlib
seems to work as it should. I give no guarantees, but if you want to install
my compiled version of cernlib for the Intel Mac, download and install the
following:
sudo tar zxvf libcompat-intel.tar.gz
-C /
sudo tar zxvf libblas-intel.tar.gz
-C /
sudo tar zxvf liblapack-intel.tar.gz
-C /
sudo tar zxvf cern2005-intel.tar.gz
-C /
This installs the needed libraries in /usr/local
and cernlib is installed in /cern
as usual. I think I have got everything you need in the tar files above, but
let me know if something is missing. As above, you then need to add /cern/pro/bin
to your path when you are finished.
- Install TeX.
The TeX installation I kind of like most on Mac OS X is TeXShop which uses
tetex as the TeX motor. Follow the instructions on darkwing.uoregon.edu/~koch/texshop/texshop.html
to first install tetex and then TeXShop. The easiest is to follow the
instructions there on how to get MacTeX from CTAN. You then get tetex and
TeXShop in one simple go.
- Install whatever else you like.
Here is a little list of things I like to have installed:
- Emacs. The all classic text editor (free). It comes in a few different
flavours, pick the one you prefer (I haven't found my favourite yet).
- Aquamacs. A Macier version of Emacs
(based on Gnu Emacs)
- Carbon Emacs.
A more classic version of Emacs (also based on Gnu Emacs)
- TextWrangler.
Another nice text editor (free).
- Smultron. Yet another nice
text editor (free and SWEDISH!)
- Norton Antivirus. As an employee of Stockholm University, you can download
Norton Antivirus from here.
- Microsoft Office, Mathematica, etc. CDs are available from Christian Walck
(or at least he knows where they can be found). Install and register with
Christian Walck.
- LaTeXiT.
Nice little application that lets you quickly write equations to include
in e.g. Keynote. It has a nice touch that you can drag your equations from
e.g. Keynote back into LaTeXiT to edit your equations. For this reason,
I prefer this program instead of
- LaTeX Equation
Editor. Similar application as LaTeXiT, but without the ability to edit
your equations later (unless you have stored them in LaTeX Equation Editor's
library).
- Configure crontab (optional).
If you want to, you can configure cron such that it automatically runs some
system maintenance scripts at convenient times. As root install a crontab
file like the following:
SHELL=/bin/sh
#min hour mday month wday command
10 12 * * * sh /etc/daily
20 12 * * * sh /etc/weekly
30 12 * * 2 sh /etc/monthly
Note that there should be tabs between all fields (except between sh
and /etc...). This will keep your system sane and the locate database updated.
If you don't like these jobs to run at the specified times (12.10, 12.20 and
12.30), change to your liking.
- Install Kerberos and AFS.
If you want to access our AFS disk system (and your home account if it is
AFS), go to these instructions to install the
needed programs.
Links
- Versiontracker.Best
resource on the net for Mac OS X software. If any of the links above are missing
you can search for the software at Versiontracker.
- MacOSXHints. Hints and tips on
various Mac OS X issues.
- OSX Page. Extensive list of software.
Contains much more X Windows software than Versiontracker.
This page was last modified
2007-01-11
.