You need to specify the ramadda home directory. This is where it looks for properties files and other resources, where the java derby database is stored and where any uploaded data files are stored.
By default ramadda will use:
<tomcat home>/.unidata/repositoryi.e., the home directory of the process that runs tomcat.
You can override this a number of ways. What ramadda does is look for the property: ramadda_home in a variety of places, in precedence:
<param-value>-Dramadda_home=/home/dir</param-value>
The problem with this is you have to unjar the war and change the web.xml. Then, when you install a
new release you have to repeat the process.
-Dramadda_home=/home/dire.g.:
java -Xmx512m -Dramadda_home=/home/dir
ramadda_home=/home/dir
To run RAMADDA run the ramadda.sh. This just does:
java -Xmx512m -jar repository.jarBy default the server is on port 8080. To change the port do:
java -Xmx512m -jar repository.jar -port <some port>
RAMADDA creates a local storage directory in:<home dir>/.unidata/repositoryTo change this do:
java -Xmx512m -jar repository.jar -Dramadda_home=/home/dir
The major thing you want to change would be the database.
By default RAMADDA uses a local Java Derby database. RAMADDA also runs using mysql and postgres (though the postgres hasn't been test in a while). To define the database just define one of the ramadda.db properties in repository.properties:
ramadda.db=derby #ramadda.db=mysql #ramadda.db=postgresThe mysql database and user/password is defined in the repository.properties file. To change it add to the repository.properties file the following:
ramadda.db.mysql.url=jdbc:mysql://localhost:3306/repository?zeroDateTimeBehavior=convertToNull ramadda.db.mysql.user=the database user ramadda.db.mysql.password=the database password
Then, reconfigure RAMADDA to point to the new database and login again. Note: you'll have to add a new admin password, etc. Then go to the Admin->SQL page. If you saved the SQL file on the server then just enter:
file:/path/to/sql/filein the text area and hit execute.
If you have the SQL file on your local machine upload through the sql file form.
Its probably best to shutdown and then restart RAMADDA after doing this and you should have your old database running in the new RAMADDA.
If you changed systems then you also need to copy over the storage directory tree to the new system. This is in:
<ramadda_home>/storage
lib/repositorylib.jar lib/repositorytds.jarTo compile stand-alone (e.g., using javac) put those 2 jar files in your class path.
To compile using ant:
The default ant target (all) will compile the repository source and create:
lib/repository.jar lib/repository.warYou can run the repository stand-alone by doing:
java -jar repository.jarAll of the services except OpenDAP are available stand-alone.
The repository.war is a tomcat war file that needs to be placed in the tomcat install area.