Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Initial server setup script for a NodeJS, Gulp powered DEV configuration.
#!/bin/sh
## Run this script from a Terminal (or just copy/paste each command and run one at a time) when you first setup your server
## If you already used the gulp-user-data-setup.sh script code in the setup of a new Cloud Server (as per a Cobalt Apps tutorial) then this script does not need to be run
## Update Ubuntu
sudo apt-get update
## Install NodeJS and NPM
curl -sL https://deb.nodesource.com/setup_10.x | bash -
sudo apt-get install nodejs -y
## Install Gulp globally so that it can be run from the command line
npm install --global gulp-cli
## Append code to end of sudoers file that allows the www-data user to execute sudo commands
## This gives the Instant IDE Console the ability to perform administrative tasks
## Only use this code if working on a non-live/DEV server as it makes the server less secure
echo 'www-data ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.