Macs for Science

For a Mac to really be useful for science, you need to install some basic applications. Here is some guidance.


Gnuplot is used for making graphs. If you try to compile it normally you will get some errors. Here is how to make it work:

  1. Download and install aquaterm – this is a program which will handle the actual plotting graphics for gnuplot.
  2. Download the source code for gnpulot – I am using 4.2.3.
  3. Extract the source code somewhere (double click the file in finder or use “tar xzf FILENAME” from a terminal.
  4. Open a terminal and change to the extracted source directory.
  5. Configure the source code distribution by running: ./configure –with-readline=builtin You must use the –with-readline flag because Mac OS X comes with a bad version of this library. More details here.
  6. Build the source code by running make
  7. Install the resulting package by running make install
  8. You are done!

You can test it out by running gnuplot at the terminal and then typing plot sin(x)

Apache with PHP

This isn’t too sciency, but still on the techy side.  OS X Leopard comes with an apache server which can be enabled in the Settings->Sharing panel. However, by default PHP is not enabled.  To change that, you need to modify the httpd.conf file.  On my system it was in/private/etc/apache2/httpd.conf.  If you run apachectl -V it will print where the file is located. You need to uncomment the line in the file referencing php5.  After that, run apachectl restart and you will be all set!

Leave a Reply

Your email address will not be published. Required fields are marked *