CentOs7安装ApacheOpenOffice

下载

wget https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.6/binaries/zh-CN/Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz

安装

tar -zxvf Apache_OpenOffice_4.1.6_Linux_x86-64_install-rpm_zh-CN.tar.gz
[root@localhost RPMS]# rpm -Uvih *rpm

默认安装路径/opt/openoffice4/program/soffice

查看8100端口情况

[root@localhost program]# netstat -lnp | grep 8100

启动OpenOffice

./soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &

报错

[root@localhost program]# ./soffice  -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
/opt/openoffice4/program/soffice.bin: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory

找不到libXext.so.6文件,去系统里面的/usr/lib64 或者 /usr/lib 查看有没有这个文件,如果有就copy到/opt/openoffice4/program/目录里面,

赋予chmod 777  libXext.so.6 。如果没有那么要安装该包。

由于我的系统是64位,那么输入yum install libXext.x86_64 ,如果是32位系统输入:yum install libXext.i686 。安装完成后去那两个目录找libXext.so.6复制到

/opt/openoffice4/program/目录里面,赋予chmod 777  libXext.so.6
报错

[root@localhost program]# ./soffice  -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &
no suitable windowing system found, exiting.

输入安装:yum groupinstall “X Window System”
启动后查看是否有OpenOffice的进程在执行

[root@localhost ~]# netstat -lnp | grep 8100
tcp        0      0 127.0.0.1:8100          0.0.0.0:*               LISTEN      14859/soffice.bin   
unix  2      [ ACC ]     STREAM     LISTENING     18100    1239/master          private/lmtp
[root@localhost ~]# ps -ef|grep office
root     14850 11198  0 13:47 pts/3    00:00:00 /bin/sh ./soffice -headless -accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard
root     14859 14850  0 13:47 pts/3    00:00:00 /opt/openoffice4/program/soffice.bin -headless -accept=socket,host=127.0.0.1,port=8100;urp; -nofirststartwizard
root     14941 14899  0 13:50 pts/4    00:00:00 grep --color=auto office

解决pdf乱码和中文不显示问题

[root@localhost inner]# cd /usr/share/fonts
[root@localhost fonts]# ls
dejavu
[root@localhost fonts]# cd dejavu/
[root@localhost dejavu]# ll

上传到服务器/usr/share/fonts/目录下,新建back目录
C:\Program Files (x86)\Microsoft Office\root\VFS\Fonts\private
把之前的soffice进程kill掉,然后新启动即可

参考1、https://blog.csdn.net/liangxun0712/article/details/79301746
2、https://blog.csdn.net/cuker919/article/details/46389449

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值