在CentOS系统上定制化配置LibreOffice的步骤如下:
安装LibreOffice:
wget http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/6.2.8/rpm/x86_64/LibreOffice_6.2.8_Linux_x86-64_rpm.tar.gz
tar -zxvf LibreOffice_6.2.8_Linux_x86-64_rpm.tar.gz -C /usr/local
cd /usr/local/LibreOffice_6.2.8.2_Linux_x86-64_rpm/RPMS/
sudo yum localinstall *.rpm
配置环境变量:
/etc/profile
文件,添加以下内容:export LibreOffice_PATH=/usr/local/LibreOffice_6.2.8.2_Linux_x86-64_rpm/program
export PATH=$LibreOffice_PATH:$PATH
source /etc/profile
解决中文乱码问题:
cp -r C:\Windows\Fonts /usr/share/fonts/chinese
mkfontscale
mkfontdir
fc-cache -fv
fc-list :lang=zh
高级配置:
nano ~/.config/libreoffice/4/user/sofficerc
启动LibreOffice服务:
libreoffice --headless --accept="socket,host=0.0.0.0,port=8100;urp;" --nofirststartwizard
ps -ef | grep 8100