가상환경 설정
$ cd /my/working/dir $ virtualenv -p python3 env35 $ cd env35 $ mkdir run $ source bin/activate $ pip install django gunicorn $ django-admin startproject testproject $ cd testproject $ django-admin startapp testapp |
디렉토리 구조
/my/working/dir
|
gunicorn systemd 등록
$ sudo mkdir /run/gunicorn $ sudo chown youurUserName.yourGroup /run/gunicorn # sudo vi /etc/systemd/system/gunicorn.service [Unit] |
gunicorn 서비스 시작
$ sudo systemctrl enable gunicorn.service $ sudo systemctl start gunicorn.service |