i. IP address: 52.24.239.208; SSH port: 2200
ii. The complete URL to my web application hosted at Amazon Web Services platform: http://ec2-52-38-199-253.us-west-2.compute.amazonaws.com
iii. softwares installed and configuration changes made:
- set up a user and its password, and establish its ssh using public key/private key pair authentication
- edit 'Authorized redirect URIs' of app credentials at google API Manager tab
- register app at 'facebook for developers' and provide 'Valid OAuth redirect URIs' and 'Site URL' at the app's Settings tab
- set up and enable firewall including denying access via port 22
- in /etc/ssh/sshd_config, disable password login and root login, reset port.
--------(As the new user)--------
-
upgrade packages of the Ubuntu environment:
- sudo apt-get update
- sudo apt-get dist-upgrade
-
to establish virtual machine at the server at /var/www/FoodTherapy/FoodsTherapy[10]:
- sudo apt-get -y install python-pip
- sudo pip install virtualenv
- sudo virtualenv venv
- source venv/bin/activate
-
inside the venv, install the following to serve the app:
- sudo pip install flask
- sudo pip install httplib2
- sudo pip install requests
- sudo pip install oauth2client
- sudo pip install imgurpython
- sudo pip install sqlalchemy
- for psycopg2[11]: -sudo apt-get install postgresql -sudo apt-get install python-psycopg2 -sudo apt-get install libpq-dev
-
to monitor the linux system install Glances per resource #7.
- sudo apt-get install python-pip build-essential python-dev
- sudo pip install Glances
- sudo apt-get install lm-sensors
- sudo pip install pysensors
-
install Fail2Ban, enabling jail nginx-http-auth and jail ssh per resource #8.
-
set up automatic updates, by the following per resource #9
- sudo apt-get install unattended-upgrades
- edit /etc/apt/apt.conf.d/50unattended-upgrades
- edit /etc/apt/apt.conf.d/10periodic
iv. third-party resources, including:
- https://www.digitalocean.com/community/tutorials/how-to-secure-postgresql-on-an-ubuntu-vps
- https://github.com/carwin/markdown-styleguide
- https://developers.facebook.com/
- https://console.developers.google.com
- https://api.imgur.com/
- http://stackoverflow.com/
- http://askubuntu.com/questions/293426/system-monitoring-tools-for-ubuntu
- https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-14-04
- https://help.ubuntu.com/lts/serverguide/automatic-updates.html
- https://www.digitalocean.com/community/tutorials/how-to-deploy-a-flask-application-on-an-ubuntu-vps
- http://stackoverflow.com/questions/28253681/you-need-to-install-postgresql-server-dev-x-y-for-building-a-server-side-extensi