Skip to content

fiction17/Thesis-recorder

Repository files navigation

Installation

  • First install apache and start
sudo yum install httpd
sudo systemctl start httpd
  • Then install httpd devel
sudo yum install httpd-devel
  • Install mod_wsgi
sudo yum install mod_wsgi
sudo systemctl restart httpd
  • Check if it is working
$ sudo httpd - M | grep wsgi
wsgi_module (shared) # The okay response
  • If the server didn't load the mod_wsgi module, add the following line in the /etc/httpd/conf/httpd.conf file along with the other loadmodule sections:
LoadModule wsgi_module modules/mod_wsgi.so
  • Then restart the apache server again:
sudo systemctl restart httpd
  • Extract the source code and copy the thesis-recorder folder into /var/www folder
sudo cp -r /path/to/your/extracted/thesis-recorder /var/www/thesis-recorder
  • Give permission of the folder
sudo chmod 777 -R /var/www/thesis-recorder
  • Go to /var/www and create virtualenv
cd /var/www/thesis-recorder
python3 -m venv venv
  • Install the dependencies for the virtual env:
source /venv/bin/activate
pip3 install -r requirements.txt
  • Create database and grant permission:
python3 manage.py migrate
sudo chmod 777 /var/www/thesis-recorder/db.sqlite3
  • Add these line into the /etc/httpd/conf/httpd.conf file under vitualhost section
<VirtualHost *:80>
    ServerName localhost
    WSGIDaemonProcess thesis-recorder user=http group=http threads=2 python-path=/var/www/thesis-recorder/venv/lib/python3.6/site-packages
    WSGIScriptAlias / /var/www/thesis-recorder/thesis_recorder/wsgi.py
    <Directory /var/www/thesis-recorder>
        Require all granted
    </Directory>
    <Directory /var/www/thesis-recorder/media>
        Require all granted
    </Directory>
</VirtualHost>
sudo systemctl restart httpd

if SELinux Policy is Enforcing

[root@cse thesis-recorder]# semanage fcontext -a -t httpd_exec_t '<absolute path to venv>/.*\.so(\..*)?'
[root@cse thesis-recorder]# restorecon -r <<absolute path to venv>>

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors