Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save feliphebueno/1c1d25821a4a937bc94f221381ba65c0 to your computer and use it in GitHub Desktop.
Save feliphebueno/1c1d25821a4a937bc94f221381ba65c0 to your computer and use it in GitHub Desktop.
Configuração de ambiente Python 3.5 + Django + Apache mod_wsgi no EC2 Linux AMI
# Sistema
- sudo yum install python35.x86_64
- sudo yum install mod24_wsgi-python35.x86_64
- sudo yum install git.x86_64
# Python
- curl -L https://bootstrap.pypa.io/get-pip.py > get-pip.py
- sudo python3.5 get-pip.py
- sudo rm get-pip.py
- sudo python3.5 -m pip install virtualenv
# Django Apps
- sudo chown -R ec2-user:root /var/www/
- cd /var/www/
- git clone https://github.com/your-app.git
- python3.5 -m virtualenv your-app/
- cd your-app/
- source bin/activate
- pip install -r requirements.txt
- edite your-app/wsgi.py conforme o Gist https://gist.github.com/feliphebueno/ad60b65c4a371876bff824d3accbec04
# Apache
- edite o arquivo /etc/httpd/conf/httpd.conf de acordo com o gist https://gist.github.com/feliphebueno/e082783351af3b331366147d35239436
- ainda no httpd.conf, adicione o alias /static/ apontando pra pasta de arquivos estáticos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment