Skip to content

Instantly share code, notes, and snippets.

@matzeeable matzeeable/apache.sh
Last active Feb 14, 2019

Embed
What would you like to do?
matthias-web.com Blog: How to use AWS Cloud9 IDE with DigitalOcean Droplet
# Edit environment variables
sudo nano /etc/apache2/envvars
# Restart apache
sudo service apache2 restart
# Connect to your droplet ip
ssh root@<YOUR_DROPLET_IP>
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
. ~/.bashrc
nvm install node
node -v
npm -v
su - matzeeable
cd ~
# Create SSH folder for the new user
mkdir -p .ssh
touch .ssh/authorized_keys
chmod 700 .ssh
chmod 644 .ssh/authorized_keys
# AWS Cloud9 only works when the initial path has the same owner as the connecting user
sudo chown -R matzeeable:matzeeable /var/www/html
wget https://github.com/tmux/tmux/releases/download/2.2/tmux-2.2.tar.gz
tar xzf tmux-2.2.tar.gz
cd tmux-2.2
sudo apt-get install libevent-dev ncurses-dev -y
./configure --prefix="/home/matzeeable/.c9/local"
make
make install
rm /home/matzeeable/.c9/bin/tmux
ln -sf /home/matzeeable/.c9/local/bin/tmux /home/matzeeable/.c9/bin/tmux
# Create droplet admin user
adduser matzeeable
usermod -aG sudo matzeeable
nano /etc/ssh/sshd_config
# Add your key here
nano .ssh/authorized_keys
# Show the authorized keys so you can copy
sudo cat /root/.ssh/authorized_keys
# Get path of node version
which node
# Exit -su and reload SSH service
exit
service sshd reload
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.