最近公司實現一個仿豆丁網百度文庫閱讀器的功能,須要用到兩個軟件swftools和openOffice,兩個軟件win平臺運行正常,公司linux服務器運行遇到一些麻煩,下面我把linux平臺安裝順序記錄下來以作之後參考也分享給你們:html
系統:linux centerOS 5.6 X64 軟件下載版本自選java
這裏我下載的軟件都是老版本,新版本安裝不經過。系統有些老,你們能夠根據本身系統選擇下載。linux
1、swftools下載:vim
http://www.swftools.org/download.html
下載 swftools-0.9.1.tar.gz 服務器
2、openOffice下載:less
http://download.openoffice.org/all_rc.html#untested-full socket
Linux x86-64 RPM 測試
OOo_3.3.0_Linux_x86-64_install-rpm-wJRE_zh-CN.tar.gz字體
3、swftools安裝: spa
一、安裝所需的庫和組件。機器以前安裝過了,主要安裝的是下面幾個組件。yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel
二、下載編譯安裝swftools。
tar vxzf swftools-
0.9
.
1
.tar.gz
cd swftools-
0.9
.
1
./configure --prefix=/usr/local/swftools
make
make install
三、設置swftools環境變量,使pdf2swf成爲一個可執行命令
vim /etc/profile
export PATH=$PATH:/usr/local/swftools/bin/
四、安裝xpdf語言包。下載xpdf-chinese-simplified.tar.gz文件,解壓到/usr/local下,編輯add-to-xpdfrc文件,以下:
vim /usr/local/xpdf-chinese-simplified/add-to-xpdfrc
fontDir /usr/share/fonts/win
displayCIDFontTT Adobe-GB1 /usr/share/fonts/win/simhei.ttf
字體文件本身下載…
五、最後使用以下轉換命令測試:
pdf2swf -s languagedir=/usr/local/xpdf-chinese-simplified -T 9 -s poly2bitmap -s zoom=150 -s flashversion=9 "/opt/123.pdf" -o "/opt/test/%.swf"
4、openOffice安裝:
一、解壓安裝包。
# tar -zxvf OOo_3.3.0_Linux_x86-64_install-rpm-wJRE_zh-CN.tar.gz
解壓後,會獲得OOO330_m20_native_packed-1_zh-CN.9567目錄。
二、(進入RPMS目錄)安裝OpenOffice的全部組件
# rpm -ivh openoffice*.rpm
三、(進入RPMS/desktop-integration目錄)安裝OpenOffice的桌面控制檯desktop-integration
# cd desktop-integration
# rpm -ivh openoffice.org3.2-redhat-menus-3.2-9472.noarch.rpm
注意:安裝這個桌面配置環境的時候,應根據本身的系統選擇合理的配置文件包。
四、啓動openOffice
cd /opt/openoffice.org3/program
#soffice -headless -accept="socket,host=localhost,port=8100:urp;" -nofirststartwizard &
或:/opt/openoffice.org3/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
參閱文檔:http://tetop.blog.51cto.com/1883288/817509
http://hi.baidu.com/nessus1/item/a714b5020a2c21d81ff046d0
http://www.doc88.com/p-296361017943.html
http://www.blogjava.net/hongjunli/archive/2010/05/27/322037.html ...