Application Tomcat8 in Galileo With Debian and MySql

Version 2

    Version Alpha -- Newbie Programer
    First install Debian system on Intel Galileo through this link

    Tutorial Debian Galileo Gen1 && Gen2

    Install Tomcat 8

    nano /etc/apt/sources.list

         add this line

         deb wheezy-backports main


    root@Galileo:~# apt-get update

    root@Galileo:~# apt-get install tomcat8 tomcat8-admin

    root@Galileo:~# apt-get install mysql-server


    after installing tomcat, spent the configuration

    root@Galileo:~# nano /etc/tomcat8/tomcat-users.xml

              put between the tags <tomcat-users>

    <role rolename="manager-gui,manager-script,manager-jmx,manager-status"/>

    <user username="urUserName" password="urPassword" roles="manager-gui,manager-script,manager-jmx,manager-status"/>


    end the tomcat configuration


    create new schema in mysql

         root@Galileo:~# mysql -u root -pUrPass

         mysql> create database galileo;


    Sketch Arduino


    int escTimer = 0;

    void setup() {


    void loop() {

      if (escTimer == 50000){ //delay without delay

        int vlRead = analogRead(A0);


        char buf[30];

        memset (buf, 0, sizeof(buf));

        snprintf(buf, sizeof(buf)-1, "%d", vlRead);


        char *cRead = strcat(buf , ", 1);\"");

        char conn[] = "mysql -u root -pPass -e \"use Galileo;insert into readings (readingValue, sensor_sensorID) values (";

        char *values =cRead;

        char *query = "";

        query = strcat(conn, values);



        escTimer = 0;





    Tomcat Application with maven
    only compile project and deploy

    change spring-database.xml in Web Pages/Web-Inf  on  <property name="password" value="urPass" />

    and deploy war archive in tomcat server