建立VUE项目
import "@/utils/qwebchannel.js";
import { onBtnSendMsg } from "@/utils/msgutils.js";
//1 。注:此处项目名不能使用大写。
vue init webpack demo
? Project name test99
? Project description A Vue.js project
? Author chenshuaiyu <***********@qq.com>
上面三个都是直接回车
? Vue build standalone
Vue build,有两个选择,Runtime + Compiler 和 Runtime-only ;一般默认选择第一个
? Install vue-router? Yes
是否安装路由 输入 Y 然后回车
? Use ESLint to lint your code? No
? Set up unit tests No
? Setup e2e tests with Nightwatch? No
上面三个都选择 NO
? Should we run `npm install` for you after the project has been created? (recom
mended) npm
选择 npm
更新Nginx
sudo /usr/sbin/nginx -t -c /etc/nginx/nginx.conf
sudo /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
/usr/local/nginx/sbin/nginx -v
wget http://nginx.org/download/nginx-1.9.8.tar.gz
wget http://nginx.org/download/nginx-1.8.1.tar.gz
./configure --add-module=../nginx-rtmp-module-master
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
git clone https://codechina.csdn.net/mirrors/arut/nginx-rtmp-module?utm_source=csdn_github_accelerator
// 配置文件所在文件夹:
/etc/nginx/conf.d/default.conf
//nginx在windows中进行启动时的命令是
start nginx
//nginx在windows中进行停止时的命令是(不保存相关信息)
nginx.exe -s stop
//nginx在windows中进行停止时的命令是(保存相关信息)
nginx.exe -s quit
//nginx在windows中进行重启时的命令是(保存相关信息)
nginx.exe -s reload
nginx -s reload
pkill -9 nginx
nginx 建立文件服务
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
autoindex on;
}
# 下面的才是添加的文件
location /file {
alias E:\updateFile;
index index.html index.htm index.php;
allow all;
autoindex on;
autoindex_exact_size on;
autoindex_localtime on;
}
allow all; // 允许一个ip或者ip段访问
deny 192.168.1.1; // 禁止一个ip或者ip段访问
autoindex on; // 开启目录浏览下载功能
// 默认为on,显示文件的确切大小,单位是bytes。
//off,显示出文件的大概大小,单位是kB或者MB或者GB
autoindex_exact_size off;
//默认为off,显示的文件时间为GMT时间。
//改为on后,显示的文件时间为文件的服务器时间
autoindex_localtime on;
autoindex_format html; // 以网页的风格展示目录内容。该属性在1.7.9及以上适用
charset utf-8,gbk; // 展示中文文件名
docker
// 启动 docker
systemctl start docker
//停止docker:
systemctl stop docker
//重启docker:
systemctl restart docker
//查看docker状态:
systemctl status docker
//开机启动:
systemctl enable docker
//查看docker概要信息
docker info
```javascript
//1 。注:此处项目名不能使用大写。
vue init webpack demo
//1 。注:此处项目名不能使用大写。
vue init webpack demo