My earlier notes for 14.04 basically work fine on Ubuntu 16.04 but I've corrected and improved a few things in this version.
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 the Bootstrap framework it needs a few NodeJS and Ruby packages to be available in the build environment.
We build and deploy DSpace from the tomcat7 system 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
tomcat7user must be able to write to its home folder —/usr/share/tomcat7— so it can create the~/.nvm,~/.npm,~/.rvm,~/.gnupgand other directories during installation - The
~tomcat7/.profilefile must exist and be writable before installingnvmandrvm, as this is the default config file for login shells, iesudo 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.
$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
After the intstallation is finished, close and re-open your shell to activate NVM. Then install NodeJS v8 and use npm to install the DSpace dependencies:
$ nvm install v8
$ npm install -g bower grunt grunt-cli
Make sure the following dependencies are installed on the system (required by the Ruby build process):
$ sudo apt update
$ sudo apt 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 libgmp-dev
Then install RVM:
$ gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
After the intstallation is finished, close and re-open your shell to activate RVM. Then use gem to install the DSpace dependencies:
$ gem install sass -v 3.3.14
$ gem install compass -v 1.0.3
Instructions adapted to Ubuntu 18.04-LTS (WIP)