tDAR development server configuration
1. Set shared environment
This is set once when the server is re-installed.
- SSH
- Deactivate the root login using ssh. The file to change /etc/ssh/sshd_config
- add scripts to allow access from home (Lee Rayonld)
- NX server installation and configuration
- Java
- sudo apt-get install sun-java6-jre sun-java6-jdk sun-java6-plugin
- java -version
- Reference: http://www.javadesign.info/SystemsHardware/OS/Ubuntu/install-java-on-ubuntu
- PostgreSQL
- Put new users to sudoers list
- 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.
- go to link: http://www.nomachine.com/download.php, then select "NX client Products" for your own version (e.g., linux or windows, etc)
For server side:
- Set JAVA_HOME, add the following rows to /home/<your_user>/.bashrc, then, run "source .bashrc' to let them take effect
- export JAVA_HOME=/usr/lib/jvm/java-6-sun
- export PATH=$JAVA_HOME/bin:$PATH
- Set Eclipse
- Set Maven
- Check out source code, let the source codes are put at <tdar>, all the later commands should be under directory <tdar>
- Make fresh check out of the source code:
- 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)
- in src/main/resources/ edit the following:
- copy & review hibernate.properties.template to hibernate.properties
- copy & review crowd.properties.template to crowd.properties
- edit tdar.properties to identify the proper location for the data store
- generate java class, by running "mvn complie" (most importantly to generate "LoadResourceTerms")
- initialize database, by running "mvn -P ant -D target=load-data"
- Note: to run this, need to installed java and maven, set JAVA_HOME, and M2_HOME
- Possible error: create-db:
[sql] Executing commands
[java] Could not find org.tdar.search.LoadResourceTerms. Make sure you have it in your classpath
ResourceTerm cannot be found - 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.
- mvn eclipse:eclispe (Function: to create .project file for eclipse project)
- mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true (With this option means when the source is not available, then download it)
- After run this command, add the following two lines into .bashrc, then run "source .bashrc"
- export M2_REPO=/home/<your_user>/.m2
export PATH=$M2_REPO:$PATH
- export M2_REPO=/home/<your_user>/.m2
- on the server, edit the crowd permissions to allow you to use the Single SignOn:
- go to: http://dev.tdar.org/crowd
- login
- go to "applications" > tdar.dev
- in "remote addresses" add your IP address
- mvn jetty:run (Function: to compile codes and start server)
- 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.
- Make fresh check out of the source code:
- Change database of running port (If you are not familiar with the codes, DO NOT do this)
- Change database: init-db.ant.xml and hibernate.properties.
- init-db.ant.xml <property name='tdar.db.name' value='newdbname'/> , set the value='newdbname'
- hibernate.properties, change the line "hibernate.connection.url=jdbc:postgresql://localhost/newdbname"
- Change jetty port: file to change "pom.xml", see mvn jetty run port
- Change database: init-db.ant.xml and hibernate.properties.
3. Other optional commands/softwares
(1) sudo apt-get install subversion
(2) Protege
...
Table of Contents |
---|