---
# System prepended metadata

title: CDP VM環境部署

---

# CDP VM環境部署
Default Operation System: Debian
---

## 流程
1. Python安裝
2. pip 安裝
    > sudo apt-get install python3-pip
3. git 安裝
    > sudo apt-get install git
4. nginx 安裝
    > sudo nginx -t 檢查設定語法有無錯誤
    > sudo service nginx restart 重啟nginx
6. supervisor 安裝
    > sudo apt-get install supervisor
    > cd supervisor/conf.d
    > nano cdpplatform.conf
    ```[program:cdpplatform]
    --    directory 路徑不同要記得改
    directory=/usr/local/filedisks/cdpplatform/cdp/cdp
    command=/usr/local/filedisks/env/bin/gunicorn -k eventlet -t 200 --limit-request-line 15000  main:app -b 0.0.0.0:8066
    environment=BOTO_CONFIG=/dev/null
    autostart=true
    autorestart=true
    priority=10
    startsecs=5
   --    stdout_logfile 路徑不同要記得改
   stdout_logfile=/usr/local/filedisks/cdpplatform/web.log
    redirect_stderr=true

6. gunicorn 安裝
    > pip install gunicorn