配置SFTP服务
创建网站
创建 SFTP 用户
useradd -m -d /home/sftpuser -s /bin/bash sftpuser
passwd sftpuser
设置密码为: 1357924680
chmod -R 777 /home/myworkspace/static/
vi /etc/ssh/sshd_config
取消注释
Subsystem sftp /usr/libexec/openssh/sftp-server
Match User sftpuser
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /home/app/storage
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
sudo systemctl restart sshd
sftp sftpuser@localhost
ls get put
put /path/to/localfile.txt
put /path/to/localfile.txt /home/app/upload
多系统同步的目录是
- /home/myworkspace/sftproot/sync
下载视频的目录是
- /home/myworkspace/sftproot/video
用户上传文件的目录是
- /home/myworkspace/sftproot/upload
版本升级部署
- 复制开发环境下的打包文件到正式服务器
scp target/face-0.0.1-SNAPSHOT.jar root@192.168.3.13:/home/myworkspace/project/smart-camera-SNAPSHOT.jar
- 查看日志
journalctl -f -u smart-camera.service
- 重启服务
systemctl start smart-camera
- 查看端口占用情况
lsof -i | grep 18080
netstat -anp | grep 18080
- 启动视频容器-01
/bin/bash /home/myworkspace/webrtcServer/run/runserver.sh
- 播放视频SDK
- 直接指定请求服务器和端口
schema = 'https'
port = 1443
- 添加播放视频端口转换 端口不够用
location ~ ^/rtc {
proxy_set_header Host $host;
proxy_pass http://localhost:1985;
proxy_read_timeout 600;
}