开放端口
- 80/443/8800,web后台端口,nginx代理服务,nginx默认为8800端口
- 8808,JT808专用端口
- 6802,视频播放推流端口
- 6891-6898,FTP端口
- 6821,苏标主动安全附件服务器端口
环境要求
- JDK 1.8
- mysql 8.0
- redis 3.2
- nginx 1.20
环境安装说明
- JDK1.8安装说明[https://www.lingx.com/archives/212.html]
- mysql 8.0 安装说明[https://blog.csdn.net/qq_36408717/article/details/126705287]
- redis 一般直接安装 yum install redis,安装后需要将密码设为lgx123
- nginx 一般直接安装 yum install nginx,配置文件将压缩包的nginx/conf.d/jt808.conf复制到/etc/nginx/conf.d目录下。
数据库初始化
mysql8.0数据库成功安装后,使用root用户登入,root用户密码也重置为lgx123
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'lgx123';
FLUSH PRIVILEGES;
创建数据库名为jt808,相应指令为:
create database jt808;
导入安装包中的jt808.sql
use jt808;
source /root/jt808.sql;
系统安装
下载系统部署包[https://pan.baidu.com/s/1zUx8qCiROYQc4G_HnjRquw?pwd=z22s ],该部署包是按windows环境打包的,所以有些文件不必上传。
上传安装包内的以下目录:
adas_file_server //苏标主动安全附件服务,没有主动安全功能需求可忽略
jt1078_ftp_server //视频文件FTP上传服务,没有视频文件上传需求可忽略
jt1078_play_server //视频实时播放与历史回放服务,没有视频功能需求可忽略
jt808_html
jt808_server
进入jt808_server,jt1078_play_server,adas_file_server进入这三个目录,分别授权.sh文件的执行权限,如下:
chmod 775 *.sh
系统配置
- 修改数据库配置,分别进入jt808_server,adas_file_server的conf/config/db.properties修改相应参数
- 修改redis配置,只需进入jt808_server/conf/config/redis/redis.properties修改相应参数
- 修改端口,jt808_server/conf/config/redis/jt808.properties
- 修改苏标附件存储地址,adas_file_server/conf/config/server.properteis
- 修改FTP配置jt1078_ftp_server\res\conf\ftpd-typical.xml中的公网IP改成自己的公网IP,users.properties中的存储路径改成正确指令部署目录jt808_html
配置nginx
一般只需要修改部署jt808_html真实目录,其他看情况修改,一般保持默认不需要修改。
server {
listen 8800;
server_name 127.0.0.1;
location / {
root D:/jt808/jt808_html; #这里指向部署jt808_html真实目录
index index.html;
}
location /lingx3api {
proxy_pass http://localhost:9876/api;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /lingx3kaptcha {
proxy_pass http://localhost:9876/kaptcha;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /lingx3excel {
proxy_pass http://localhost:9876/excel;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /lingx3upload {
proxy_pass http://localhost:9877/upload;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location /wss6899/{
proxy_pass http://127.0.0.1:6899/;
proxy_http_version 1.1;
proxy_read_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /wss8803/{
proxy_pass http://127.0.0.1:8803/;
proxy_http_version 1.1;
proxy_read_timeout 3600s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-real-ip $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
启动重启
-
环境启动
Nginx启动指令service nginx start,重启指令service nginx restart
Redis启动指令service redis start,重启指令service nginx restart
Mysql启动指令service mysql start,重启指令service mysql restart
以上是常规安装的操作方式,特殊安装按自己方式操作 -
系统模块启动
jt808_server进入该目录启动./start.sh,重启./restart.sh
jt1078_play_server进入该目录启动./start.sh,重启./restart.sh
jt1078_ftp_server进入该目录下的bin目录启动./start.sh,重启kill再启动
adas_file_server进入该目录启动./start.sh,重启./restart.sh
jt808_html无需启动,由nginx代理