2006 NVO Summer School

NVOSS 2006: Configuring your Mac laptop

Overview

This page describes how to configure your Mac laptop for use with the 2006 NVO Summer School software.

We recommend Mac OS 10.4.x (Tiger): if you are running an earlier version of Mac OS you may find that there are compatibility issues with some of the software.

You should enter commands given below into a Terminal window or equivalent.

You can always check if an executable is in your path with the which command: for example, to see if the java executable is in your path:

>which java
/usr/bin/java

If you want to check the value of an environment variable, you can use the printenv command with the name of the variable:

>printenv JAVA_HOME
/Library/Java/Home

If you need to set an environment variable, you can use the following syntax, depending on your environment:

>setenv JAVA_HOME /Library/Java/Home (csh users)
or
>JAVA_HOME=/Library/Java/Home; export JAVA_HOME (bash users)

Alternatively, if you want to set it more permanently, set it in your .bashrc, .cshrc or .tcshrc file.

Basic setup

The basic setup is just three system components: Java 1.5, Python 2.4.3 and MySQL 5.0.

Java

The recommended version of Java is 1.5.0: this is now the default version for Mac OS 10.4. To check what the current version is:

>java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-112)
Java HotSpot(TM) Client VM (build 1.5.0_06-64, mixed mode, sharing)

You should also make sure that the environment variable JAVA_HOME is pointing at the location of your current Java installation:

>printenv JAVA_HOME
/Library/Java/Home

If it is not, you should set it:

>setenv JAVA_HOME /Library/Java/Home (for csh users)
or
>JAVA_HOME=/Library/Java/Home; export JAVA_HOME (for bash users)

Generally it's a good idea to set this in your normal environment setup script (i.e. your .cshrc, .tcshrc or .bashrc file) and then you do not have to worry about it again.

Python

The recommended version of Python is 2.4.3 (although 2.4.0 or greater is acceptable): Mac OS comes with Python installed and to check what the current version is:

>python -V
Python 2.4.3

If necessary, you can obtain an appropriate version of Python from here.

Four additional Python modules are required for the summer school:

fpconst provides constants and functions to deal with IEEE754 double-precision special values. It is available here. Once you have unpacked the compressed tar ball, you can install it by changing to the fpconst directory and typing:

>python setup.py install

SOAPpy provides client-server libraries for web programming using SOAP and related protocols. It is available here. You should actually download v0.11.6 (available under the Latest official release (0.11.5) link). Once you have unpacked the compressed tar ball, you can install it by changing to the SOAPpy-0.11.6 directory and typing:

>python setup.py install

MySQL-python provides access to a MySQL database. It is available here. You should download MySQL-python-1.2.0.tar.gz. Once you have unpacked the compressed tar ball, you can install it by changing to the MySQL-python-1.2.0 directory and typing:

>python setup.py install
If the installation fails then you might try using this installer.

The Python sample code in python/voAgent requires the Python Imaging Library. It is available here.You should download Python Imaging Library 1.1.5 Source Kit. Once you have unpacked the compressed tar ball, you can install it by changing to the Imaging-1.1.5 directory and typing:

>python setup.py install

To test that your Python installation is correctly setup:

