Installing

Prerequisites

Note

This Prerequisites section only applies to Linux/Unix/OS X operating systems

Install Java

Download and install Java JDK 1.8 (either Oracle or OpenJDK).

Verify Java Version

Ensure that you are running Java 1.8. To check, run the following command at the command prompt and make sure that the version displayed is Java 1.8:

java -version

The command above should output something like this:

java version "1.8.0_91"

Verify JAVA_HOME environment variable is set correctly

Make sure that you have a JAVA_HOME environment variable that points to the root of the JDK install directory. To check the value set for JAVA_HOME, enter the following command at the command prompt:

env | grep JAVA_HOME

How to set the JAVA_HOME environment variable

To set JAVA_HOME on a Unix/Linux System

  • Korn and bash shells:

    export JAVA_HOME=jdk-install-dir
    export PATH=$JAVA_HOME/bin:$PATH
    
  • Bourne shell:

    JAVA_HOME=jdk-install-dir
    export JAVA_HOME
    PATH=$JAVA_HOME/bin:$PATH
    export PATH
    
  • C shell:

    setenv JAVA_HOME jdk-install-dir
    setenv PATH $JAVA_HOME/bin:$PATH
    export PATH=$JAVA_HOME/bin:$PATH
    

OS X extra prerequisite

For OS X users, the latest openssl formula needs to be installed via homebrew:

brew install openssl

Linux prerequisite

  1. For Linux users, some of the scripts uses lsof. Please note that some Linux distributions does not come with lsof pre-installed and so, may need to be installed.

    To install lsof for Debian-based Linux distros: apt-get install lsof

    To install lsof for RedHat-based Linux distros: yum install lsof

  2. The library libncurses5 is required for running the restore script. You may get the following error when running the restore script without the libncurses5 library installed:

    error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

    To install the library libncurses5, use the following commands:

    On Debian-based Linux distros: sudo apt-get install libncurses5-dev libncursesw5-dev

    On RHEL, CentOS: sudo yum install ncurses-devel

    On Fedora 22 and newer version: sudo dnf install ncurses-devel


To Install a Production Environment

To install a production environment setup, see the section on Setting up a Crafter CMS production environment Setting up a Crafter CMS production environment

To Install a Development Environment

To install a development environment, see the section on installing Crafter CMS from the zip download, the section on installing Crafter CMS from archive built by the Gradle environment builder or running Crafter CMS in a Docker container in the Quick Start Guide.

To learn more about the developer workflow, see Introduction to the Developer Workflow with Crafter CMS.