Skip to content

Instantly share code, notes, and snippets.

@cobaltapps
Last active December 13, 2021 15:45
Show Gist options
  • Save cobaltapps/33808bbc843510aa1d06702e810ae42c to your computer and use it in GitHub Desktop.
Save cobaltapps/33808bbc843510aa1d06702e810ae42c to your computer and use it in GitHub Desktop.
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_16.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