Project

General

Profile

Support #648

Install JSbin On Debian

Added by Daniel Curtis over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Server
Target version:
Start date:
08/29/2015
Due date:
% Done:

100%

Estimated time:
2.00 h
Spent time:

Description

This is a guide on installing JSbin on Debian 8.

Prepare the System

  • Make sure the system is up to date:
    apt-get update && apt-get upgrade
    
  • Install a few dependencies:
    apt-get install curl git build-essential libzmq-dev
    
  • Install nodejs and npm:
    curl -sL https://deb.nodesource.com/setup_0.10 | bash -
    apt-get install -y nodejs
    

Install JSbin with npm

  • Install JSbin using npm:
    npm install -g jsbin
    
  • Create a new config file and edit it as necessary:
    cd /usr/lib/node_modules/jsbin
    cp config.default.json config.local.json
    
  • Install a few node modules:
    npm install grunt-contrib-uglify grunt-contrib-jshint grunt-contrib-concat
    
  • Then build the production files:
    grunt build
    

Running JSbin with PM2

  • Install pm2 globally:
    npm install -g pm2
    
  • Add the startup script for pm2:
    pm2 startup ubuntu
    
  • Add a jsbin user to separate privileges:
    useradd -m -g users -s /bin/bash jsbin
    
  • Change the ownership of the global jsbin folder to the jsbin user:
    chown -R jsbin /usr/lib/node_modules/jsbin
    
  • Switch to the jsbin user:
    su - jsbin
    
    • Start jsbin using pm2:
      pm2 start /usr/lib/node_modules/jsbin/bin/jsbin
      
    • Exit from the jsbin user:
      exit
      
  • Then save the pm2 applications to allow them to start up after rebooting:
    pm2 save
    

Resources

#1

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
  • Status changed from New to In Progress
  • % Done changed from 0 to 30
#2

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
  • % Done changed from 30 to 60
#3

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
  • Status changed from In Progress to Resolved
  • % Done changed from 60 to 100
#4

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
#5

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
#6

Updated by Daniel Curtis over 8 years ago

  • Description updated (diff)
#7

Updated by Daniel Curtis over 8 years ago

  • Status changed from Resolved to Closed
#8

Updated by Daniel Curtis about 8 years ago

  • Description updated (diff)
#9

Updated by Daniel Curtis about 8 years ago

  • Description updated (diff)

Also available in: Atom PDF