Skip to content

Instantly share code, notes, and snippets.

@katesclau
Created March 20, 2017 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save katesclau/278928a756ed983d7de0c63ba1492f8f to your computer and use it in GitHub Desktop.
Save katesclau/278928a756ed983d7de0c63ba1492f8f to your computer and use it in GitHub Desktop.
Scada-LTS getting started on Dev

Scada-LTS is an Open Source, web-based, multi-platform solution for building your own SCADA (Supervisory Control and Data Acquisiton) system. This quick reference is to get you started on developing Scada-LTS.

Table of contents

Clonning the Repo

Clone the current development branch of Scada-LTS:

  • git clone -b develop-sdtabilit

Install dependencies

The following steps are required to build Scada-LTS:

  • Install tomcat7: apt-get install tomcat7 or yum install tomcat.
  • Install mysql: apt-get install mysql-server or yum install mysql-server.
  • Install ant: apt-get install ant or yum install ant.
  • Install node: apt-get install nodejs or yum install node.
  • Install bower: npm install -g bower
  • Install Angular: npm install @angular/core@latest.
  • In Debian based OS' you might also need npm install -g -f angular-cli.

Configure Environment

  • Configure CATALINA_HOME: ie - export CATALINA_HOME=/usr/share/tomcat7 or add it to your profile. If you're using Derby as initial DB, also
  • Grant permissions to tomcat7 user on /var/lib/tomcat7: chown -R tomcat7.tomcat7 /var/lib/tomcat7.
  • Get SeroUtils: chmod +x ./get_seroUtils.sh && ./get_seroUtils.sh.
  • Get bower dependecies: cd WebContent/resources/app && bower update.

Build Scada-LTS UI

First, build the new Scada-LTS UI components, in the repo base directory...

  • NPM install dependencies: cd ./ScadaLTS-UI && npm install.
  • Build UI: ng build.

Build Scada-LTS

Build the Scada-LTS web application, in the repo base directory.

  • Ant build: ant war. Profit! ScadaBR.war should be deployed.

Deploy

  • Login to mysql: mysql -u [user] -p.
  • Create db:create dababase scadalts;.
  • Copy ScadaBR.war to dir tomacat webapps: cp ScadaBR.war /var/lib/tomcat7/webapps/.
  • Add JDBC resourct to your tomcat context: sudo vim /var/lib/tomcat7/conf/context.xml.
<Resource name="jdbc/scadalts" auth="Container" type="javax.sql.DataSource"
              maxActive="100" maxIdle="30" maxWait="10000"
              username="scadalts" password="scadalts" driverClassName="com.mysql.jdbc.Driver"
              url="jdbc:mysql://localhost:3306/scadalts"/>
  • Download and add mysql-connector to CATALINA_HOME/lib.
  • Restart tomcat7: /etc/init.d/tomcat7 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment