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. Then I did this...

AWS Documentation:

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html

AWS Instances:

https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:

Platform:

ubuntu-bionic-18.04-amd64-server-20211129

30GB storage:

/dev/xvda1

Public IP:

54.83.104.232

Web directory:

/var/www/html/

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/

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

Set up 4GB swap space (not implemented)

#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"

Clone this wiki locally