Last active
March 13, 2018 08:03
-
-
Save gauravchl/664c68b6651967a0a24b4b72b4373382 to your computer and use it in GitHub Desktop.
initial setup for droplet(digital ocean)
This file contains hidden or 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
# Create new user and add keys | |
adduser sammy | |
usermod -aG sudo sammy | |
su - sammy | |
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
nano ~/.ssh/authorized_keys # add public key by copy and paste | |
chmod 600 ~/.ssh/authorized_keys | |
exit | |
sudo nano /etc/ssh/sshd_config # disable pwd login - PasswordAuthentication no | |
sudo systemctl reload sshd | |
# Software installations | |
sudo apt-get update | |
sudo apt-get install build-essential | |
sudo apt-get install nginx | |
sudo ufw allow 'Nginx Full' | |
sudo ufw allow 'OpenSSH' | |
sudo ufw status | |
sudo ufw enable | |
chown -Rf www-data:www-data /root/ # Don't run this if you're in root, otherise you will get permission denied for next ssh login | |
# Install node(Use node v8.9.3 for Meteor 1.6.0.1) | |
wget http://nodejs.org/dist/v4.8.0/node-v4.8.0-linux-x64.tar.gz | |
tar xvzf node-v4.8.0-linux-x64.tar.gz | |
rm -rf /opt/nodejs | |
mv node-v4.8.0-linux-x64 /opt/nodejs | |
ln -sf /opt/nodejs/bin/node /usr/bin/node | |
ln -sf /opt/nodejs/bin/npm /usr/bin/npm | |
# Install some npm package | |
npm install -g forever node-gyp ejson fibers | |
# Install Meteor 1.6.0.1 | |
curl "https://install.meteor.com/?release=1.6.0.1" | sh | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment