Skip to content

Hosting

Jason Colditz edited this page Feb 15, 2022 · 11 revisions

2022-02-14 Signed up for a free year of AWS EC2.

Recommended setup:

AWS Documentation:

AWS Instances:

Public IP: 54.83.104.232

Web directory: /var/www/html/

8GB Storage: /dev/xvda

To connect:

chmod 400 ~/Documents/AWS/Key_AWS_EC2_20220214.pem ssh -i ~/Documents/AWS/Key_AWS_EC2_20220214.pem [email protected]

To transfer files:

scp -i ~/Documents/AWS/Key_AWS_EC2_20220214.pem /path/my-file.txt [email protected]:path/

Set up 4GB swap space

#sudo dd if=/dev/zero of=/swapfile bs=128M count=32 #sudo chmod 600 /swapfile #sudo mkswap /swapfile #sudo swapon /swapfile #sudo swapon -s #sudo vi /etc/fstab #sudo swapoff -a

To load swap on startup

#sudo vi /etc/fstab

Add "/swapfile swap swap defaults 0 0"

Installations

sudo apt update sudo apt upgrade

Apache

sudo apt install -y apache2 sudo systemctl start apache2.service sudo systemctl enable apache2.service sudo systemctl status apache2

Check public IP

curl -4 icanhazip.com

Python

sudo apt install -y python3

Conda

cd /tmp curl -O https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh bash Anaconda3-2021.11-Linux-x86_64.sh source ~/.bashrc conda update conda

Vader

conda install -c conda-forge vadersentiment

PostgreSQL

sudo apt upgrade postgresql

New user setup

sudo adduser dashboard sudo su - dashboard cd ~ mkdir .ssh chmod 700 .ssh touch .ssh/authorized_keys chmod 600 .ssh/authorized_keys id exit

Clone this wiki locally