Archived / Obsolete Documentation

Documentation in this space is no longer accurate.
Looking for official DSpace documentation? See all documentation

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Dependencies for DSpace:

  • Tomcat
  • Postgres
  • Java 7


Dependencies for a development environment

  • Tomcat
  • Postgres
  • Java 7
  • Git (to download dspace-source)
  • Maven (to compile DSpace - part 1)
  • Ant (to compile DSpace - part 2)
  • IntelliJ (Optional: to edit code)
  • pgAdmin3 (Optional: to run queries against postgres)


The process below is an efficient way of setting this all up on OSX. This guide was compiled on May 7, 2014, using a new MacBook Pro, running OSX 10.9 (Maverick), and grabbing the latest DSpace, something like DSpace 4.x or DSpace 5.x. There’s no one-click installer, so some command-line proficiency is required.


Install: brew, follow instructions from http://brew.sh

brew doctor
brew update
brew install git
brew install maven ant


Download and Install Java 7 JDK, this step should be done before installing tomcat, and IntelliJ: http://www.oracle.com/technetwork/java/javase/downloads/index.html


Configure JAVA_HOME for Java 7

vi ~/.bash_profile

Add:

export JAVA_HOME=$(/usr/libexec/java_home -v 1.7)


brew install tomcat tomcat-native


Install the IDE IntelliJ Ultimate, either start the trial, or use/buy a license. DSpace Committers have access to an “Open Source Project License”, hoorah JetBrains!


Install postgres.app from: http://postgresapp.com/


Once installed, click the taskbar elephant, and “open psql”, psql is the command-line-interface for Postgres. You can create database user, create database, or perhaps for future tasks, run direct SQL queries against DSpace. I would recommend pgadmin3, for a better query-environment.


The SQL to make the Postgres database-user is:

CREATE ROLE dspace with SUPERUSER LOGIN PASSWORD 'dspace';


The SQL to make the Postgres database is:

create database "dspace" with owner = dspace encoding='utf8' tablespace=pg_default lc_collate = 'C' lc_ctype='en_US.UTF-8' template template0;


“\q” gets you out of PSQL.




Tell tomcat that tomcat-native is installed.

vi /usr/local/Cellar/tomcat/7.0.53/libexec/bin/setenv.sh

Add:

CATALINA_OPTS="$CATALINA_OPTS -Djava.library.path=/usr/local/Cellar/tomcat-native/1.1.30/lib"


Edit your tomcat server.xml config, to let it know about the DSpace webapps that will be there.

vi /usr/local/Cellar/tomcat/7.0.53/libexec/conf/server.xml


After the line:

     <Host name="localhost"  appBase="webapps"

           unpackWARs="true" autoDeploy="true">


Add the following lines:

<!-- 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"/>
<Context path="/rest" docBase="/dspace/webapps/rest" allowLinking="true"/>


Clone DSpace from GitHub, to your Projects directory, and begin the compile process.

cd ~
mkdir Projects
cd ~/Projects
git clone https://github.com/DSpace/DSpace.git
cd DSpace
mvn package
cd dspace/target/dspace-installer/
ant fresh_install

Note

Be cautious about running fresh_install. This is only for a new computer setup. Do not run fresh install if you are doing anything other than a fresh install of DSpace, i.e. you are upgrading, or already have existing data in your DSpace database, it will ruin that existing data.

 


Make an admin account for your DSpace:

/dspace/bin/dspace create-administrator


Start tomcat, and visit a DSpace webapp in your browser.

catalina start
open http://localhost:8080/xmlui

PRO-Tips:

Mail Catcher for to view emails on localhost

For development, send all emails to “mailcatcher”, a dummy email account, that runs on localhost, so that real emails don’t get sent out to real people.

edit build.properties (then recompile maven+ant), or edit /dspace/config/dspace.cfg:

# SMTP mail server
mail.server = localhost
# SMTP mail server alternate port (defaults to 25)
mail.server.port = 1025


If your doing anything ruby/gem/rails on your computer, you’ll likely want to use RVM anyways.

\curl -sSL https://get.rvm.io | bash -s stable --ruby


Then install mailcatcher gem

gem install mailcatcher


Then to start mailcatcher:

mailcatcher


Starting MailCatcher

==> smtp://127.0.0.1:1025

==> http://127.0.0.1:1080

*** MailCatcher runs as a daemon by default. Go to the web interface to quit.


Once configured, you can view your “inbox”, for outgoing messages from DSpace in your browser at http://localhost:1080

  • No labels