This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
getting_started:install_ubuntu_node_js [2016/10/19 16:48] – created admin | getting_started:install_ubuntu_node_js [2016/10/20 13:37] (current) – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Install Node.js on Ubuntu | + | ====== Install Node.js on Ubuntu |
===== Introduction ===== | ===== Introduction ===== | ||
* Node.js is part of the next generation web servers that is small; fast and super efficient. | * Node.js is part of the next generation web servers that is small; fast and super efficient. | ||
Line 14: | Line 14: | ||
<code bash> | <code bash> | ||
- | sudo apt-get update | ||
- | sudo apt-get install python-software-properties python g++ make | ||
- | sudo apt-get install software-properties-common | ||
- | sudo add-apt-repository ppa: | ||
sudo apt-get update | sudo apt-get update | ||
sudo apt-get install nodejs | sudo apt-get install nodejs | ||
+ | sudo apt-get install npm | ||
</ | </ | ||
* We need to install the following Node.js packages globally. | * We need to install the following Node.js packages globally. | ||
- | <WRAP center round important | + | <WRAP center round important |
- | Note that we are using an older version of socket.io (0.9.x) instead of the latest 1.x. | + | |
+ | * Also note that there might be some warings during the install of these packages. Thats normal. | ||
</ | </ | ||
Line 37: | Line 36: | ||
* Everything is now installed that we will need to enable us to serve the FreeRADIUS log file in real-time using Node.js, Websocket and Socet.IO. | * Everything is now installed that we will need to enable us to serve the FreeRADIUS log file in real-time using Node.js, Websocket and Socet.IO. | ||
* We need to install a start-up file, start the Node.js server up and confirm that it works. | * 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 /// | + | * The sample start-up script is found under /// |
<code bash> | <code bash> | ||
- | sudo cp / | + | #The systemd startup file |
- | sudo chmod 755 /etc/init.d/ | + | sudo cp / |
- | sudo update-rc.d nodejs-socket-io start 80 2 3 4 5 . stop 20 0 1 6 . | + | |
- | </ | + | # add a sym link to node |
- | * If you are running Apache; the sample start-up script is found under ///var/www/cake2/rd_cake/ | + | sudo ln -s /usr/bin/nodejs |
- | <code bash> | + | |
- | sudo cp / | + | #Enable it |
- | sudo chmod 755 / | + | sudo systemctl enable |
- | sudo update-rc.d nodejs-socket-io defaults | + | |
+ | #Start it | ||
+ | sudo systemctl start nodejs-socket-io.service | ||
</ | </ | ||
===== Test the Node.js server ===== | ===== Test the Node.js server ===== | ||
- | * Start the server and confirms | + | * Confirm |
- | <code bash> | + | |
- | sudo / | + | |
- | </ | + | |
* Confirm it is running by checking the log file output: | * Confirm it is running by checking the log file output: | ||
<code bash> | <code bash> | ||
Line 73: | Line 71: | ||
===== Next steps ===== | ===== Next steps ===== | ||
* If you are simply looking for a RADIUS server; you are done. | * If you are simply looking for a RADIUS server; you are done. | ||
- | * If you are deploying CoovaChilli Captive Portals or Mikrotik Hotspots you must try the [[ Getting Started:install_ubuntu_dynamic_login_pages|Dynamic Login Pages ]](optional but recommended). | + | * If you are deploying CoovaChilli Captive Portals or Mikrotik Hotspots you must try the [[ Getting Started:install_ubuntu_dynamic_login|Dynamic Login Pages ]](optional but recommended). |
- | * If you are looking at connecting Captive Portals through OpenVPN or PPTP to this server; do the following optional steps | + | |
- | * [[Getting Started: | + | |
- | * [[Getting Started: | + | |
* If your server has two network cards and you want to install CoovaChilli on it as a captive portal; follow these instructions: | * If your server has two network cards and you want to install CoovaChilli on it as a captive portal; follow these instructions: | ||
- | * [[getting_started: | + | * [[getting_started: |