下载地址:OpenOffice

上传资源到服务器

解压资源包
tar -zxvf Apache_OpenOffice_4.1.13_Linux_x86-64_install-rpm_zh-CN.tar.gz

进入zh-CN/RPMS目录下安装rpm文件
cd zh-CN/RPMS
yum localinstall *.rpm

进入desktop-integration目录,安装
cd desktop-integration

yum localinstall openoffice4.1.13-redhat-menus-4.1.13-9810.noarch.rpm
安装完成后会在/opt目录下生成openoffice4文件夹

临时启动:
/opt/openoffice4/program/soffice -headless -accept="socket,host=0.0.0.0,port=8100;urp;" -nofirststartwizard
后台启动:
nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=0.0.0.0,port=8100;urp;" -nofirststartwizard &
开机自启动:
vim /etc/rc.local
nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=0.0.0.0,port=8100;urp;" -nofirststartwizard &
问题1:缺少lib库文件
错误:/opt/openoffice4/program/soffice.bin: error while loading shared libraries: libXext.so.6: cannot open shared object file: No such file or directory
解决:
安装
yum install libXext.x86_64
安装完成之后复制到openoffice目录
cp -a usr/lib64/libXext.so.6 /opt/openoffice4/program/

问题2:没有图形界面
错误:no suitable windowing system found, exiting.
安装:yum groupinstall "Server with GUI" -y
查看进程
ps -ef | grep openoffice

查看默认端口是否启用完成
netstat -tln
