Hi txs:

We needed the same. After some research and testing, I could work it
out. Here is how (not necessarily the only way):

Context:
We have 1 instance of tomcat. Every new dspace instance is running as a
different webapp, ie, with different names.

1) Create new dspace databases:
$ createdb -U postgres -E UNICODE -O dspace dspace-1
$ createdb -U postgres -E UNICODE -O dspace dspace-2
$ createdb -U postgres -E UNICODE -O dspace dspace-3

2) Create new dspace source directories:
$ mkdir /srv/dspace-1
$ mkdir /srv/dspace-2
$ mkdir /srv/dspace-3

3) Create new dspace config files:
$ cp [dspace-source-dir]/config/dspace.cfg
[dspace-source-dir]/config/dspace-1.cfg
$ cp [dspace-source-dir]/config/dspace.cfg
[dspace-source-dir]/config/dspace-2.cfg
$ cp [dspace-source-dir]/config/dspace.cfg
[dspace-source-dir]/config/dspace-3.cfg

Edit each config file, change the following (using the first instance as
an example):
dspace.dir = /srv/dspace-1
dspace.url = http://your-dspace-url:80/jspui-1
db.url = jdbc:postgresql://localhost:5432/dspace-1

4) Create dspace instances, using ant:
$ ant -Dconfig=[dspace-source-dir]/config/dspace-1.cfg fresh_install
$ ant -Dconfig=[dspace-source-dir]/config/dspace-2.cfg fresh_install
$ ant -Dconfig=[dspace-source-dir]/config/dspace-3.cfg fresh_install

5) Create administrator accounts:
$ /srv/dspace-1/bin/create-administrator
$ /srv/dspace-2/bin/create-administrator
$ /srv/dspace-3/bin/create-administrator

6) Include each dspace instance in Tomcat server.xml
Edit /usr/local/tomcat/conf/server.xml.
Include the following in <host> tag:

<Context path="/jspui-1" docBase="/srv/dspace-1/webapps/jspui/"
debug="0" reloadable="true" cachingAllowed="false" allowLinking="true"/>

<Context path="/jspui-2" docBase="/srv/dspace-2/webapps/jspui/"
debug="0" reloadable="true" cachingAllowed="false" allowLinking="true"/>

<Context path="/jspui-3" docBase="/srv/dspace-3/webapps/jspui/"
debug="0" reloadable="true" cachingAllowed="false" allowLinking="true"/>

Regards,
Alvaro

PS: There is another way: running multiples intances of Tomcat, one for
each dspace instance. This option is too expensive in CPU.
Check this URL for this option: http://www.linuxjournal.com/article/8561


El mar, 19-08-2008 a las 12:05 -0400, Tebota escribió:
> I need to work with two separated instances of Dspace. The first
> installation was clean and without problems, but the second it isn't,
> because I need to get a different instance of DB. The mvn package
> command worked fine, but when I run the ant fresh_install command,
> gives an error saying that there is no DB named dspace (I'm running it
> on a test server, that doesn't have any dspace installed). I changed
> the line that gives acces to postgres url and ports on dspace.cfg (it
> was like db.url = jdbc:postgresql://localhost:5432/dspace and changed
> it for db.url = jdbc:postgresql://localhost:5432/newdbname) but it
> didn't work
> 
> Where can I find the correct variable to change the DB name? or it's
> impossible to do that?
> 
> txs 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________ DSpace-tech mailing list 
> DSpace-tech@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
-- 
Álvaro Sandoval
BCN, Biblioteca del Congreso Nacional
Servicios Digitales. Ingeniería y Desarrollo
Fono: (56-32) 226 3981. Fax: (56-32) 226 3973
www.bcn.cl


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to