1 Star 0 Fork 0

Jack_Chen/springboot-demo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

安装libreoffice:https://blog.csdn.net/an129/article/details/126766228 ###CentOS 7 安装LibreOffice 7.4.0 过程

1、检查当前操作系统环境是否已经安装了LibreOffice。

libreoffice --version

如果已经安装,需要把自带的LibreOffice卸载。

yum remove libreoffice-*

2、进入LibreOffice官网下载rpm安装包,访问地址:

https://zh-cn.libreoffice.org/download/libreoffice/

3、解压并安装LibreOffice。

tar -zxvf ./LibreOffice_7.4.0_Linux_x86-64_rpm.tar.gz cd LibreOffice_7.4.0.3_Linux_x86-64_rpm/RPMS/ yum -y localinstall *.rpm

4、安装libreoffice-headless

yum install -y libreoffice-headless

5、验证LibreOffice是否可用

libreoffice7.4 --version

如果命令可以正常执行显示版本号的话,说明安装成功;若提示缺少so文件的话,需要安装对应的依赖文件。见末尾;

##word转pdf yum install libreoffice-writer 转换命令:libreoffice --headless --convert-to pdf /temp/2.docx --outdir /temp/8.pdf

使用Java转换需要开启服务: cd /opt/libreoffice7.4/program soffice -headless -accept="socket,host=0.0.0.0,port=18100;urp;" -nofirststartwizard &

###安装字体

####windows字体

https://github.com/hushanyi/windows_fonts

####安装步骤:

1、fc -list查看字体库

2、yum -y install fontconfig安装

3、安装好后/usr/share目录下多两个目录fonts和fontconfig

4、首先在/usr/shared/fonts目录下新建一个目录chinese

5、到C:\Windows\Fonts目录下上传你需要的字体到/usr/shared/fonts/chinese目录下

6、修改chinese权限

chmod -R 755 /usr/share/fonts/chinese

7、接下来需要安装ttmkfdir来搜索目录中所有的字体信息,并汇总生成fonts.scale文件,输入命令:

yum -y install ttmkfdir

8、最后一步就是修改字体配置文件了,首先通过编辑器打开配置文件:

vi /etc/fonts/fonts.conf

    <!-- Font directory list -->
    <dir>/usr/share/fonts</dir>
    <dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir>
    <dir prefix="xdg">fonts</dir>
    <dir>/usr/share/fonts/chinese</dir>
    <!-- the following element will be removed in the future -->
    <dir>~/.fonts</dir>

9、fc-cache 刷新

10、fc-list

##【缺少文件步骤】

6、安装依赖库文件

yum install cairo -y yum install cups-libs -y yum install libSM -y 在这些依赖库文件之中,“libcurl.so.4”库文件的安装过程比较复杂,需要编译安装libcurl才能完成。

7、安装libcurl.so.4库文件

(1)下载安装openssl源代码,https://github.com/openssl/openssl/archive/OpenSSL_1_1_1g.zip

(2)创建安装目录:/opt/openssl

(3)解压所代码压缩包。

unzip openssl-OpenSSL_1_1_1g.zip

(4)编译配置、安装。

cd openssl-OpenSSL_1_1_1g/ ./config --prefix=/opt/openssl --shared make && make install

(5)下载curl源代码,curl - Download

(6)创建安装目录:/opt/libcurl

(7)解压源代码压缩包。

tar -zxvf curl-7.85.0.tar.gz

(8)编译配置、安装。

cd curl-7.85.0 ./configure --prefix=/opt/libcurl --with-ssl=/opt/openssl make && make install

(9)将libcurl.so.4库文件拷贝至/opt/libreoffice7.4/program目录下,覆盖原libcurl.so.4文件。

ln -s /opt/libcurl/lib/libcurl.so.4 /opt/libreoffice7.4/program/libcurl.so.4

(10)设置命令别名。

alias libreoffice='libreoffice7.4'

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

语言

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/ChenLonggitee/springboot-demo.git
git@gitee.com:ChenLonggitee/springboot-demo.git
ChenLonggitee
springboot-demo
springboot-demo
master

搜索帮助