Support #648
Install JSbin On Debian
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
- Test JSbin in development mode:
jsbin
- Go to http://localhost:3000 in a web browser
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
- Start jsbin using pm2:
- Then save the pm2 applications to allow them to start up after rebooting:
pm2 save
Resources¶
Updated by Daniel Curtis over 9 years ago
- Description updated (diff)
- Status changed from New to In Progress
- % Done changed from 0 to 30
Updated by Daniel Curtis over 9 years ago
- Description updated (diff)
- % Done changed from 30 to 60
Updated by Daniel Curtis over 9 years ago
- Description updated (diff)
- Status changed from In Progress to Resolved
- % Done changed from 60 to 100