This how-to is an updated version of Peter Dietz's installation guide. The purpose of this guide is to extend the ease and clarity of that instruction set to more modern installs.
This install is based on Ubuntu 14.04.1 LTS Server.
Make sure your sources are up to date before beginning
Install the server stack of Tomcat (web server) and PostgreSQL (database)
Select the following packages
*** Don't forget to deselect any defaults!
If 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
Configure the Prerequisite Software
Create the database user (dspace)
- At this point, you will be asked to enter a password. Make it secure and remember it.
- You will also be prompted as to whether or not this user should be able to create other users. This should be no.
Allow the database user (dspace) to connect to the database
Create the DSpace Database
Configure Tomcat to know about the DSpace webapps.
Download and Install DSpace
Create the [dspace] directory.
The [dspace] directory is where the running dspace code will reside.
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].
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.
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 maven
sudo apt-get remove maven2
Now run these:
Fix Tomcat permissions, and restart the Tomcat server
This guide follows the convention where the tomcat user will own all of the files in [dspace], so we have to change the owner of the files to tomcat7. Restarting tomcat will deploy the dspace webapps that are now ready to be viewed.
Test it out in your browser
That is all that is required to install DSpace on Ubuntu. There are two main webapps that provide a similar turn-key repository interface