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。








posted on 2019-06-27 11:48  栖梧  阅读(4873)  评论(0编辑  收藏  举报