Skip to content

Instantly share code, notes, and snippets.

@alanorth
Last active September 29, 2015 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alanorth/3f758370661d181b6ad6 to your computer and use it in GitHub Desktop.
Save alanorth/3f758370661d181b6ad6 to your computer and use it in GitHub Desktop.
Preparing the build environment for DSpace 5 Mirage 2 on Ubuntu

Build Environment For Mirage 2

DSpace 5's Mirage 2 requires some extra setup if you want to tweak the base config and rebuild it. As Mirage 2 is based on Bootsrap it needs a few nodejs and ruby packages to be available in the build environment.

We build and deploy DSpace from the tomcat7 user (which is the default user for Tomcat on Ubuntu), and there are a few assumptions that must be met to allow the installation of nodejs and ruby:

  • The tomcat7 user must be able to write to its home folder—/usr/share/tomcat7—so it can create the ~/.nvm, ~/.npm, ~/.rvm, ~/.gnupg and other directories during installation
  • The ~tomcat7/.profile file must exist and be writable before installing nvm and rvm, as this is the default rc file for login shells, ie sudo su - tomcat7. These tools will append lines to those files to setup their environments on login.

This setup is based on the documentation that shipped with Mirage 2 in DSpace 5.

NVM (For NodeJS)

$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.27.1/install.sh | bash
$ nvm install 0.10.31
$ nvm alias default 0.10.31
$ npm install -g bower
$ npm install -g grunt && npm install -g grunt-cli

RVM (For Ruby)

Make sure the following dependencies are installed on the system (required by the ruby build process):

$ sudo apt-get install libyaml-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev gawk g++ libreadline6-dev zlib1g-dev libssl-dev libsqlite3-dev

Then install rvm:

$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | bash -s stable --ruby
$ gem install sass -v 3.3.14
$ gem install compass -v 1.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment