Last active
June 4, 2019 13:44
-
-
Save fabienheureux/73b0b1d9efade6e651d4cc3497c33487 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Start by installing necessary softwares | |
apt update | |
apt install build-essential sudo -y | |
# well, its role is to serve you... | |
adduser alfred | |
usermod -aG sudo alfred | |
# Setup firewall | |
ufw allow OpenSSH | |
ufw enable | |
ufw status | |
# Copy ssh keys from root to new user | |
rsync --archive --chown=alfred:alfred ~/.ssh /home/alfred | |
# change user to newly created one | |
su - alfred | |
# install nodejs | |
cd ~ | |
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh | |
sudo bash nodesource_setup.sh | |
sudo apt install nodejs | |
nodejs -v | |
cd ~ | |
mkdir ~/.npm-global | |
npm config set prefix '~/.npm-global' | |
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile | |
source ~/.profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment