Skip to content

Instantly share code, notes, and snippets.

@alanorth
Last active March 22, 2018 22:01

Revisions

  1. alanorth revised this gist Mar 22, 2018. No changes.
  2. alanorth revised this gist Mar 22, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions mirage2-ubuntu18.04.md
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,8 @@ Make sure the following dependencies are installed on the system (required by th
    $ 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

    *N.B. list required RVM system dependencies by installing with autolibs in read-fail mode: $ \curl -sSL https://get.rvm.io | bash -s -- stable --ruby --autolibs=read-fail*

    Then install RVM:

    $ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
  3. alanorth created this gist Mar 22, 2018.
    36 changes: 36 additions & 0 deletions mirage2-ubuntu18.04.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,36 @@
    # Build Environment for Mirage 2 on Ubuntu 18.04
    *My earlier [notes for 16.04](https://gist.github.com/alanorth/2cf9c15834dc68a514262fcb04004cb0) basically work fine on Ubuntu 18.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](https://getbootstrap.com/) framework it needs a few NodeJS and Ruby packages to be available in the build environment.

    We build and deploy DSpace from the `tomcat8` 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 `tomcat8` user must be able to write to its home folder (`/var/lib/tomcat8`) so it can create the `~/.nvm`, `~/.npm`, `~/.rvm`, `~/.gnupg` and other directories during installation
    - The `~tomcat8/.profile` file *must exist* and be writable before installing `nvm` and `rvm`, as this is the default config file for login shells, ie `sudo su - tomcat8`. These tools will append lines to those files to setup their environments on login.

    This setup is based on the [documentation](https://github.com/DSpace/DSpace/tree/dspace-5_x/dspace-xmlui-mirage2) that shipped with Mirage 2 in DSpace 5.

    ## Node Version Manager (NVM)

    $ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/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

    ## Ruby Version Manager (RVM)
    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://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
    $ \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