If you're using AMI then there are few things to take note before proceeding.
- AMI have yum as package manager.
- AMI Linux 2 has amazon-linux-extras which are available as topics
Setup the environment
sudo yum update -y
sudo yum install gcc
cat /var/run/yum.pid
ps -p 3633
ps -ef | grep 3633
kill -9 3633
sudo amazon-linux-extras install python3
curl -O https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
python3 -m pip install --upgrade pip
yum search pip
sudo yum install python3-pip
python3 -m venv /path/to/new/virtual/environment
sudo pip3 install virtualenv
sudo amazon-linux-extras install nginx1
mkdir project-name
cd project-name
virtualenv env
. env/bin/activate
pip3 install django
pip3 install uwsgi
django-admin --version
uwsgi --socket /opt/uwsgi/sock/yt_demo.sock --wsgi-file /home/ec2-user/project/testsite/testsite/wsgi.py
Note: I have taken help from multiple source and prepared this article. And all source deserves to receive the credits.
Credits,
python3 installation on Amazon linux 2 answer on stackoverflow
how to fix yum lock from other blog
how to upgrade sqlite to latest version on stackoverflow
pip installed package location explanation on stackoverflow
how to run simple django application by digital ocean
how to install mariadb blog
troubleshoot mariadb uninstall stackoverflow
mariadb pid troubleshoot blog
mariadb official documentation
migrate database with mariadb for django troubleshoot from stackoverflow and other blog
get uwsgi and nginx working together stackoverflow and digital ocean blog
make old migration clean ups blog
uwsgi, nginx on centos blog
Top comments (0)