Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Setting up a CentOS VM to run the CEDAR Template Server

Martin O'Connor edited this page Jan 26, 2016 · 6 revisions

Currently we have cedar-dev1.stanford.edu and cedar-dev2.stanford.edu.

Ports 80, 443, 8888, and 8890 are open to the world.

(1) Remotely copy Java JDK RPM to machine:

  rsync -ave ssh  jdk-8u60-linux-x64.rpm <SUNetID>@cedar-dev1.stanford.edu:~

(2) Log on an install Java with rpm:

  sudo rpm -Uvh jdk-8u60-linux-x64.rpm

This will install it in /usr/java/jdk1.8.0_60.

(3) Configure it with alternatives:

  sudo alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_60/jre/bin/java 1

Where 1 is the number of the alternative. (Assuming here that it is the only JDK.)

To see what the alternatives there are:

  sudo alternatives --config java

To test that Java installed correctly:

  java -version

Add JAVA_HOME to .bashrc:

  export JAVA_HOME=/usr/java/jdk1.8.0_60/

(4) Install Git:

  sudo yum install git-all

(5) Install Maven:

  sudo yum install -y apache-maven
  mvn --version

(6) Make a CEDAR workspace directory:

  mkdir ~/workspace/cedar

(7) Clone the server:

  cd ~/workspace/cedar
  git clone https://<GitHubUsername>@github.com/metadatacenter/cedar-template-server.git

(8) Install MongoDB:

Create /etc/yum.repos.d/mongodb.repo and add following:

  [mongodb]
  name=MongoDB Repository
  baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
  gpgcheck=0
  enabled=1

Then install:

  sudo yum -y install mongodb-org mongodb-org-server

Log files will be here:

  vi /var/log/mongodb/mongod.log

Configuration file here:

  /etc/mongod.conf

Edit configuration file to use small journaling files:

  smallfiles=true

Start the server:

  sudo service mongod start

Command line to interact with server:

  mongo

(9) Run CEDAR Template Server:

  mvn play2:run -Dplay2.httpPort=8888
Clone this wiki locally