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 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>

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 JAVA_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 JAVA_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

NEEDS CHECKING Open the downloaded dmg file. Inside you will find mysql-standard-5.0.51b.pkg, which is the installation file to execute.

For controlling MySQL, install the control panel.

tar xvfz mysql-5.0.41-osx10.4-i686.tar.gz
tar xvfz mysql-5.0.41-osx10.4-powerpc.tar.gz

Note: if you downloaded the package using Safari, your browser might have already uncompressed the file.
In that case use      tar xvf mysql-5.0.41-osx10.4-{YOUR_ARCH}.tar      instead.

Create a link to this newly installed software for easy access (using one of) :

ln -s mysql-5.0.41-osx10.4-i686 mysql
ln -s mysql-5.0.41-osx10.4-powerpc mysql

Execute the "configure" script provided :

cd mysql
./configure

Set a password for the "root" user as the script indicates you :

./bin/mysqladmin -u root password {YOUR_PASSWORD}

In the end, shut down your MySQL server :

./bin/mysqladmin shutdown -u root -p
(type in your password)

Finally, go back to your working directory :

cd ..

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

Ant

Download

Install

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)

Download

Install

Configure

PostgreSQL (optional)

Download

Install

Configure

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/bin/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 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 10 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