1、部署文档
[# kkFileView部署指南](https://gitee.com/kekingcn/file-online-preview/wikis/pages?sort_id=159257&doc_id=106093)
2、下载发行版
下载地址 https://gitee.com/kekingcn/file-online-preview/releases
3、上传并解压到 local目录下
~~~
mkdir /usr/local/kkFileView/
tar -zxvf kkFileView-4.0.0.tar.gz -C /usr/local/kkFileView/
cd /usr/local/kkFileView/kkFileView-4.0.0/bin
./startup.sh
~~~
![](https://img.kancloud.cn/16/32/16321ad1e40d94c5c9302a2078236ca7_894x760.png)
![](https://img.kancloud.cn/5a/93/5a9317d051106d6a3aaa9ac21163ec71_985x746.png)
4、安全组和防火墙开放8012端口,访问
![](https://img.kancloud.cn/48/55/48551eb95ce4e1a50e10c1d54b7d6bcd_1280x506.png)
5、查看日志
![](https://img.kancloud.cn/e9/46/e946b978b48da86a64b9b67bc88f7258_1754x197.png)
~~~
find / -name LibreOffice_7_rpm.tar.gz
cd /tmp/
ls
mkdir /usr/local/office
mv LibreOffice_7.1.4.2_Linux_x86-64_rpm /usr/local/office
cd /usr/local/office/LibreOffice_7.1.4.2_Linux_x86-64_rpm/RPMS
yum localinstall *.rpm
cd /opt
yum install libSM
yum install libreoffice-headless -y
cd ~
/opt/libreoffice7.1/program/soffice --headless --accept="socket,host=127.0.0.1,port=2001;urp;" --nofirststartwizard &
~~~
![](https://img.kancloud.cn/c5/ec/c5ec4efdb35b1ca7ba22f0323d23bf4b_907x487.png)
![](https://img.kancloud.cn/cd/1e/cd1ea5356dda15b8d9763fb4bd68eccf_1264x139.png)
~~~
cd /usr/local/kkFileView/kkFileView-4.0.0/config
vim application.properties
修改office.home = /opt/libreoffice7.1/
cd /usr/local/kkFileView/kkFileView-4.0.0/bin
./startup.sh
~~~
![](https://img.kancloud.cn/fe/60/fe60b8ccc67f781be026e408a13d1a53_805x215.png)
最后访问如下,表示成功
![](https://img.kancloud.cn/4f/5d/4f5d6e0b3470d891e51a4dcd74d9e9f6_1581x641.png)