Node.js

Posted on

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications.
Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

In this turorial we will walk you through how to install Node.js on a Ubuntu 12.04 server.
The best way of installing Node.js in to build it from the source.

Code: sudo apt-get install python-software-properties python g++ make
Code: sudo add-apt-repository ppa:chris-lea/node.js
Code: sudo apt-get update
Code: sudo apt-get install nodejs

http://stackoverflow.com/questions/16302436/install-nodejs-on-ubuntu-12-10

http://www.codestance.com/tutorials-archive/nginx-proxy-websockets-to-socket-io-316

http://webandphp.com/IntegratingNode.jswithPHP
Building from source:
Code: sudo apt-get update
Code: sudo apt-get install git build-essential wget
Code: wget http://nodejs.org/dist/v0.10.16/node-v0.10.16.tar.gz
Code: tar xvf node-v0.10.16.tar.gz
Code: pushd node-v0-10-16
Code: ./configure
Code: make
Code: sudo make install

Test the node.js installation:
Code: node –version
Code: node
> 1+3
Result: 4

Install Socket.io:
Code: npm install socket.io

Test Socket.io:
Code: npm info socket.io version

Creating a Node.js application using Socket.IO and Express

Create a package.json file that contains the dependencies of your application.
Navigate to the folder containing the package.js file and install the modules:
Code: sudo npm install

Create the server side application eg app.js. You can call it whatever you like.

Make the application run like a service.
https://www.exratione.com/2011/07/running-a-nodejs-server-as-a-service-using-forever/
http://jasonleveille.com/blog/2013/01/debian-ubuntu-adding-a-startup-script/
Create a upstart script for your Node.js application so it run as a service and make it use Forever as the process monitor.
Put the script in /etc/init.d/ folder and make it executable chmod u+x “script name”
Code: sudo update-rc.d node-live-update defaults

GlassFish Server

Posted on

To install Glassfish server on Ubuntu 12.04 you need to to the following:

– Download and install JDK 7

– Download and install Glassfish

 

JDK 7:

http://askubuntu.com/questions/55848/how-do-i-install-oracle-java-jdk-7

 

Glassfish server:

https://glassfish.java.net/getstarted.html

http://hiromia.blogspot.dk/2013/06/how-to-auto-start-glassfish-server.html

 

Configure Glassfish server:

Server-config -> Java Message Service -> JMS Hosts:

Add new:

Name and Host should be the IP address of the terminal

Port 7676

 

Java Message Service:

Set the default JMS host to the newly added IP adddress

Save and ping

 

Resources -> JMS resources -> Connection factory:

Create new Connection Factory

JNDI Name: nuvoposFactory

Resource type: topic

Save

 

Destination resources:

Add new:

JNDI name: nuvoposTopic

Physical destination name: nuvoposTopic

Resource type: topic

 

RPM

Posted on

Convert RPM files to deb first install following:

Code: sudo apt-get install alien dpkg-dev debhelper build-essential

 

The covert:

Code: sudo alien packagename.rpm

 

Then install:

Code: sudo dpkg -i packagename.deb

PSAM

Posted on

Ordering of production PSAM’s

 

Step 1: Go to Nets website and find the correct order form

 

Step 2: Fill in the form and go to ordering

PBSnummer: 07261330

Forretningsnummer: 5753902

E-mailadresse: abk@nuvopoint.dk

Gentag E-mailadresse: abk@nuvopoint.dk

 

Step 3: Go to ordering and fill in the correct customer info

Forretningsnummer: “customers merchant number”

Antal PSAM: How many PSAM you need to order

Kontaktperson: Aydin Bahojb-Khoshnoudi

Bemærkninger:

Leveringsadresse: Terminallev.

Landekode: DNK

Betjent/Ubetjent: Betjent

DCC: Nej

Keyenter: Nej

APE/DAPE: Slået til

 

Step 4: Send the order

 

If there is any problems then call PSAM ordering: +4544892777