How to Deploy Matching Software for Speed Friending and Dating Events on CentOS 7.6

Recently Mikula Byutil asking me to set up a CentOS web server with Apache to share Matching Software for Speed Friending and Dating Events. I want to share step-by-step guide — willl be useful for dummies.

In this tutorial the domain name used for example. This is a free domain name from

You can use another domain name, of course.

Tested with clean installation of CentOS.

  1. Check CentOS version:

    $ cat /etc/centos-release

    CentOS Linux release 7.6.1810 (Core)

  2. Update system packages:

    # yum update -y
  3. Install dependencies:

    # yum install nano httpd python36 git -y
  4. Enable HTTP service:

    # systemctl enable httpd.service
  5. Create user 'matcher':

    # adduser matcher
  6. Switch to user 'matcher':

    # su matcher
    $ cd
  7. Create Python 3 virtual environment for the app: $ python36 -mvenv venv
  8. Activate virtual environment: $ source venv/bin/activate
  9. Install app from git repo branch:

    $ pip install git+

    A reason to use git repo: speed-friending-and-dating-matcher not available from PyPi.

  10. Install application server:

    $ pip install gunicorn
  11. Create WSGI file:

    $ nano

    with content:

    from speed_friending_matcher import server
    from speed_friending_matcher.server import app as application
  12. Close user session:

    $ exit
  13. Create and open a Systemd service file for Gunicorn

    # nano /etc/systemd/system/gunicorn.service

    with content:

    Description=gunicorn daemon
    ExecStart=/home/matcher/venv/bin/gunicorn --workers 2 --bind wsgi:application
  14. We can now start the Gunicorn service we created and enable it so that it starts at boot:

    # systemctl start gunicorn
    # systemctl enable gunicorn
  15. Create config file for Apache:

    # nano /etc/httpd/conf.d/matcher.conf 

    with content:

    <VirtualHost *:80>
        DocumentRoot "/home/matcher"
        ProxyPass / http://localhost:8000/
        <Directory /home/matcher/>
        Require all granted
  16. Restart Apache:

    # systemctl restart httpd
  17. Go to and enjoy!

Sometimes also requred...

  1. Add HTTP service or port 80 with the following command:

    # firewall-cmd --add-service=http --permanent
  2. Once you’re done, restart firewalld with the following command:

    # firewall-cmd --reload

Have a good day!

Specially for Mikula Byutil :)