TydenBrooks

From VentureResearchWiki
Jump to navigation Jump to search

Programming, Provisioning and Testing[edit | edit source]

Follow these instructions

OM37 VRReaderImage-OM37 "danny"

Install the Web Application[edit | edit source]

Install Node.js

opkg install nodejs

Install SQLite

opkg install sqlite3
opkg install node-sqlite3 

Prep Target Directories

mkdir /home/user/apps
mkdir /home/user/tmp
mkdir /home/user/logs

Deploy Application

rsync -Oavr --no-perms venture@vm-linux-prod:/mnt/m/TydenBrooks/Deployment/20140804.1/* /home/user/apps/RFIDWeb

Install Process Manager

npm install pm2 -g --unsafe-perm

Copy Control Files

cp /home/user/apps/RFIDWeb/RFIDWeb /etc/init.d
cp /home/user/apps/RFIDWeb/RFIDWeb.monit /etc/monit.d/
cp /home/user/apps/RFIDWeb/RFIDWeb.logrotate /etc/logrotate.d
chmod +x /etc/init.d/RFIDWeb
chmod 644 /etc/logrotate.d/RFIDWeb.logrotate
echo "0 0 * * * /usr/sbin/logrotate -v /etc/logrotate.conf" >> /var/spool/cron/root

Change Permissions

chmod +x /home/user/apps/RFIDWeb/app.js
chmod +x /home/user/apps/RFIDWeb/StartChrome

Have RFIDWeb start on boot

update-rc.d RFIDWeb defaults

Change Monit Delay Start (comment delay)

vi /etc/monitrc

set daemon  60              # check services at 1-minute intervals
#   with start delay 120    # optional: delay the first check by 4-minutes (by
#     

Disable lighttp

/etc/init.d/lighttpd stop
update-rc.d -f lighttpd remove

Update RFID Service

opkg upgrade vrfrv2-linux-event

Restart Monit

/etc/init.d/monit restart

Setup Static IP[edit | edit source]

Edit the Ethernet configuration file

nano /etc/NetworkManager/system-connections/Ethernet

Modify the ipv4 settings

[ipv4]
method=manual
dns=10.19.0.1
dns-search=search;
addresses1=10.19.0.100;24;10.19.0.1;

Save and close the file

ctrl-x
y

Test and verify the new ip address

ifconfig eth0

If the static IP didn't stick, try the following

ls -l /etc/NetworkManager/system-connections/Ethernet
chmod 600 /etc/NetworkManager/system-connections/Ethernet