Skip to content

Instantly share code, notes, and snippets.

@GoodnessEzeokafor
Last active January 11, 2021 14:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GoodnessEzeokafor/d4052c94d90212256ab1b46668fa023a to your computer and use it in GitHub Desktop.
Save GoodnessEzeokafor/d4052c94d90212256ab1b46668fa023a to your computer and use it in GitHub Desktop.

SSH SETUP

  • copy and paste ssh-keygen on your local machine

initial server setup/user setup

  • ssh root@your_server_ip
  • adduser sammy
  • usermod -aG sudo sammy - setup root privileges for the user
  • ufw app list - setup a basic filewall
  • ufw allow OpenSSH - setup a basic filewall
  • ufw enable - setup a basic filewall
  • ufw status
  • rsync --archive --chown=sammy:sammy ~/.ssh /home/sammy

install nginx

  • sudo apt install nginx

  • sudo ufw app list

  • sudo ufw enable

  • sudo ufw default deny

  • sudo ufw allow 'Nginx HTTP'

  • sudo ufw status

  • systemctl status nginx

  • sudo iptables -L

installing node js

  • wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash

  • export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion

  • nvm ls-remote - checks the available version

  • nvm install 12.19.0 - install node version

  • npm install -g npm@latest - install npm

  • sudo nginx -t

  • sudo service nginx reload

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment