4、啟動openoffic服務,安裝在/opt下進入opt下的openofiice4目錄:# cd /opt/openoffice4/program啟動服務# soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard & 查看端口
已經正常啟動;二、jodconvert的安裝測試下載jodconvert包
然后解壓,找到jar包執行路徑/usr/local/jodconverter/lib/jodconverter-cli-2.2.2.jar測試java -jar /usr/local/jodconverter/lib /jodconverter-cli-2.2.2.jar test.doc test.pdf發現生成pdf文件,說明openoffice安裝啟動成功服務加入開機自啟動#vim /etc/rc.local#!/bin/sh## This script will be executed *after* all the other init scripts.# You can put your own initialization stuff in here if you don't# want to do the full Sys V style init stuff.#route add default gw 192.168.50.1soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &touch /var/lock/subsys/local三、swftools安裝 1、下載地址 http://www.swftools.org/download.html# wget http://www.swftools.org/swftools-2013-04-09-1007.tar.gz2、安裝依賴包# yum -y install giflib-devel libjpeg-develfreetype-devel t1lib-devel zlib3、解壓# tar zxvf swftools-2013-04-09-1007.tar.gz# cd swftools-2013-04-09-1007# ./configure5.編譯安裝# make && make install6、查詢安裝成功后的which pdf2swf目錄#which pdf2swf/usr/local/bin/pdf2swfQS:后來發現安裝openoffice轉換效果并不理想,首先是速度較慢,再就是很多舊文檔,文件格式支持性不好,部分文檔不能轉換,于是乎安裝libreoffice步驟與openoffice差不多1、官網打開http://zh-cn.libreoffice.org/download/libreoffice-still/2、下載穩定版本http://zh-cn.libreoffice.org/download/libreoffice-still/?type=rpm-x86_64&version=5.2&lang=zh-CN3、下載# wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/5.2.5/rpm/x86_64/LibreOffice_5.2.5_Linux_x86-64_rpm.tar.gz下載中文支持包# wget http://download.documentfoundation.org/libreoffice/stable/5.2.5/rpm/x86_64/LibreOffice_5.2.5_Linux_x86-64_rpm_langpack_zh-CN.tar.gz4、解壓,并且到RPMS下,安裝所有的rpm包# rpm -ivh *.rpm5、開啟服務(與openoffice一致)soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard & 四、參考文檔:http://blog.csdn.net/cuker919/article/details/46389449新聞熱點
疑難解答