Installing webMathematica (Mac OS X)
These steps have been tested with the following software:
- OS X Tiger (10.4.9)
- Mathematica 6.0
- webMathematica 2.3
- Apache Tomcat 5.5.23
Newer versions of OS X and these applications should work, but some steps may vary slightly.
Install Mathematica
- Use the CSUS-provided Mathematica disc (or download) and license key
- Drag "Mathematica" from installation disc (or disk image) to Applications folder
- Launch Mathematica
- Organization Name: California State University at Sacramento
- License key: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXX
Download latest Tomcat
http://www.apache.org/dist/tomcat/tomcat-5/v5.5.23/bin/apache-tomcat-5.5.23.tar.gz
Install Tomcat
All commands executed in Terminal.app (/Applications/Utilities/)
- Check to see if /usr/local exists
ls -d /usr/local
- If it's not there, create it
sudo mkdir /usr/local
- Copy the Tomcat installation package to /usr/local
sudo cp apache-tomcat-5.5.23.tar.gz /usr/local
- Move to /usr/local
cd /usr/local
- Unpack the installation package
sudo tar xvzf apache-tomcat-5.5.23.tar.gz
- Remove the installation package
sudo rm apache-tomcat-5.5.23.tar.gz
- Create a symbolic link
sudo ln -s apache-tomcat-5.5.23 tomcat
- Change ownership of tomcat directory
sudo chown -R nobody:nobody tomcat
- Start Tomcat
sudo /usr/local/tomcat/bin/startup.sh
- Test Tomcat - open browser and point to: http://localhost:8080
Install webMathematica
- Copy webMathematica.zip from the webMathematica CD to your hard disk (I put mine on the Desktop)
- Move to Desktop
cd ~/Desktop
- Unpack webMathematica files
unzip webMathematica.zip
- Copy webMathematica directory to Tomcat's webapps directory
sudo cp -r webMathematica /usr/local/tomcat/webapps
- Update webMathematica configuration file MSP.conf (change "Mathematica 5.2.app" reference to "Mathematica.app" in the first line beginning with MathLinkArguments.MacOSX)
sudo vi /usr/local/tomcat/webapps/webMathematica/WEB-INF/conf/MSP.conf
- Test webMathematica at http://localhost:8080/webMathematica/
- If you get any Java errors, restart Tomcat
sudo /usr/local/tomcat/bin/shutdown.sh
sudo /usr/local/tomcat/bin/startup.sh
Install StartupItem (optional, but helpful)
- Create the StartupItems directory
sudo mkdir /Library/StartupItems/Tomcat
- Using a text editor, create /Library/StartupItems/Tomcat/Tomcat
sudo vi /Library/StartupItems/Tomcat/Tomcat
Add the following contents to /Library/StartupItems/Tomcat/Tomcat
- Create /Library/StartupItems/Tomcat/StartupParameters.plist
sudo vi /Library/StartupItems/Tomcat/StartupParameters.plist
Add the following to /Library/StartupItems/Tomcat/StartupParameters.plist
- Adjust the permissions for StartupItem contents
sudo chmod 755 /Library/StartupItems/Tomcat
sudo chmod 711 /Library/StartupItems/Tomcat/Tomcat
sudo chmod 644 /Library/StartupItems/Tomcat/StartupParameters.plist - Edit /etc/hostconfig and paste TOMCAT=-YES- at end of file
sudo vi /etc/hostconfig
- Restart the computer and confirm that Tomcat is still running at http://localhost:8080
Uninstalling Tomcat
If you need to uninstall Tomcat, run the following:
sudo /usr/local/tomcat/bin/shutdown.sh
sudo rm -r /usr/local/apache-tomcat-5.5.23
sudo rm /usr/local/tomcat
sudo rm -r /Library/StartupItems/Tomcat
Note that this will also remove the webMathematica files from your computer, so backup /usr/local/tomcat/webapps/webMathematica before running the commands above.
-DMM