Changes between Version 6 and Version 7 of UoL LAMP HowTo Install Python Flask Applications


Ignore:
Timestamp:
10/01/18 14:23:50 (6 years ago)
Author:
Richard Bramley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UoL LAMP HowTo Install Python Flask Applications

    v6 v7  
    33Tags: [[HowTo]] [[Install]] [[Pain in the proverbial]] [[UoL LAMP Server]]
    44
    5 == Difficulties
     5== Python 2
     6
     7=== Difficulties
    68
    79This installations is made more difficult by 3 things:
     
    12144. Some other stuff that I don't quite understand
    1315
    14 == Requirements
     16=== Requirements
    1517
    1618Before installation can start, the following packages will have to be installed by IT services:
     
    1921- python-dev
    2022
    21 == Start Services
     23=== Start Services
    2224
    2325Start the Apache and MySQL and make sure that they are restarted when the server is rebooted.
     
    3032}}}
    3133
    32 == Proceduce
     34=== Proceduce
    3335
    34361. Install {{{mod_wsgi.so}}} into the directory {{{/local/apache2/etc/}}}
     
    109111}}}
    110112
    111 == Gotchas
     113=== Gotchas
    112114
    113115- [[Python Flask Gotchas Import Database Module Fails]]
    114116
     117== Python 3
     118
     119=== Create Environment
     120
     1211. Add python 3 to your path by adding the following line to `.profile` file in your home directory:
     122
     123{{{
     124PATH=$PATH:/opt/python3/bin/
     125}}}
     126
     127  You will need to log off and log back in to add the above to your current environment.
     128
     1292. Change directory into `/local/` and create a virtual environment:
     130
     131{{{
     132cd /local/ && virtualenv --no-site-packages venv
     133}}}
     134
     1353. Activate the virtual environment:
     136
     137{{{
     138source /local/venv/bin/activate
     139}}}
     140
     1414. Download the application repository from GitHub, cd into the application directory and install the requirements by running the command:
     142
     143{{{
     144pip install -r requirements.txt
     145}}}
     146
     147=== Change Confirguration
     148
    115149[[BackLinks]]