微服务学习(九):安装OpenOffice
一、下载OpenOffice
下载地址:OpenOffice
二、开始安装
上传资源到服务器

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

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

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

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

三、启动OpenOffice
临时启动:
sh
/opt/openoffice4/program/soffice -headless -accept="socket,host=0.0.0.0,port=8100;urp;" -nofirststartwizard
后台启动:
sh
nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=0.0.0.0,port=8100;urp;" -nofirststartwizard &
开机自启动:
sh
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
五、验证是否启动成功
查看进程
sh
ps -ef | grep openoffice

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