部署步驟:vim
1.tar -zxvf Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz緩存
2.yum localinstall openoffice4.1.6-redhat-menus-4.1.6-9790.noarch.rpm服務器
3.運行:/opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizardless
4.出錯:/opt/openoffice4/program/soffice.bin: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directorysocket
5.yum install libXext.x86_64字體
6.no suitable windowing system found, exitingui
7.yum groupinstall "X Window System"spa
8.nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=192.168.100.128,port=8100;urp;" -nofirststartwizard &code
9.中文不顯示問題:部署
在CentOS7服務器上,利用LibreOffice將word等格式轉換爲PDF,發現不支持漢字。須要安裝字體庫。
yum -y install fontconfig
安裝完成後,/usr/share目錄就能夠看到fonts和fontconfig兩個目錄。
yum -y install ttmkfdir
fc-list
#新建文件夾 mkdir /usr/share/fonts/chinese
把Windows系統的字體C:\Windows\Fonts
複製進去。
# 修改字體權限 chmod -R 644 /usr/share/fonts/chinese
ttmkfdir -e /usr/share/X11/fonts/encodings/encodings.dir
vim /etc/fonts/fonts.conf
<fontconfig> .... <dir>.... <dir>/usr/share/fonts/chinese</dir> .... </fontconfig>
fc-cache -fv
OK