Install the latest Node.js. This package will also include the npm package manager for Node.js.
sudo apt-get update sudo apt-get install python-software-properties python g++ make sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install nodejs
We need to install the following Node.js packages globally.
sudo npm -g install tail sudo npm -g install socket.io sudo npm -g install connect sudo npm -g install mysql sudo npm -g install forever
We need to install a start-up file, start the Node.js server up and confirm that it works.
If you are running Nginx; the sample start-up script is found under /usr/share/nginx/www/cake2/rd_cake/Setup/Node.js/nodejs-socket-io
sudo cp /usr/share/nginx/www/cake2/rd_cake/Setup/Node.js/nodejs-socket-io /etc/init.d sudo chmod 755 /etc/init.d/nodejs-socket-io sudo update-rc.d nodejs-socket-io start 80 2 3 4 5 . stop 20 0 1 6 .
If you are running Apache; the sample start-up script is found under /var/www/cake2/rd_cake/Setup/Node.js/nodejs-socket-io
sudo cp /var/www/cake2/rd_cake/Setup/Node.js/nodejs-socket-io /etc/init.d sudo chmod 755 /etc/init.d/nodejs-socket-io sudo update-rc.d nodejs-socket-io defaults
Start the server and confirms that it is running on port 8000 by requesting the client side Socket.io library.
sudo /etc/init.d/nodejs-socket-io start
Confirm it is running by checking the log file output:
sudo cat /var/log/nodejs-socket-io.log #Result in.... info: socket.io started Up and running on port 8000
Request the following URL and ensure that you are served with some JavaScript. (Replace the IP Address to that of the RADIUSdesk server) http://127.0.0.1:8000/socket.io/socket.io.js