Contents |
I had to set up a second DSpace instance that was a mirror of the original
at the time the copy was made, so following is a relatively step-by-step
procedure for setting up an identical DSpace instance. I called my second
instance dspace-test, but as long as you maintain the same name in your
config file and rename the .war files the same way, any name will do. All
instances run under the same user as the original dspace, and all instances
use one instance of PostGreSQL.
1. Do the following as root until told otherwise
• sudo bash |
2. Copy dspace-source/config/dspace.cfg to dspace-test.cfg
• cd dspace/src/dspace-1.3.2-source/config |
3. Edit all references of /dspace to /dspace-test
• nano dspace-test.cfg |
4. Make the dspace-test directory
• mkdir /dspace-test/ |
5. Own the dspace-test directory to user dspace
• chown dspace /dspace-test/ |
6. Change to user dspace
• su dspace bash |
7. Create the dspace-test database, owned by the dspace user (Note: this step can be done with a GUI tool such as PGAdminIII, this step is also not necessary, but if a database isn't created, you will receive lots of errors when you run the fresh_install)
• cd /usr/lib/postgresql/8.1 |
8. Add the new database to pg_hba.conf so dspace can connect (as root)
• exit (changes back to user root)
|
9. Shutdown Tomcat
• /etc/init.d/tomcat5 stop |
10. Change to the dspace-source directory
• cd /dspace/src/dspace-1.3.2-source/ |
11. Do a fresh install using the appropriate config file
• ant clean |
12. Copy the dspace-source/config/dspace-test.cfg file to /dspace-test/config/dspace.cfg
• cp config/dspace-test.cfg /dspace-test/config/dspace.cfg |
13. Change to the dspace-source/build directory and rename the WARs
• cd build |
14. Copy the new WAR files to tomcat/webapps and ensure they are there
• cp ./*.war /var/lib/tomcat5/webapps/ |
15. Copy the dspace assetstore to dspace-test
• cp --Rv /dspace/assetstore/ /dspace-test/ |
16. Restart Tomcat
• /etc/init.d/tomcat5 start |
17. Copy the dspace database to dspace-test
• su dspace bash |
• /dspace-test/bin/index-all |
19. Copy news-side.html and news-top.html so the homepage contains the same information
• cp /dspace/config/*.html /dspace-test/config/ |
Yes. With initial advice from others here I've set up a developers'
environment on an old server to support multiple independent DSpace
instances, so that several of us can tinker without stepping on each
others' work. For a user with OS username USERNAME:
Its all a matter of configuration, you need to setup a
separate postgres database, and generate a new separate root dspace
implementation and dspace war file.
For instance, if you have dspace setup as
DSpace Database Name: dspace |
Your second configuration would need to be something like (you may
want a more obvious replacement for "dspace2":
DSpace Database Name: dspace2 |
To attain this currently, the best thing to do is to start with your
original DSpace source directory and copy/change the configuration
(are you running dspace as a "dspace" user or "tomcat4" user? I'd
recommend tomcat4, while others would suggest making a separate
dspace user. My issue, instead of running multiple tomcats, we want
to run just one, Just like the configuration for Apache HTTPD, its
best to run the Tomcat engine under its own user.
1.) You'll want to create a new database:
createuser -U postgres -d -A -P dspace2 |
2.) As Robert says, the build script can do this for you if you
maintain separate dspace.cfg files for each location. For instance,
heres a config with all the changes for "dspace2"
#
|
3.) You'd then run:
ant clean |
and then run something like
ant -Dconfig=/<yourinstalldir>/config/dspace2.cfg fresh_install |
Note, these are very rough directions, approach with caution and on a
test system first to make sure all is as you would like in production.
This works no problem, I was running 4 or 5 different DSpaces on one
Tomcat. Just make sure each instance has a separate install dir (esp.
assetstore) and PostgreSQL database configured. Then just drop the
.war files in tomcat/webapps, and you're away.
One caveat – if you're building the instances off a single source
tree, be sure to do an 'ant clean' before each build/deploy, otherwise
the location of the dspace.cfg to use (stuffed away in the .war
WE-INF/web.xml file) might be wrong.