Preparation steps for MacOSX

Only MacOSX 10.4.x or 10.5.x is supported for this workshop.

Prepare

Open a new Terminal session (/Applications/Utilities/Terminal).

A "working directory" will be used to install the software and to work during the workshop. A good choice is to create a directory in your home directory:

mkdir ~/eurovodca/

Download all software installation files to this directory.

Note: the values in uppercase between curly brackets must be replaced by your own values.
For example, replace all {YOUR_PASSWORD} occurrences by an actual password of your choosing.
For my user account, the value of {YOUR_WORKING_DIR} is: /Users/brino/eurovodca/

Download

A copy of the download files are available at http://www.euro-vo.org/dcaworkshop2008/CommonSoftware/MacOSX/

You are however advised to get the files from their original source. This will allow you to revise any applicable End User Agreements and software licenses before installing, and to know where to get updated versions of the software in the future.

Java JDK 1.5

Install

You shouldn't need to install the Java JDK 1.5 on MacOSX as it is already on your system.

To check this, type:

javac -version

You should get:

$ javac -version
javac 1.5.0_13
javac: no source files
 ......
 ....
 ...

If this is not the case, you need to update your system.
Open the "Software Update" utility, an update package should appear for Java, you need to install it.

Configure

You now need to set the following environment variables:

JAVA_HOME=/usr

Tomcat 5.5

Download

Open the following URL: http://tomcat.apache.org/download-55.cgi#Binary%20Distributions and download the "tar.gz" installation file.

Install

Unpack the Tomcat package :

tar xvfz apache-tomcat-5.5.26.tar.gz

Note: if you downloaded the package using Safari, your browser might have already uncompressed the file.
In that case use      tar xvf apache-tomcat-5.5.26.tar      instead.

Create a link to this newly installed software for easy access :

ln -s jakarta-tomcat-5.0.28 tomcat

Configure

You now need to set the following environment variables:

CATALINA_HOME={YOUR_WORKING_DIR}/tomcat
CATALINA_BASE={YOUR_WORKING_DIR}/tomcat

Edit the user configuration file :

cd tomcat
pico conf/tomcat-users.xml

You should change the file from this :

<!--
  NOTE:  By default, no user is included in the "manager" role required
  to operate the "/manager" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<tomcat-users>
  <user name="tomcat" password="tomcat" roles="tomcat" />
  <user name="role1"  password="tomcat" roles="role1"  />
  <user name="both"   password="tomcat" roles="tomcat,role1" />
</tomcat-users>

To this :

<!--
  NOTE:  By default, no user is included in the "manager" role required
  to operate the "/manager" web application.  If you wish to use this app,
  you must define such a user - the username and password are arbitrary.
-->
<tomcat-users>
  <role rolename="manager"/>
  <role rolename="admin"/>
  <user name="admin" password="{YOUR_PASSWORD}" roles="admin,manager" />
</tomcat-users>

(For testing purposes, a common value for this password is "admin")

Now, try to start your Tomcat server :

./bin/startup.sh

You should get :

Using CATALINA_BASE:   {YOUR_WORKING_DIR}/tomcat
Using CATALINA_HOME:   {YOUR_WORKING_DIR}/tomcat
Using CATALINA_TMPDIR: {YOUR_WORKING_DIR}/tomcat/temp
Using JRE_HOME:       /usr

And shutdown your Tomcat server :

./bin/shutdown.sh

You should get :

Using CATALINA_BASE:   {YOUR_WORKING_DIR}/tomcat
Using CATALINA_HOME:   {YOUR_WORKING_DIR}/tomcat
Using CATALINA_TMPDIR: {YOUR_WORKING_DIR}/tomcat/temp
Using JRE_HOME:       /usr

Finally, go back to your working directory :

cd ..

MySQL 5.0

Download

Open the following URL: http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg and download the installation file that applies to your machine (10.4 or 10.5, powerpc or intel, 32 or 64 bit...).

Install

