Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added a tip if tasksel fails

This how-to is an updated version of Peter DeitzDietz's installation guide. The purpose of this guide is to extend the ease and clarity of that instruction set to more modern installs.

...

Code Block
sudo apt-get install tasksel
sudo tasksel

Select the following packages

Code Block
[*] LAMP server
[*] PostgreSQL database
[*] Tomcat Java server

*** Don't forget to deselect any defaults!

Tip
titleIf tasksel fails with an aptitude (100) error

You can try executing the commands which tasksel would have executed as separate statements:

sudo tasksel install lamp-server

sudo tasksel install tomcat-server

sudo tasksel install postgresql-server

 

Install the Compile / Build tools

Code Block
sudo apt-get install ant maven2maven

Configure the Prerequisite Software

...

Code Block
sudo vi /etc/postgresql/9.3/main/pg_hba.conf

# Add this line to the configuration: 
	local all dspace md5
# Comment out any lines that have "peer" at the end of them
 
# When done, restart postgresql:
	sudo service postgresql restart

...

Code Block
sudo vi /etc/tomcat7/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"/>

Download and Install DSpace

...

Code Block
sudo mkdir /dspace

cd /dspace

Download the

...

Release

The source release allows you to customize every aspect of DSpace. This step downloads the compressed archive from SourceForge, and unpacks it in your current directory. The dspace-1.x.x-src-release directory is typically referred to as [dspace-src]. 

Code Block
sudo git clone https://github.com/DSpace/DSpace.git (apt-get install git if you don't already have it)
 
# Now, actually checkout the 4.2 codebase via the 'dspace-4.2' tag. There's two options, CHOOSE ONE
 
# Option #1: Checkout the official 'dspace-4.2' tag into a new local branch (which we've named "dspace-source")
cd
sudo git checkout -b dspace-source dspace-4.2

# Option #2: Just checkout the "dspace-4_x" maintenance branch. This will essentially include all the latest patches on 4.x
sudo git checkout dspace-4_x

Compile and Build DSpace

The source release that has been obtained is human readable source code, and must be compiled to machine code for the server to run it. "mvn package" compiles the source code, and "ant" will do all the work necessary to initialize the database with the DSpace schema, and copy all of the compiled machine code to a location where the web server can serve it. This will overwrite any existing installation of DSpace that you may have.

Info

make sure all your dependencies are in order, and you're running maven 3.x. (Check this version with mvn -v). If not, run these commands:

 
sudo apt-get install openjdk-7-jdkmaven
sudo apt-get install mavenremove maven2

Now run these:

Code Block
sudo apt-get remove maven2
Code Block
install openjdk-7-jdk
cd DSpace
sudo mvn package (this step takes a long time)
cd dspace/target/dspace-4.3-SNAPSHOT-build.dirinstaller
sudo ant fresh_install

Fix Tomcat permissions, and restart the Tomcat server

...