Linux环境下安装LibreOffice
一、安装LibreOffice
1、查看当前yum支持当前Linux安装的LibreOffice版本yum search libreoffice
2、查看libreoffice安装包基本信息yum info libreoffice
3、安装libreofficeyum install -y libreoffice
安装完成
4、查看libreoffice安装地址whereis libreoffice
5、启动命令/usr/bin/soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard &
查看是否启动成功:
查看端口:netstat -anp |grep "8100"
查看进程:ps -ef | grep 进程id
启动成功
二、安装字体
因为linux系统下可能缺少一部分字体,可能会导致office转pdf文档的过程中出现中文乱码的问题,因此需要安装字体。
字体安装
安装完字体后需要重启LibreOffice服务!!!
设置LibreOffice开机自启
vi /etc/rc.local
添加命令:/usr/bin/soffice --headless --accept="socket,host=127.0.0.1,port=8100;urp;" --nofirststartwizard &