1、前置环境
CentOS7.9
Java: 1.8+
2、安装kkfileview
官网地址:https://kkfileview.keking.cn/zh-cn/docs/home.html
$ cd /opt/file-preivew
$ wget https://kkfileview.keking.cn/kkFileView-4.0.0.tar.gz
3、安装office组件(报错提示:启动office组件失败,请检查office组件是否可用)
$ cd kkFileView/bin/
$ ./install.sh
4、安装成功如图所示
5、查看office组件版本
$ ./soffice --version
6、配置kkfileview参数
$ vim kkFileView-4.1.0/config/application.properties
#######################################不可动态配置,需要重启生效#######################################
server.port = ${KK_SERVER_PORT:8012}
server.servlet.context-path&#