Skip to content
thevpc edited this page Nov 8, 2019 · 3 revisions

Install Nuts

download and install nuts

[github.com/thevpc/nuts]nuts!

check that nuts is well installed by issuing

nuts

Launch vr-box

install vr-box

nuts install vr-box

run vr-box

mkdir my-project
cd my-project
nuts vr-box n my-project

configuration :

Default configuration :

ENSo info uses a default java derby database but can be configured with other rdbms such as mysql. You have nothing to configure to use default embedded derby configuration. If one needs to configure db access a file named upa.xml should be configured accordingly. The file is located at :

${user.home}/workspace/eniso.info/config/upa.xml

derby configuration

<?xml version="1.0" encoding="UTF-8"?>
<upa xmlns="http://github.com/thevpc/upa/upa-1.0.xsd" version="1.0">
    <persistenceUnit name="main">
        <connection>
            <connectionString>
                derby:embedded//enisoinfodb;structure=create;userName=enisoinfouser;password='mypassword';
            </connectionString>
        </connection>
    </persistenceUnit>
</upa>

mysql configuration

For mysql, a valid database must be configured first. All Tables will be generated by UPA.

Check mysql installation

systemctl status mysql
systemctl enable mysql
systemctl start mysql

mysqladmin -u root password "<YOUR PASSWORD>"
# or (if you need to change password)
mysqladmin -u root -p'oldpassword' password "<YOUR PASSWORD>"

mysql -u root -p"<YOUR PASSWORD>"

create database and user

CREATE DATABASE enisoinfodb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
CREATE USER 'enisoinfouser'@'localhost' IDENTIFIED BY "<YOUR PASSWORD>";
GRANT ALL PRIVILEGES ON enisoinfodb . * TO 'enisoinfouser'@'localhost';
FLUSH PRIVILEGES;

edit /app/eniso-info-app-web/src/main/resources/META-INF/upa.xml file

<?xml version="1.0" encoding="UTF-8"?>
<upa xmlns="http://github.com/thevpc/upa/upa-1.0.xsd" version="1.0">
    <persistenceUnit name="main">
        <connection>
            <connectionString>
                mysql//locahost/enisoinfodb;structure=create;userName=enisoinfouser;password='mypassword';
            </connectionString>
        </connection>
    </persistenceUnit>
</upa>

advanced mysql configuration

<?xml version="1.0" encoding="UTF-8"?>
<upa xmlns="http://github.com/thevpc/upa/upa-1.0.xsd" version="1.0">
    <persistenceUnit name="main">
        <connection>
            <connectionString>
                mysql://localhost/enisoinfodb;
                structure=create;
                userName=enisoinfouser;
                password='mypassword';
                pool=true;
                poolMaxSize=10;
                monitor=javamelody
            </connectionString>
        </connection>
    </persistenceUnit>
</upa>

Staring VR

Deploying

eniso-info-app-web project is the war application to run on any Tomcat Web Container. No custom webserver configuration is needed.

Default login/password

login : admin password : admin