diff --git a/docs/研发/环境配置.md b/docs/研发/环境配置.md new file mode 100644 index 00000000..e7066090 --- /dev/null +++ b/docs/研发/环境配置.md @@ -0,0 +1,86 @@ +#windows 10下需要安装的软件 + +##visual studio 2019 社区版(https://visualstudio.microsoft.com/vs/) + +##windows 10 linux 子系统应用:Unbuntu 18.04 LTS(windows下使用命令行wsl -t Ubuntu-18.04关闭) + +设置用户名和密码为pi,输入sudo passwd root,设置root密码为root,输入su root,切换到root用户 + +#Ubuntu 18.04下需要安装的软件 + +##检查CPU架构版本 + +>uname -a + +##更换源(http://mirrors.163.com/.help/ubuntu.html) + +>lsb_release -a +>cp /etc/apt/sources.list /etc/apt/sources.list.bk +>>/etc/apt/sources.list +>nano /etc/apt/sources.list +根据lsb_release命令获取的Codename替换下面地址中的Codename +deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +复制上面更新过的内容并替换/etc/apt/sources.list +>apt update + + +##安装supervisor(http://supervisord.org/) +>apt install supervisor +>mv /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf.bk +>>/etc/supervisor/supervisord.conf +复制publish\src\linux-x64\publish\supervisord.conf内容替换/etc/supervisor/supervisord.conf +>service supervisor start + +##安装nginx (http://nginx.org/en/linux_packages.html#Ubuntu) +>apt install curl gnupg2 ca-certificates lsb-release +>echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list +>curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - +>apt-key fingerprint ABF5BD827BD9BF62 +>apt update +>apt install nginx +复制\publish\src\linux-x64\publish\nginx.conf内容替换/etc/nginx/nginx.conf +>service nginx start + + +##安装influxdb(https://portal.influxdata.com/downloads/) +>wget https://dl.influxdata.com/influxdb/releases/influxdb_1.7.8_amd64.deb +>sudo dpkg -i influxdb_1.7.8_amd64.deb +>service influxd start + + + + +>nano /etc/ssh/sshd_config +PermitRootLogin yes +>ssh-keygen -t rsa -b 2048 -f /etc/ssh/ssh_host_rsa_key +>service ssh restart + + +##安装pip +>apt install python-pip +>pip --version + +##安装supervisor(http://supervisord.org/) +>pip install supervisor +>mv /etc/supervisor/supervisord.conf /etc/supervisor/supervisord.conf.bk +>>/etc/supervisor/supervisord.conf + 复制publish\src\linux-x64\publish\supervisord.conf内容替换/etc/supervisor/supervisord.conf + 设置开机启动:sudo systemctl enable supervisor + + + + + +##安装mysql + + diff --git a/projects/IoTCenter/iotcenter.db b/projects/IoTCenter/iotcenter.db index 276ac8ef..52f42934 100644 Binary files a/projects/IoTCenter/iotcenter.db and b/projects/IoTCenter/iotcenter.db differ diff --git a/projects/IoTNode/iotnode.db b/projects/IoTNode/iotnode.db index b4a0a2f1..911c2220 100644 Binary files a/projects/IoTNode/iotnode.db and b/projects/IoTNode/iotnode.db differ diff --git a/publish/src/linux-x64/publish/nginx.conf b/publish/src/linux-x64/publish/nginx.conf new file mode 100644 index 00000000..b5b92c0c --- /dev/null +++ b/publish/src/linux-x64/publish/nginx.conf @@ -0,0 +1,54 @@ + +#user nobody; +worker_processes 1; + +#error_log logs/error.log; +#error_log logs/error.log notice; +#error_log logs/error.log info; + +#pid logs/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + sendfile on; + + keepalive_timeout 65; + + server { + listen 0.0.0.0:80; + server_name localhost; + + location ^~ /live/ { + proxy_pass http://localhost:8080/live/; + } + + location ^~ /video/ { + proxy_pass http://localhost:8080/; + } + + location ^~ /UserCenter/ { + proxy_pass http://localhost:8000/; + } + + location ^~ /IoTCenter/ { + proxy_pass http://localhost:8001/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_read_timeout 86400; + } + + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + } +}