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