>python
Python 2.4.3 (#1, Jul  4 2006, 17:58:52) 
[GCC 4.0.0 20041026 (Apple Computer, Inc. build 4061)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import SOAPpy
>>> import fpconst
>>> import MySQLdb
>>> import Image

You should also set the PYTHONPATH environment variable to include $NVOSS_HOME/python/lib and $NVOSS_HOME/python/sample.

MySQL

The recommended version of MySQL is 5.0.22: to see what version, if any, is already installed, make sure that the mysql executable is in your path and then:

>mysql --version
mysql  Ver 14.12 Distrib 5.0.22, for apple-darwin8.6.0 (powerpc) using readline 5.0

The value after the Distrib keyword is actually the version number: anything later than '5.0.15' is fine.

If necessary, you can obtain an appropriate version of MySQL from here.

You should install the Standard version.

You should also set a password for the MySQL root user (note that this is different from the system root user). Start the server:

>/usr/local/mysql/bin/mysqld_safe &

and then:

> mysql -u root
mysql> UPDATE mysql.user SET Password = PASSWORD('newpassword') WHERE User = 'root';
mysql> FLUSH PRIVILEGES;

If you have had to install MySQL then please make sure that the directory /usr/local/mysql/bin is in your path.

Now you are ready to install the software package.

Software Package

You will need to set the environment variable NVOSS_HOME to the top level directory of the software tree, e.g. nvoss2006 in your home directory and then run the setup script:

>cd $NVOSS_HOME
>source bin/setup.csh (csh users)
or
>. bin/setup.sh (bash users)

To verify the installation, change to the java subdirectory and type:

>ant

You should then see:

Buildfile: build.xml

init:
    [mkdir] Created dir: .../test/classes

compile:
     [echo] building
    [javac] Compiling 1 source file to .../test/classes

test:
    [junit] Testsuite: sumsch.TestInstall
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed 0.375 sec

clean:
    [delete] Deleting directory ...test/classes

BUILD SUCCESSFUL

You are all ready to go now.

Note: If you want to use VOPlot3D then you will need to install the Java3D package. This is available at: Java 3D for Mac OS X - however this is not compatible with Mac OS X 10.4

Optional setups

C#

You can develop in C# on the Mac using Mono, the open source C# platform, available from here.

The recommended version of Mono is 1.1.13: to see what version, if any, is already installed, make sure that the mono executable is in your path and then:

>mono -V
Mono JIT compiler version 1.1.13.8, (C) 2002-2005 Novell, Inc and Contributors. www.mono-project.com
        TLS:           normal
	GC:	       Included Boehm (with typed GC)
        SIGSEGV      : normal

Anything beginning '1.1.13' is fine.

If you want to use MySQL with Mono, you will need to download the MySQL Connector/NET from MySQL here.

IDL

The recommended version of IDL is 6.2 or 6.3: to see what version, if any, is already installed, make sure the idl executable is in your path and then:

>idl
IDL Version 6.2 (linux x86 m32). (c) 2005, Research Systems, Inc.
IDL>

Anything beginning '6.2' or '6.3' is fine. 6.1 should also work.

If necessary, you can obtain an appropriate version of IDL from RSI here, although you will need to register first. However, distribution CDs and an appropriate licence will be available at the summer school.

IRAF

The 2006 NVOSS uses a highly customized distribution of IRAF to simplify the installation process for students, and as a temporary means of distributing new software. Users who already have an IRAF system on their machine are encouraged to, at least for the duration of the NVOSS, rename the root /iraf link (or directory) to preserve their current installation and use the setup script provided to install the NVOSS distribution as their default system while in Aspen.

The recommended version of IRAF is 2.13: to see what version, if any, is already installed, make sure that the cl command is in your path and then:

You can install the appropriate version of IRAF by running the $NVOSS_HOME/iraf/iraf_setup.csh script in the summer school software package from the directory in which you wish to install the IRAF tree. This may be the iraf directory in the $NVOSS_HOME itself. For instance:

>cd $NVOSS_HOME/iraf
>csh -f ./iraf_setup.csh

Once the system has been installed you can verify that the 'cl' startup command refers to the proper version using the commands:

cl> =cl.version
IRAF V2.13 Aug 2006
cl> head hlib$motd nl=2
IRAFNET PC-IRAF Revision 2.13-BETA3 Fri Aug 18 14:22:14 MST 2006
This is the IRAFNET version of IRAF V2.13 supporting PC systems.

Note that approximately 500Mb of free space is required for the full IRAF release (including various external packages installed as part of the distribution).

Installation problems and questions may be directed tofitz@noao.edu

Perl

The recommended version of Perl is 5.8 (although 5.6 or greater is acceptable): Mac OS comes with Perl installed and to check what the current installed version is:

>perl -v
This is perl, v5.8.6 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

If necessary, you can obtain an appropriate distribution of Perl from here.

PHP

The recommended version of PHP is 5 (although 4.3 or later is acceptable): Mac OS comes with PHP installed and to check what the current installed version is:

>php -version
PHP 4.4.11 (cli) (built: Mar 5 2006 10:30:50)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

It is easiest to use PHP with the Apache web server, which is also automatically installed under Mac OS. To enable PHP, you will need edit the Apache config file /etc/httpd/httpd.conf - this will probably need to be done using sudo privileges. Two lines need to be uncommented (remove the # from the beginning of the line); the lines are:

# LoadModule php4_module libexec/httpd/libphp4.so

and

# AddModule mod_php4.c

You will also need to restart Apache (or start it if you are not already running it): you can simply use the Sharing Panel in the System Preferences application to (re)start Web Sharing or you can enter:

>sudo apachectl restart

The NVO Summer School is made possible through the support of the National Science Foundation and the National Aeronautics and Space Administration.