Install the server stack (Tomcat, Postgres)
Code Block |
---|
sudo apt-get install tasksel
sudo tasksel
|
- Ensure the following packages are selected.
Code Block [*] LAMP server [*] PostgreSQL database [*] Tomcat Java server
Switch to using Sun/Oracle Java for better performance
Enable the Canonical Partners repository. This can be done in the GUI by going to Software Sources.
Code Block |
---|
sudo vi /etc/apt/sources.list
# Uncomment the line: deb |
...
http://archive.canonical.com/ubuntu |
...
maverick partner
sudo apt-get update
sudo apt-get install sun-java6-jdk sun-java6-plugin
sudo update-java-alternatives |
...
-l
# java-6-openjdk 1061 /usr/lib/jvm/java-6-openjdk
# java-6-sun 63 /usr/lib/jvm/java-6-sun
sudo update-java-alternatives |
...
-s java-6-sun
|
*Install the Compile / Build tools
Code Block |
---|
sudo apt-get install ant maven2 |
Create the database user and db
Code Block |
---|
sudo su postgres
createuser -U postgres -d -A -P dspace
exit
# Edit pg_hba.conf to allow the dspace user to login
sudo vi /etc/postgresql/8.4/main/pg_hba.conf
# Add the following line: local all dspace md5
sudo service postgresql restart
createdb \-U dspace \-E UNICODE dspace
|
Configure Tomcat to know about the DSpace webapps.
Code Block |
---|
sudo vi /etc/tomcat6/server.xml
# Insert the following chunk of text just above the closing </Host> |
...
<!-- Define a new context path for all DSpace web apps -->
<Context path="/xmlui" docBase="/dspace/webapps/xmlui" allowLinking="true"/>
<Context path="/sword" docBase="/dspace/webapps/sword" allowLinking="true"/>
<Context path="/oai" docBase="/dspace/webapps/oai" allowLinking="true"/>
<Context path="/jspui" docBase="/dspace/webapps/jspui" allowLinking="true"/>
<Context path="/lni" docBase="/dspace/webapps/lni" allowLinking="true"/>
<Context path="/solr" docBase="/dspace/webapps/solr" allowLinking="true"/>
|
Wiki Markup |
---|
Create the \[dspace\] directory. Default is /dspace |
Code Block |
---|
sudo mkdir /dspace
|
Download the Source Release
Code Block |
---|
wget http://sourceforge.net/projects/dspace/files/DSpace%20Stable/1.7.0/dspace-1.7.0-src-release.tar.bz2
tar -xvjf dspace-1.7.0-src-release.tar.bz2
|
Compile and Build DSpace
Code Block |
---|
cd dspace-1.7.0-src-release
mvn -U package
cd dspace/target/dspace-1.7.0-build.dir
sudo ant fresh_install
|
Fix tomcat permissions, and restart the server
Code Block |
---|
sudo chown tomcat6:tomcat6 /dspace -R
sudo service tomcat restart
|
Done, test it out in your browser:
...
...