Installing Tooltwist Prerequisites on Amazon AWS EC2 - tooltwist/documentation GitHub Wiki

#Installing Tooltwist Prerequisites on Amazon AWS EC2 Tooltwist requires at least the following prerequisites for it to run correctly. The installation of these prerequisites may vary depending on the version being installed or the version of Mac OSX running on your computer. This list will link to the installation instructions at the time of this writing. Please feel free to update the links when they become obsolete.

  1. Install Java
  2. Node and NPM
  3. Install Tooltwist CLI and Grunt CLI
  4. Install ImageMagick
  5. Check Ruby Installation
  6. Git

Install Java

Goto Java SE download site @ http://www.oracle.com/technetwork/java/javase/downloads/index.html. Under "Java Platform, Standard Edition" ⇒ "Java SE 8ux" ⇒ Click the "JDK Download" button ⇒ Check "Accept License Agreement" ⇒ Choose your operating platform, e.g., Linux x64(jdk-8u73-linux-x64.tar.gz).

Note: Download the tar.gz version of the installer. This will allow more flexibility on where the JDK will be installed. Also, substitute the version number with the one you will be downloading. These examples will download the 8u73-b02 version of the JDK.

Right-click on the download link and copy the link address. e.g. http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz

Then download the installer using wget.

# cd
# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"  http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.tar.gz

After the installer is downloaded, decompress it into the /opt folder.

# cd /opt
# tar -xzvf  ~/jdk-8u73-linux-x64.tar.gz

Create a soft link so that the JDK is always accessible as /opt/java

# ln -s jdk1.8.0_73 java

Add Java bin paths to the PATH environment variable to allow the Java executable to be found. To accomplish this, add a java.sh script to profile.d

# cd /etc/profile.d
# vi java.sh

Add the Java Paths into the java.sh script while it is open using vi

#!/bin/bash
export JAVA_HOME=/opt/java
export JRE_HOME=/opt/java/jre
export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin

Simply logout and log back in for the changes to take effect.

To verify your installation, issue these commands on the console:

// Check the version of "javac" (Java Compiler) and "java" (Java Runtime)
$ javac -version
javac 1.x.x_xx

$ java -version
java version "1.x.x_xx"
Java(TM) SE Runtime Environment (build 1.x.x_xx-xxx)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)

// Find the location of programs "javac" (Java Compiler) and "java" (Java Runtime)
$ which javac
/usr/bin/javac

$ which java
/usr/bin/java

Install Node and NPM

An Enterprise Linux and Fedora NodeJS installer has been created by the NodeJS team. The steps to install it are very straightforward. Simply go to: Enterprise Linux and Fedora

Make sure to install:

  • The latest LTS version (not the stable)
  • The optional build tools (will be used for native modules)

Note: Unless you have a very good reason to use the latest stable version, the LTS version is the version of NodeJS that will be receiving support for a longer term, thus your applications will remain working on that version longer than when you are using the stable releases which may change more frequently thus may increase the risk of some parts of your application breaking.

To verify your installation, issue these commands on the console:

$ npm -v
2.14.20
$ node -v
v4.4.0

Install Tooltwist CLI and Grunt CLI

Tooltwist CLI and Grunt CLI are being used when building Tooltwist on the server. Simply run the following commands to install them:

$ sudo npm install -g tooltwist grunt-cli

Install ImageMagick

Tooltwist uses ImageMagick for generating images when building the project. Just run the following commands to install it:

$ sudo yum install -y ImageMagick ImageMagick-devel gcc-c++ make

Check Ruby Installation

Ruby is used by tooltwist for some scripts used pushing changes to the repository and for checking the changes done to files. By default Ruby is installed in Amazon Linux. Just run the following command to check what version is installed:

$ ruby -v
ruby 2.0.0p648 (2015-12-16) [x86_64-linux]

If you see Ruby version 1.9 or higher, you're good to go.

Install Git

Git is the preferred source control system we are using for most if not all Tooltwist projects. The installation is quite straightforward. The git installer is available at: Download for Linux and Unix. Follow the steps there to install git on Fedora.