libreoffice 下载
直接wget url
http://mirrors.ustc.edu.cn/tdf/libreoffice/stable/
https://tipsmake.com/how-to-install-the-latest-libreoffice-version-on-centos-8
官网下载 6.4.6 tar.gz
上传到服务器
解压
tar -xvf LibreOffice_6.4.3_Linux_x86-64_rpm.tar.gz
切换目录
cd LibreOffice_6.4.3.2_Linux_x86-64_rpm
切换目录
安装
在安装之前,先删除老版本
yum remove libreoffice*
yum install cairo -yyum install cups-libs -yyum install libSM -y
libreoffice6.4 —headless —convert-to pdf:writer_pdf_Export /usr/local/libreoffice/tuomin2.pptx —outdir /usr/local/libreoffice/
测试libreoffice
[root@VM_0_12_centos RPMS]# libreoffice6.0 -helpWarning: -help is deprecated. Use --help instead.LibreOffice 6.0.6.2 0c292870b25a325b5ed35f6b45599d2ea4458e77Usage: soffice [argument...]argument - switches, switch parameters and document URIs (filenames).Using without special arguments:Opens the start center, if it is used without any arguments.{file} Tries to open the file (files) in the componentssuitable for them.{file} {macro:///Library.Module.MacroName}Opens the file and runs specified macros fromthe file.Getting help and information:--help | -h | -? Shows this help and quits.--helpwriter Opens built-in or online Help on Writer.--helpcalc Opens built-in or online Help on Calc.--helpdraw Opens built-in or online Help on Draw.--helpimpress Opens built-in or online Help on Impress.--helpbase Opens built-in or online Help on Base.--helpbasic Opens built-in or online Help on Basic scriptinglanguage.--helpmath Opens built-in or online Help on Math.--version Shows the version and quits.--nstemporarydirectory(MacOS X sandbox only) Returns path of the temporarydirectory for the current user and exits. Overridesall other arguments.General arguments:--quickstart[=no] Activates[Deactivates] the Quickstarter service.--nolockcheck Disables check for remote instances using oneinstallation.--infilter={filter} Force an input filter type if possible. For example:--infilter="Calc Office Open XML"--infilter="Text (encoded):UTF8,LF,,,"--pidfile={file} Store soffice.bin pid to {file}.--display {display} Sets the DISPLAY environment variable on UNIX-likeplatforms to the value {display} (only supported by astart script).User/programmatic interface control:--nologo Disables the splash screen at program start.--minimized Starts minimized. The splash screen is not displayed.--nodefault Starts without displaying anything except the splashscreen (do not display initial window).--invisible Starts in invisible mode. Neither the start-up logo northe initial program window will be visible. Applicationcan be controlled, and documents and dialogs can becontrolled and opened via the API. Using the parameter,the process can only be ended using the taskmanager(Windows) or the kill command (UNIX-like systems). Itcannot be used in conjunction with --quickstart.--headless Starts in "headless mode" which allows using theapplication without GUI. This special mode can be usedwhen the application is controlled by external clientsvia the API.--norestore Disables restart and file recovery after a system crash.--safe-mode Starts in a safe mode, i.e. starts temporarily with afresh user profile and helps to restore a brokenconfiguration.--accept={UNO-URL} Specifies an UNO-URL connect-string to create an UNOacceptor through which other programs can connect toaccess the API. UNO-URL is string the such kinduno:connection-type,params;protocol-name,params;ObjectName.--unaccept={UNO-URL} Closes an acceptor that was created with --accept. Use--unaccept=all to close all open acceptors.--language={lang} Uses specified language, if language is not selectedyet for UI. The lang is a tag of the language in IETFlanguage tag.Developer arguments:--terminate_after_initExit after initialization complete (no documents loaded).--eventtesting Exit after loading documents.New document creation arguments:The arguments create an empty document of specified kind. Only one of them maybe used in one command line. If filenames are specified after an argument,then it tries to open those files in the specified component.--writer Creates an empty Writer document.--calc Creates an empty Calc document.--draw Creates an empty Draw document.--impress Creates an empty Impress document.--base Creates a new database.--global Creates an empty Writer master (global) document.--math Creates an empty Math document (formula).--web Creates an empty HTML document.File open arguments:The arguments define how following filenames are treated. New treatment beginsafter the argument and ends at the next argument. The default treatment is toopen documents for editing, and create new documents from document templates.-n Treats following files as templates for creation of newdocuments.-o Opens following files for editing, regardless whetherthey are templates or not.--pt {Printername} Prints following files to the printer {Printername},after which those files are closed. The splash screendoes not appear. If used multiple times, only last{Printername} is effective for all documents of all--pt runs. Also, --printer-name argument of--print-to-file switch interferes with {Printername}.-p Prints following files to the default printer, afterwhich those files are closed. The splash screen doesnot appear. If the file name contains spaces, then itmust be enclosed in quotation marks.--view Opens following files in viewer mode (read-only).--show Opens and starts the following presentation documentsof each immediately. Files are closed after the showing.Files other than Impress documents are opened indefault mode , regardless of previous mode.--convert-to OutputFileExtension[:OutputFilterName][--outdir output_dir] [--convert-images-to]Batch convert files (implies --headless). If --outdirisn't specified, then current working directory is usedas output_dir. If --convert-images-to is given, itsparameter is taken as the target MIME format for *all*images written to the output format. If --convert-to isused more than once, the last value of OutputFileExtension[:OutputFilterName] is effective. If --outdir is used morethan once, only its last value is effective. For example:--convert-to pdf *.odt--convert-to epub *.doc--convert-to pdf:writer_pdf_Export --outdir /home/user *.doc--convert-to "html:XHTML Writer File:UTF8" *.doc--convert-to "txt:Text (encoded):UTF8" *.doc--print-to-file [--printer-name printer_name] [--outdir output_dir]Batch print files to file. If --outdir is not specified,then current working directory is used as output_dir.If --printer-name or --outdir used multiple times, onlylast value of each is effective. Also, {Printername} of--pt switch interferes with --printer-name.--cat Dump text content of the following files to console(implies --headless). Cannot be used with --convert-to.--script-cat Dump text content of any scripts embedded in the files to console(implies --headless). Cannot be used with --convert-to.-env:<VAR>[=<VALUE>] Set a bootstrap variable. For example: to seta non-default user profile path:-env:UserInstallation=file:///tmp/testIgnored switches:-psn Ignored (MacOS X only).-Embedding Ignored (COM+ related; Windows only).--nofirststartwizard Does nothing, accepted only for backward compatibility.--protector {arg1} {arg2}Used only in unit tests and should have two arguments.
