Last active
July 20, 2020 14:17
-
-
Save riipandi/bc563a42e7aa670e4558796560b6dee8 to your computer and use it in GitHub Desktop.
Instalasi Python dan Nginx di Server
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
# Tahapan : | |
1. Update komponen sistem operasi : | |
> apt update | |
> apt full-upgrade | |
> apt install net-tools | |
2. Instalasi Python 3 | |
> apt install python3-all python-is-python3 | |
> apt install python3-pip pipenv | |
> apt install python3-psycopg2 | |
3. Instalasi Nginx: | |
> apt install nginx | |
> systemctl status nginx | |
4. Instalasi supervisor | |
> apt install supervisor | |
> systemctl status supervisor | |
5. Instlasi Gunicorn | |
> apt install gunicorn | |
6. Instalasi Git | |
> apt install git | |
7. Install Nodejs | |
> curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - | |
> apt update | |
> apt install nodejs | |
8. Instalaso PostgreSQL | |
> apt install postgresql postgresql-contrib | |
> systemctl status postgresql | |
> sudo -u postgres psql | |
> ALTER USER PASSWORD 'pwdDatabase123' | |
9. Buat user baru: | |
> useradd -mg sudo -s `which bash` rakyat -c "Rakyat Biasa" | |
> passwd rakyat | |
10. Reload konfigurasi supervisor | |
> supervisorctl reread | |
> supervisorctl update | |
> systemctl restart supervisor | |
> systemctl status supervisor | |
11. Konfigurasi Let's Encrypt | |
- Pastikan domain / subdomain sudah ter-pointing ke server | |
- Pastikan IP publik | |
> apt install certbot | |
> systemctl stop nginx | |
> certbot certonly --no-bootstrap \ | |
--standalone --rsa-key-size 4096 --agree-tos \ | |
--register-unsafely-without-email -d flask.altaris.dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment