linux安裝openoffice,並解決中文亂碼


1.安裝openoffice

官網http://www.openoffice.org/zh-cn/download/下載

2.解壓並進入文件夾:

cd /zh-cn/RPMS
yum localinstall *.rpm
cd desktop-integration
rpm -ivh openoffice4.1.5-redhat-menus-4.1.5-9789.noarch.rpm

3.啟動

/opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard 臨時啟動
nohup /opt/openoffice4/program/soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard &  后台啟動
注:若啟動報錯:no suitable windowing system found, exiting
添加:yum groupinstall "X Window System"
4.查看啟動:
netstat -lnp |grep 8100 或者 ps -ef |grep soffice

5.安裝中文字體
cd /usr/share/fonts
創建一個中文文件夾,並進入
mkdir chinese
cd chinese
6.復制windos字體到linux:通過xshell,復制粘貼到chinese里面

 

給字體賦予權限並進行一下操作:

chmod 755 *.TTF
chmod 755 *.TTC
mkfontscale (如果提示 mkfontscale: command not found,需自行安裝 # yum install mkfontscale)
mkfontdir
fc-cache -fv(如果提示 fc-cache: command not found,則需要安裝# yum install fontconfig )

然后中文亂碼就解決了,不需要重啟linux。









免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM