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


上传到服务器

/usr/local/libreoffice

解压

tar -xvf LibreOffice_6.4.3_Linux_x86-64_rpm.tar.gz

切换目录

cd LibreOffice_6.4.3.2_Linux_x86-64_rpm

切换目录

cd RPMS

安装

yum localinstall *.rpm

在安装之前,先删除老版本

yum remove libreoffice*


  1. yum install cairo -y
  2. yum install cups-libs -y
  3. yum install libSM -y

libreoffice6.4 —headless —convert-to pdf:writer_pdf_Export /usr/local/libreoffice/tuomin2.pptx —outdir /usr/local/libreoffice/

测试libreoffice

  1. [root@VM_0_12_centos RPMS]# libreoffice6.0 -help
  2. Warning: -help is deprecated. Use --help instead.
  3. LibreOffice 6.0.6.2 0c292870b25a325b5ed35f6b45599d2ea4458e77
  4. Usage: soffice [argument...]
  5. argument - switches, switch parameters and document URIs (filenames).
  6. Using without special arguments:
  7. Opens the start center, if it is used without any arguments.
  8. {file} Tries to open the file (files) in the components
  9. suitable for them.
  10. {file} {macro:///Library.Module.MacroName}
  11. Opens the file and runs specified macros from
  12. the file.
  13. Getting help and information:
  14. --help | -h | -? Shows this help and quits.
  15. --helpwriter Opens built-in or online Help on Writer.
  16. --helpcalc Opens built-in or online Help on Calc.
  17. --helpdraw Opens built-in or online Help on Draw.
  18. --helpimpress Opens built-in or online Help on Impress.
  19. --helpbase Opens built-in or online Help on Base.
  20. --helpbasic Opens built-in or online Help on Basic scripting
  21. language.
  22. --helpmath Opens built-in or online Help on Math.
  23. --version Shows the version and quits.
  24. --nstemporarydirectory
  25. (MacOS X sandbox only) Returns path of the temporary
  26. directory for the current user and exits. Overrides
  27. all other arguments.
  28. General arguments:
  29. --quickstart[=no] Activates[Deactivates] the Quickstarter service.
  30. --nolockcheck Disables check for remote instances using one
  31. installation.
  32. --infilter={filter} Force an input filter type if possible. For example:
  33. --infilter="Calc Office Open XML"
  34. --infilter="Text (encoded):UTF8,LF,,,"
  35. --pidfile={file} Store soffice.bin pid to {file}.
  36. --display {display} Sets the DISPLAY environment variable on UNIX-like
  37. platforms to the value {display} (only supported by a
  38. start script).
  39. User/programmatic interface control:
  40. --nologo Disables the splash screen at program start.
  41. --minimized Starts minimized. The splash screen is not displayed.
  42. --nodefault Starts without displaying anything except the splash
  43. screen (do not display initial window).
  44. --invisible Starts in invisible mode. Neither the start-up logo nor
  45. the initial program window will be visible. Application
  46. can be controlled, and documents and dialogs can be
  47. controlled and opened via the API. Using the parameter,
  48. the process can only be ended using the taskmanager
  49. (Windows) or the kill command (UNIX-like systems). It
  50. cannot be used in conjunction with --quickstart.
  51. --headless Starts in "headless mode" which allows using the
  52. application without GUI. This special mode can be used
  53. when the application is controlled by external clients
  54. via the API.
  55. --norestore Disables restart and file recovery after a system crash.
  56. --safe-mode Starts in a safe mode, i.e. starts temporarily with a
  57. fresh user profile and helps to restore a broken
  58. configuration.
  59. --accept={UNO-URL} Specifies an UNO-URL connect-string to create an UNO
  60. acceptor through which other programs can connect to
  61. access the API. UNO-URL is string the such kind
  62. uno:connection-type,params;protocol-name,params;ObjectName.
  63. --unaccept={UNO-URL} Closes an acceptor that was created with --accept. Use
  64. --unaccept=all to close all open acceptors.
  65. --language={lang} Uses specified language, if language is not selected
  66. yet for UI. The lang is a tag of the language in IETF
  67. language tag.
  68. Developer arguments:
  69. --terminate_after_init
  70. Exit after initialization complete (no documents loaded).
  71. --eventtesting Exit after loading documents.
  72. New document creation arguments:
  73. The arguments create an empty document of specified kind. Only one of them may
  74. be used in one command line. If filenames are specified after an argument,
  75. then it tries to open those files in the specified component.
  76. --writer Creates an empty Writer document.
  77. --calc Creates an empty Calc document.
  78. --draw Creates an empty Draw document.
  79. --impress Creates an empty Impress document.
  80. --base Creates a new database.
  81. --global Creates an empty Writer master (global) document.
  82. --math Creates an empty Math document (formula).
  83. --web Creates an empty HTML document.
  84. File open arguments:
  85. The arguments define how following filenames are treated. New treatment begins
  86. after the argument and ends at the next argument. The default treatment is to
  87. open documents for editing, and create new documents from document templates.
  88. -n Treats following files as templates for creation of new
  89. documents.
  90. -o Opens following files for editing, regardless whether
  91. they are templates or not.
  92. --pt {Printername} Prints following files to the printer {Printername},
  93. after which those files are closed. The splash screen
  94. does not appear. If used multiple times, only last
  95. {Printername} is effective for all documents of all
  96. --pt runs. Also, --printer-name argument of
  97. --print-to-file switch interferes with {Printername}.
  98. -p Prints following files to the default printer, after
  99. which those files are closed. The splash screen does
  100. not appear. If the file name contains spaces, then it
  101. must be enclosed in quotation marks.
  102. --view Opens following files in viewer mode (read-only).
  103. --show Opens and starts the following presentation documents
  104. of each immediately. Files are closed after the showing.
  105. Files other than Impress documents are opened in
  106. default mode , regardless of previous mode.
  107. --convert-to OutputFileExtension[:OutputFilterName]
  108. [--outdir output_dir] [--convert-images-to]
  109. Batch convert files (implies --headless). If --outdir
  110. isn't specified, then current working directory is used
  111. as output_dir. If --convert-images-to is given, its
  112. parameter is taken as the target MIME format for *all*
  113. images written to the output format. If --convert-to is
  114. used more than once, the last value of OutputFileExtension
  115. [:OutputFilterName] is effective. If --outdir is used more
  116. than once, only its last value is effective. For example:
  117. --convert-to pdf *.odt
  118. --convert-to epub *.doc
  119. --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc
  120. --convert-to "html:XHTML Writer File:UTF8" *.doc
  121. --convert-to "txt:Text (encoded):UTF8" *.doc
  122. --print-to-file [--printer-name printer_name] [--outdir output_dir]
  123. Batch print files to file. If --outdir is not specified,
  124. then current working directory is used as output_dir.
  125. If --printer-name or --outdir used multiple times, only
  126. last value of each is effective. Also, {Printername} of
  127. --pt switch interferes with --printer-name.
  128. --cat Dump text content of the following files to console
  129. (implies --headless). Cannot be used with --convert-to.
  130. --script-cat Dump text content of any scripts embedded in the files to console
  131. (implies --headless). Cannot be used with --convert-to.
  132. -env:<VAR>[=<VALUE>] Set a bootstrap variable. For example: to set
  133. a non-default user profile path:
  134. -env:UserInstallation=file:///tmp/test
  135. Ignored switches:
  136. -psn Ignored (MacOS X only).
  137. -Embedding Ignored (COM+ related; Windows only).
  138. --nofirststartwizard Does nothing, accepted only for backward compatibility.
  139. --protector {arg1} {arg2}
  140. Used only in unit tests and should have two arguments.