- Download/Install JAVA Environment (java 17 or later).
- Set "JAVA_HOME" and "CLASSPATH" environment variables. You can copy
java.sh
toprofile.d
folder to do it, modify theJAVA_HOME
as required. - Run the command:
java -version
to check if Java is installed.
- Install report fonts as required (see
rpt-srv
README).
- Download/Install tomcat (tomcat 10 or later).
- Set tomcat service, you can copy
tomcat.service
to/usr/lib/systemd/system
folder, modify theJAVA_HOME
as required. - Run the command:
systemctl start tomcat
to start the tomcat. - Open a browser and type
http://serverIP:port
to check if tomcat works. - Copy
DataSrv.war;RptSrv.war
to pathtomcat-*/webapps
.
- mount windows share folder in linux
mount -t cifs -o user=user,password=password //server/sharename /mnt/mnt/Manual
mount -t cifs -o user=user,password=password //server/sharename /mnt/mnt/Drawing
- Download/Install nginx.
- Set nginx service, you can copy
nginx.service
to/usr/lib/systemd/system
folder. - Run the command:
systemctl start nginx
to start the nginx. - copy
web/dist/spa/\*
tonginx/html/
- add these config to
nginx.conf
location ^~ /Data/ { proxy_pass http://localhost:8080/data-srv; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location ^~ /Report/ { proxy_pass http://localhost:8080/rpt-srv; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } location ^~ /File/ { root /mnt; rewrite '^File/(.*)' /$1 break; } location ^~ /mnt/Drawing/ { root /mnt/Drawing; } location ^~ /mnt/Manual/ { root /mnt/Manual; }
Note: Don't forget open you firewall to allow the http 80 port
- if use file upload function, mostly, you need change the default upload size limit both in
nginx.conf
and java appclient_max_body_size 500m; proxy_connect_timeout 300s; proxy_send_timeout 300s; proxy_read_timeout 300s;
application.properties
// single file size limit spring.servlet.multipart.max-file-size= 500MB // total size limit per one request spring.servlet.multipart.max-request-size= 500MB