Open the downloaded dmg file. Inside you will find mysql-5.0.51b-{YOUR_PLATFORM}.pkg, which is the installation file to execute.

For controlling MySQL, install the preference pane by executing MySQL.prefPane.

Configure

You now need to set the following environment variables:

MYSQL_HOME=/usr/local/mysql

And add MySQL to your PATH:

PATH=/usr/local/mysql/bin

By default the "root" user was given an empty password, that you might set ("root" is a common choice for testing purposes):

mysqladmin -u root password {YOUR_PASSWORD}

Ant

Download

Open the following URL: http://ant.apache.org/bindownload.cgi#Current%20Release%20of%20Ant and download the "tar.gz" installation file (apache-ant-1.7.0-bin.tar.gz).

Install

Unpack the Apache Ant package :

tar xvfz apache-ant-1.7.0-bin.tar.gz

Note: if you downloaded the package using Safari, your browser might have already uncompressed the file.
In that case use      tar xvf apache-ant-1.7.0-bin.tar      instead.

Configure

You now need to set the following environment variables:

ANT_HOME=ANT_HOME={YOUR_WORKING_DIR}/apache-ant-1.7.0

And add Ant to your PATH:

PATH={YOUR_WORKING_DIR}/apache-ant-1.7.0/bin

Perl 5 (optional)

Install

You shouldn't need to install Perl on MacOSX as it is already on your system.

To check this, type:

perl -v

You should get:

$ perl -v
This is perl, v5.8.8 built for darwin....
....

PostgreSQL (optional)

Download

There is no official support for PostgreSQL on MacOSX, however there are several installers provided by third parties. Open the following URL: http://www.postgresrocks.com/download.html and download the "Mac" installation file.

Install

Unpack the downloaded zip file (postgres-plus-8.3-mac.zip) Open the extracted dmg file (postgres-plus-8.3.dmg). Inside you will find Postgres Plus 8.3.mpkg, which is the installation file to execute.

You will be asked for a password for the "postgres" user. A common choice for testing purposes is "postgres")

Configure

You can add PostgreSQL PATH:

PATH=/Library/PostgresPlus/8.3/bin

About environment variables

Environment variables are system-wide settings that configure your computer. They are used, among other things, to make sure that several programs on your system are easy to find.

To set an environment variable in MacOSX:

  • Open a new Terminal
  • Check what is your shell by typing echo $SHELL
    • if it is /bin/bash (the default if you haven't changed it)
      • configuration file is: ~/.bash_profile
      • syntax is: export VAR_NAME=value
    • if it is /bin/tcsh
      • configuration file is: ~/.tcshrc
      • syntax is: setenv VAR_NAME value
  • Edit the configuration file to add the export/setenv statements, one by line. Take care to identify variables that already exist, and update them properly.
  • The changes made to the configuration file are valid once you save the file, but they will only be visible in Terminal sessions started after the changes.
  • To apply the changes to an existing Terminal session, execute the following command:
    • bash: source ~/.bash_profile
    • tcsh: source ~/.tcshrc

The PATH environment variable

The PATH environment variable allows easy access to several programs. If it already has a value, you should add the new value(s) to the beginning of the existing one using a colon ":" as separator, and referencing the existing value using the variable itself, e.g.:

To add the values:

/usr/local/mysql/bin:/Users/rino/eurovodca/apache-ant-1.7.0/bin
Edit the appropriate configuration file by adding a new line, at the bottom:
  • bash (~/.bash_profile)
export PATH=/usr/local/mysql/bin:/Users/brino/eurovodca/apache-ant-1.7.0/bin:${PATH}
  • tcsh (~/.tcshrc)
setenv PATH /usr/local/mysql/bin:/Users/brino/eurovodca/apache-ant-1.7.0/bin:${PATH}

Acknowledgments

These instructions were based upon PreparationMacOSX
Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r8 - 23 Jun 2008 - BrunoRino
 
This site is powered by the TWiki collaboration platform Powered by Perl This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback