mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-15 21:53:46 +08:00
调整项目模块,jodconverter-core重命名为office-plugin。jdocnverter-web重命名为server
This commit is contained in:
42
server/src/main/bin/install.sh
Normal file
42
server/src/main/bin/install.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
cd /tmp
|
||||
|
||||
install_redhat() {
|
||||
wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz -cO openoffice_rpm.tar.gz && tar zxf /tmp/openoffice_rpm.tar.gz && cd /tmp/zh-CN/RPMS
|
||||
if [ $? -eq 0 ];then
|
||||
yum install -y libXext.x86_64
|
||||
yum groupinstall -y "X Window System"
|
||||
rpm -Uvih *.rpm
|
||||
echo 'install desktop service ...'
|
||||
rpm -Uvih desktop-integration/openoffice4.1.6-redhat-menus-4.1.6-9790.noarch.rpm
|
||||
echo 'install finshed...'
|
||||
else
|
||||
echo 'download package error...'
|
||||
fi
|
||||
}
|
||||
|
||||
install_ubuntu() {
|
||||
wget https://kkfileview.keking.cn/Apache_OpenOffice_4.1.6_Linux_x86-64_install-deb_zh-CN.tar.gz -cO openoffice_deb.tar.gz && tar zxf /tmp/openoffice_deb.tar.gz && cd /tmp/zh-CN/DEBS
|
||||
echo $?
|
||||
if [ $? -eq 0 ];then
|
||||
apt-get install -y libxrender1
|
||||
apt-get install -y libxt6
|
||||
apt-get install -y libxext-dev
|
||||
apt-get install -y libfreetype6-dev
|
||||
dpkg -i *.deb
|
||||
echo 'install desktop service ...'
|
||||
dpkg -i desktop-integration/openoffice4.1-debian-menus_4.1.6-9790_all.deb
|
||||
echo 'install finshed...'
|
||||
else
|
||||
echo 'download package error...'
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if [ -f "/etc/redhat-release" ]; then
|
||||
yum install -y wget
|
||||
install_redhat
|
||||
else
|
||||
apt-get install -y wget
|
||||
install_ubuntu
|
||||
fi
|
||||
2
server/src/main/bin/showlog.sh
Normal file
2
server/src/main/bin/showlog.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
tail -fn 300 ../log/kkFileView.log
|
||||
2
server/src/main/bin/shutdown.sh
Normal file
2
server/src/main/bin/shutdown.sh
Normal file
@@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
kill -15 `ps -ef|grep kkFileView|awk 'NR==1{print $2}'`
|
||||
9
server/src/main/bin/startup.bat
Normal file
9
server/src/main/bin/startup.bat
Normal file
@@ -0,0 +1,9 @@
|
||||
@echo off
|
||||
set "KKFILEVIEW_BIN_FOLDER=%cd%"
|
||||
cd "%KKFILEVIEW_BIN_FOLDER%"
|
||||
echo Using KKFILEVIEW_BIN_FOLDER %KKFILEVIEW_BIN_FOLDER%
|
||||
echo Starting kkFileView...
|
||||
echo Please check log file in ../log/kkFileView.log for more information
|
||||
echo You can get help in our official homesite: https://kkFileView.keking.cn
|
||||
echo If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers
|
||||
java -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=..\config\application.properties -jar kkFileView-2.2.1.jar -> ..\log\kkFileView.log
|
||||
32
server/src/main/bin/startup.sh
Normal file
32
server/src/main/bin/startup.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
DIR_HOME=("/opt/openoffice.org3" "/opt/libreoffice" "/opt/openoffice4" "/usr/lib/openoffice" "/usr/lib/libreoffice")
|
||||
FLAG=
|
||||
OFFICE_HOME=
|
||||
KKFILEVIEW_BIN_FOLDER=$(cd "$(dirname "$0")";pwd)
|
||||
export KKFILEVIEW_BIN_FOLDER=$KKFILEVIEW_BIN_FOLDER
|
||||
cd $KKFILEVIEW_BIN_FOLDER
|
||||
echo "Using KKFILEVIEW_BIN_FOLDER $KKFILEVIEW_BIN_FOLDER"
|
||||
grep 'office\.home' ../config/application.properties | grep '!^#'
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Using customized office.home"
|
||||
else
|
||||
for i in ${DIR_HOME[@]}
|
||||
do
|
||||
if [ -f $i"/program/soffice.bin" ]; then
|
||||
FLAG=true
|
||||
OFFICE_HOME=${i}
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ ! -n "${FLAG}" ]; then
|
||||
echo "Installing OpenOffice"
|
||||
sh ./install.sh
|
||||
else
|
||||
echo "Detected office component has been installed in $OFFICE_HOME"
|
||||
fi
|
||||
fi
|
||||
echo "Starting kkFileView..."
|
||||
echo "Please execute ./showlog.sh to check log for more information"
|
||||
echo "You can get help in our official homesite: https://kkFileView.keking.cn"
|
||||
echo "If this project is helpful to you, please star it on https://gitee.com/kekingcn/file-online-preview/stargazers"
|
||||
nohup java -Dfile.encoding=UTF-8 -Dsun.java2d.cmm=sun.java2d.cmm.kcms.KcmsServiceProvider -Dspring.config.location=../config/application.properties -jar kkFileView-2.2.1.jar > ../log/kkFileView.log 2>&1 &
|
||||
Reference in New Issue
Block a user