在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