This installation tutorial is written for Ubuntu 10.04 but should work for any Debian 32bit Linux distribution. It is currently being tested for Ubuntu version 12.04 LTS.
The installation instructions assumes the following:
- Basic knowledge of Linux commands, such as sudo, apt-get, wget
Overview
- Install and configure Java
- Downloading and compiling R from source
- Installing mysql, the java connector and dump sql file
- Using configure and make to compile ptolemyII
Installing & configuring Java
Some of the components in DEF requires Java.
- If not already installed, please install java and then
- add the location of library libjvm.so to the LD_LIBRARY_PATH (either in console or .bashrc file). It should look something similar to this:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/java-6-sun-1.6.0.26/jre/lib/amd64/server/libjvm.so
Installing R
Install dependency packages for R to allow compiling it from source code:
sudo apt-get build-dep r-base
Install GNU Multiple Precision bignum library which is required:
sudo apt-get install libgmp3-dev
Create a folder in your home directory called 'r_source':
cd ~
mkdir r_source
Download R source into the r_source folder, the minimum required version is 2.15.1.
cd r_source
wget http://cran.r-project.org/src/base/R-2/R-2.15.1.tar.gz
Extract the R-2.15.1.tar.gz file, configure to use shared libraries, compile, and install it:
tar xzvf R-2.15.1.tar.gz
./configure –enable-R-shlib
make
sudo make install
To make the R installation easy to run add the following lines to your .bashrc file:
echo export PATH=$PATH:/usr/local/lib/R/bin >> ~/.bashrc
echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/R/lib >> .bashrcsource ~/.bashrc
Start R as root:
sudo R
from within R, type the following to install rJava, KFAS, EvCombR, rccd from source
install.packages('rJava',,'http://rforge.net',type='source')
install.packages('KFAS')
install.packages('EvCombR')
furthermore install.packages('rccd')
if R doesn't allow the installation of rccd, one can manually download and install rccd
wget http://cran.r-project.org/src/contrib/rcdd_1.1-7.tar.gz
goto directory where rccd package has been downloaded and run
sudo R CMD INSTALL rcdd_1.1-7.tar.gz
From the package manager download the mysql server packages as well as the libmysql-java package.
Configure it with a desired user name (in this case we use def_user as username) and password
login and create databases def_gimbal / def_results
mysql -u def_user -p
mysql> create database def_gimbal;
mysql> create database def_results;
mysql> exit;
now it is time to import the database dumpfile.
Go to the trunk/mysql directory in the command line and then run this command:
mysql -u def_user -p def_gimbal < empty_gimball.sql
mysql -u def_user -p def_results < empty_results.sql
Now the mysql the mysql database is ready to be used by ptolemy
DEF [PTOLEMY II] Installation:
prerequisites:
java/javac 1.7.0 / 7
have autoconf and xsltproc installed
sudo apt-get install autoconf
sudo apt-get install xsltproc
download ptolemy:
in order to download the files from the repository use this command in the shell within the directory that you would like to install the DEF package from.
svn co https://bergelmir.iki.his.se/svn/def
Go to the ptII8.0.1 directory (found within trunk/ptolemyII folder).
set ptolemy II environmental variable
export PTII=<path to ptII8.0.1 directory>/
e.g. export PTII=/home/zak/umif/trunk/ptolemyII/ptII8.0.1/
Run autoconf
autoconf configure.in > configure
./configure –-with-R
it should automatically detect the R libs if you have set the R in the PATH correctly.
compile the ptolemy
make
Once it is compiled, you can run vergil which is located under the bin directory of the project compile.
add bin directory to path:
export PATH=$PATH:$PTII/bin/