OpenOffice安装

1、安装OpenOffice 4:下载路径:http://www.openoffice.org/download/index.html

2、用以下命令启动OpenOffice服务
​ cd D:\Program Files (x86)\OpenOffice 4\program
​ soffice -headless -accept=“socket,host=127.0.0.1,port=8100;urp;” -nofirststartwizard

3、关闭OpenOffice的服务

​ 1.使用命令行方式

C:\Program Files (x86)\OpenOffice 4\program>netstat -ano|findstr "8100"
  TCP    172.16.10.246:8100     0.0.0.0:0              LISTENING       24000
C:\Program Files (x86)\OpenOffice 4\program>taskkill /f /pid 24000

​ 2.使用界面方式
在这里插入图片描述

linux下:

cd /opt/openoffice4/program

./soffice “-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager” -nologo -headless -nofirststartwizard &

如果启动提示:no suitable windowing system found, exiting. 则表示 系统没有窗口程序,openOffice的安装需要窗口程序,有一下两种解决方案:

第一种方案:安装窗口程序

# 不限于一种窗口程序
yum groupinstall "X Window System"

第二种方案:安装虚拟窗口程序

# 如果是Ubuntu系统可以尝试
apt-get install -y xvfb
#centos系统会提示 This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
#需要换用163的镜像 进入 /etc/yum.repos.d/ 目录下下载163镜像 
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
#将文件中$releasever 全部替换为当前版本
#生成缓存
yum makecache
yum search xvfb
yum install -y xorg-x11-server-Xvfb.x86_64
xvfb-run -a soffice  -headless  -nologo  -norestore  -nofirststartwizard -accept="socket,host=localhost,port=8100;urp"

相关文章: