Giter Site home page Giter Site logo

policycompass-fcmmanager's Introduction

Policy Compass FCM Manager Service

Requirements

Install Java

  • If you currently do not have java, you can download it quite easily with apt-get.
  sudo apt-get install default-jdk

Install Tomcat

  • To download tomcat from their site, copy the link for the tar.gz package under the “Core” section and begin the download. You will get a link that originates from one of Apache’s many mirrors, making the command look mostly like this (although coming from a different site).
  wget http://mirror.vorboss.net/apache/tomcat/tomcat-7/v7.0.55/bin/apache-tomcat-7.0.55.tar.gz

After the download completes, untar the file.

  tar xvzf apache-tomcat-7.0.55.tar.gz

Finish up the Tomcat installation by moving the files to a convenient directory.

  sudo mv apache-tomcat-7.0.55  /usr/share/

Configure .bashrc

Before editing the .bashrc file in your home directory, we need to find the path where Java has been installed to set the JAVA_HOME environment variable. Let's use the following command to do that:

  update-alternatives --config java

The complete path displayed by this command is: /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java

The value for JAVA_HOME is everything before /jre/bin/java in the above path - in this case, /usr/lib/jvm/java-7-openjdk-amd64. Make a note of this as we'll be using this value in this step and in one other step.

In order to start Tomcat, we need to add it as an environment variable in the /.bashrc file.

  sudo gedit ~/.bashrc

You can add this information to the end of the file:

  export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
  export CATALINA_HOME=/usr/share/apache-tomcat-7.0.55

After saving and closing the .bashrc file, execute the following command so that your system recognizes the newly created environment variables:

  source ~/.bashrc

The final step is to activate Tomcat by running its startup script:

  $CATALINA_HOME/bin/startup.sh

You can visually verify that Tomcat is working by accessing your server page at http://localhost:8080.

Install Maven

  sudo apt-get install maven

Install PostgreSQL

  sudo apt-get install postgresql

Create a postgres user and a database

  sudo -u postgres createuser pcompass -W
  sudo -u postgres createdb pcompass --owner pcompass

FCM Manager Web Service Installation

  • Clone the repository
  git clone [email protected]:policycompass/policycompass-fcmmanager.git
  cd policycompass-fcmmanager
  • Edit the Database settings according to your needs
  cp src/main/resources/hibernate.cfg.template.xml src/main/resources/hibernate.cfg.xml
  gedit src/main/resources/hibernate.cfg.xml
  • Create WAR file
  mvn clean install

Load sample data

http://localhost:8080/api/v1/fcmmanager/loaddata

Test the Web Service

http://localhost:8080/api/v1/fcmmanager/models

http://localhost:8080/api/v1/fcmmanager/models/:id

policycompass-fcmmanager's People

Contributors

nrchaudhry avatar

Watchers

Fabian Kirstein avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.