1.先安装jdk
yum list java-1.8* yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel 检查java版本 java -vsersion
2.安装mvn
wget https://dlcdn.apache.org/maven/maven-3/3.9.8/binaries/apache-maven-3.9.8-bin.tar.gz tar -zxvf apache-maven-3.8.1-bin.tar.gz -C /usr/local vim /etc/profile export M2_HOME=/usr/local/apache-maven-3.9.8 export PATH=${M2_HOME}/bin:${PATH} source /etc/profile mvn -version 修改国内镜像源,放在mirrors里 配置文件在mvn目录下的conf/setting.xml <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror>
3.安装openoffice
下载地址 https://www.openoffice.org/zh-cn/
https://cfhcable.dl.sourceforge.net/project/openofficeorg.mirror/4.1.15/binaries/zh-CN/Apache_OpenOffice_4.1.15_Linux_x86-64_install-rpm_zh-CN.tar.gz?viasf=1
tar -zxvf Apache_OpenOffice_4.1.15_Linux_x86-64_install-rpm_zh-CN.tar.gz # 安装 yum localinstall -y zh-CN/RPMS/*.rpm yum localinstall -y zh-CN/RPMS/desktop-integration/openoffice4.1.15-redhat-menus-4.1.15-9813.noarch.rpm centos 8以上 dnf groupinstall "Server with GUI" centos7 yum groupinstall "X Window System" -y
4.下载kkfileview
https://gitee.com/kekingcn/file-online-preview/releases
下载tar.gz压缩包、解压、cd
执行打包 mvn clean package -DskipTests 如果没什么问题的话,会在server/target 目录下生成 kkFileView-4.4.0-beta.jar
5.运行
java -jar kkFileView-4.4.0-beta.jar
6.中文乱码
下载如下字体包 https://kkfileview.keking.cn/fonts.zip
文件解压完整拷贝到Linux下的 /usr/share/fonts目录。
然后执行fc-cache使字体生效
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com