Standalone installation - Dependencies

Dependencies - Before installation

Before installing JAQPOT3 you need to install and set up the following :

  1. MySQL server
  2. Java Virtual Machine
  3. Maven2
  4. Git

Installation of MySQL5 server and client on Ubuntu is done using the repositories; we only need to install the packages mysql-server and mysql-client. Using aptitude, this is done with the command:

$ sudo apt-get install mysql-server mysql-client

Start the database server using:

$ sudo /etc/init.d/mysql stop
$ sudo /etc/init.d/mysql start

And check that the server is indeed running using:

$ sudo netstat -tapn | grep mysql

You should be able to see something like the following:

tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN     
1630/mysqld

Notice here that the SQL server is up and accepts connections on port 3306. Once you have installed mysql, you need to add a  root account and an account that will be used by JAQPOT3 to connect to the database. The root account is created using the command:

$ sudo mysqladmin -u root -h localhost password 'mypassword'

You can now use the root account to connect to the mysql database server. Type:

$ mysql -u root -p

and you will be prompted to enter the root password. You should then be able to see the mysql console. Create a privileged user using the command (assume that the username is jaqpot and the password is s3cret):

mysql> CREATE USER 'jaqpot'@'localhost' IDENTIFIED BY 's3cret';

and

mysql> GRANT ALL PRIVILEGES ON *.* TO 'jaqpot'@'localhost' WITH GRANT OPTION;

You can now logout and login again using the above mentioned credentials. You should now create the database that will be used by JAQPOT3. Run the following:

$ wget https://github.com/alphaville/ToxOtis/raw/master/ToxOtis-db/src/main/resources/databaseCreation.sql --no-check-certificate
$ mysql -u username -p < databaseCreation.sql

This will create a new database named 'toxotisdb' which will be used by JAQPOT3 to save tasks, models and other information.

Finally you should consider configuring/optimizing your MySQL server. The configuration file is usually located at /etc/mysql/my.cnf. In my opinion, this is an interesting discussion on MySQL configuration.

As a second step you will need to install Maven. For that use the command:

$ sudo apt-get install maven2

You now need to configure your installation and define some Jaqpot3-specific parameters. In particular you need to modify the file settings.xml which is located in the folder ~/.m2/. In case it does not exist you need to create it:

$ touch ~/.m2/settings.xml

This file contains global system-wide settings that will be used by maven. In this you should create a profile and include the following properties:

  1. Domain Name: jaqpot_domain. An assigned domain name for the running services. You can use localhost or your server's IP if no domain name is available.
  2. The database name: jaqpot.database.name. By default set to toxotisdb unless you know what you're doing.
  3. MySQL server port: jaqpot.database.mysqlport. Usually this is 3306.
  4. Database account credentials: jaqpot.database.user and jaqpot.database.password.
  5. Whether you need your services protected with A&A: jaqpot.doAuthentication (admissible values are true and false)
  6. If available, define your GA account ID: google-analytics.

An example file can be found here.

You now only need to download sun-java6-jdk and git. Simply run:

$ sudo apt-get install sun-java6-jdk git-core

Export the JAVA_HOME variable properly. For example:

$ export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.24/;

You are now ready to proceed with the installation of JAQPOT3.