Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

tDAR development server configuration

1. Set shared environment

This is set once when the server is re-installed.

  1. SSH
    1. Deactivate the root login using ssh. The file to change /etc/ssh/sshd_config
    2. add scripts to allow access from home (Lee Rayonld)
  2. NX server installation and configuration
  3. Java
    1. sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin
    2. java -version
    3. Reference:
  4. PostgreSQL
  5. Put new users to sudoers list
    1. sudo adduser <username> admin

2. Set individual environment

The following work need to be down by each developer, from the client side or server side. 

For the client side, download NX client. 

  1. go to link:, then select "NX client Products"  for your own version (e.g., linux or windows, etc)

For server side:

  1. Set JAVA_HOME, add the following rows to /home/<your_user>/.bashrc, then, run "source .bashrc' to let them take effect
    1. export JAVA_HOME=/usr/lib/jvm/java-6-sun
    2. export PATH=$JAVA_HOME/bin:$PATH
  2. Set Eclipse
  3. Set Maven
  4. Check out source code, let the source codes are put at <tdar>, all the later commands should be under directory <tdar>
    1. Make fresh check out of the source code:
      1. svn co svn+ssh://<userid at the svn server>@<svnserver/svn directory> <local code position> (if in Eclipse using the maven plugin to checkout, you'll need to setup a private key first)
      2. in src/main/resources/ edit the following:
        1. copy & review to
        2. copy & review to
        3. edit to identify the proper location for the data store
      3. generate java class, by running "mvn complie" (most importantly to generate "LoadResourceTerms")
    2. initialize database, by running "mvn -P ant -D target=load-data"
      1. Note: to run this, need to installed java and maven, set JAVA_HOME, and M2_HOME
      2. Possible error: create-db:
              [sql] Executing commands
             [java] Could not find Make sure you have it in your classpath
        ResourceTerm cannot be found
      3. Note: sometimes you may need to change the database name when different developers are working in a same development server. In this case, follow instructions below (step 5.a) to change database name.
    3. mvn eclipse:eclispe (Function: to create .project file for eclipse project)
      1. mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true (With this option means when the source is not available, then download it)
      2. After run this command, add the following two lines into .bashrc, then run "source .bashrc"
        1. export M2_REPO=/home/<your_user>/.m2
          export PATH=$M2_REPO:$PATH
    4. on the server, edit the crowd permissions to allow you to use the Single SignOn:
      1. go to:
      2. login
      3. go to "applications" >
      4. in "remote addresses" add your IP address
    5. mvn jetty:run  (Function: to compile codes and start server)
      1. Note:, sometimes, you may need to change the running port when different developers are working in the same development server. In this case, follow instructions below (step 5.b) to change port number.
  5. Change database of running port (If you are not familiar with the codes, DO NOT do this)
    1. Change database: init-db.ant.xml and
      1. init-db.ant.xml <property name='' value='newdbname'/> , set the value='newdbname'
      2., change the line "hibernate.connection.url=jdbc:postgresql://localhost/newdbname"
    2. Change jetty port: file to change "pom.xml", see mvn jetty run port

3. Other optional commands/softwares

(1) sudo apt-get install subversion

(2) Protege


Table of Contents