How To Install Flask with Gunicorn and Nginx on Oracle Linux 9
Important Links
- VLE Insurance Process Flow
- RAP Registration Flow
- RAP and VLE INS POSP
- Life Insurance
- Life Insurance Renewal
- Motor Comprehensive
- Motor Third Party
- Personal Accident
- Fire and Allied Perils
- Health Insurance
- Pradhan Mantri Fasal Bima Yojana (PMFBY)
- NPS
- CSC Digipay Commission Chart
- HDFC Commission
- Axis Bank Commission
- UCO Bank Commission
- ICICI Bank Commission
- BOB Bank Commission
- BOI Bank Commission
- CBI Bank Commission
- LIFE INSURANCE RENEWAL HANDBOOK
- Difference Between CSC RAP Insurance And CSC VLE Insurance - Registration | Products | Commission
- LIC Commission
How To Install Flask with Gunicorn and Nginx on Oracle Linux 9
in This Tutorial you will Learn " How To Install Flask with Gunicorn and Nginx on Oracle Linux 9"
Flask is a web application framework written in Python.
Gunicorn is a WSGI server.
NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more.
__________________________________________________________________________________________________________________________________
Server - Os: Oracle Linux Server 9.0 64Bit | IP -192.168.1.50 |Hostname - server.testbox.com
__________________________________________________________________________________________________________________________________
cat /etc/system-release ; hostname ; hostname -I ; dnf groupinstall "Development Tools" -y
sudo dnf update ; sudo dnf install epel-release -y
sudo dnf install python3-pip python3-devel gcc -y
dnf install nginx -y
nginx -version
dnf install --assumeyes python3-pip
pip3 install virtualenv
sudo update-crypto-policies --set LEGACY
sudo reboot
sudo mkdir /sample_project && cd /sample_project
sudo chmod 777 /sample_project
virtualenv projectenv
source projectenv/bin/activate
pip3 install gunicorn flask
pip install --upgrade pip
nano /sample_project/helloworld.py
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return "<h1 style='color:red'>Hello, World!</h1>"
if __name__ == '__main__':
app.run(host='0.0.0.0')
sudo firewall-cmd --add-port=5000/tcp --permanent ; sudo firewall-cmd --reload
python helloworld.py
http://127.0.0.1:5000
nano /sample_project/wsgi.py
from helloworld import app
if __name__ == "__main__":
app.run()
firewall-cmd --add-port=8000/tcp --permanent ; firewall-cmd --reload
python helloworld.py
http://0.0.0.0:8000
deactivate
gunicorn --bind 0.0.0.0:8000 wsgi:app
Latest POst
- LPG Gas Subsidy Check by mobile number
- PMEGP Loan Aadhar Card Se
- E Shram Card Balance Check Number
- How to Migrate CentOS 7 to AlmaLinux 8
- How to Install WHM/cPanel in Almalinux?
- Install cPanel on Rocky Linux 9 Server
- How to Link Aadhaar with UAN
- How To Setup LVS (Linux Virtual Server) Load Balancer on Rocky Linux 8.5
- Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq
- How To Install Ruby on Rails with Mysql on Rocky Linux 8.5
Recent Updates
- LPG Gas Subsidy Check by mobile number
- PMEGP Loan Aadhar Card Se
- E Shram Card Balance Check Number
- How to Migrate CentOS 7 to AlmaLinux 8
- How to Install WHM/cPanel in Almalinux?
- Install cPanel on Rocky Linux 9 Server
- How to Link Aadhaar with UAN
- How To Setup LVS (Linux Virtual Server) Load Balancer on Rocky Linux 8.5
- Setup Quick DNS Server On Rocky Linux 8.5 Using Dnsmasq
- How To Install Ruby on Rails with Mysql on Rocky Linux 8.5
Haryana Goverment Schemes
- Old Age Samman Allowance
- Widow Pension Scheme
- Disability Pension Scheme
- Financial Assistance to Destitute Children Scheme
- Financial Assistance to Non School Going Disabled Children
- Allowance to Dwarfs
- Allowance to Eunuchs
- Rajiv Gandhi Pariwar Bima Yojna
- Post-Matric Scholarship
- Merit Cum Means
- Pre-Matric Scholarship
- About MMPSY
- MMPSY PPT
- MMPSY HINDI Manual
- MMPSY English Manual
- Premium Chart for PMMDY (Pension Plan)
- Parivar Pehchan Patra (PPP)
- Download Family ID
- PMSVANidhi Process Flow
- PM SVANidhi through CSCs
- About PMSYM
- PMSYM Morpho Setting
- PMSYM Creative & FAQ
- PMSYM Process Manual