openoffice 部署步驟

部署步驟: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安裝字體庫

在CentOS7服務器上,利用LibreOffice將word等格式轉換爲PDF,發現不支持漢字。須要安裝字體庫。

安裝fontconfig

yum -y install fontconfig

安裝完成後,/usr/share目錄就能夠看到fonts和fontconfig兩個目錄。

安裝ttmkfdir

yum -y install ttmkfdir

檢查已有字體庫

fc-list

複製字體

#新建文件夾
mkdir /usr/share/fonts/chinese

把Windows系統的字體C:\Windows\Fonts複製進去。

  • simsun.ttc 宋體
  • simhei.ttf 黑體
  • msyh.ttf 微軟雅黑
  • msyhbd.ttf 微軟雅黑
# 修改字體權限
chmod -R 644 /usr/share/fonts/chinese

彙總生成fonts.scale文件

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

相關文章
相關標籤/搜索