Pentaho 简明教程
Pentaho - Installation
现在,让我们了解如何安装和配置 Pentaho Reporting Designer。
Let us now learn how to install and configure Pentaho Reporting Designer.
Prerequisites
Pentaho Reporting 引擎需要 Java 环境。因此,在安装 Pentaho Reporting 之前,请确保系统中安装了 Java。根据操作系统平台,使用下表中的命令验证 Java 安装情况。
The Pentaho Reporting engine requires Java environment. Therefore, before installing Pentaho Reporting, make sure you have Java on your system. Based on the platform you are working on, use a command from the following table to verify your Java installation.
OS |
Command |
Output |
Windows |
Open command prompt: >java -version |
java version "1.7.0_60" Java™ SE Runtime Environment (build 1.7.0_60b19) Java HotSpot™ 64-Bit Server VM (build 24.60-b09, mixed mode) |
Linux |
Open terminal: $ java –version |
java version "1.7.0_60" OpenJDK Runtime Environment (rhel-2.3.10.4.el6_4x86_64) OpenJDK 64-Bit Server VM (build 60.7-b01, mixed mode) |
Mac OS |
Open terminal: $ java –version |
java version "1.7.0_60" Java™ SE Runtime Environment (build 1.7.0_60b19) Java HotSpot™ 64-Bit Server VM (build 24.60-b09, mixed mode) |
如果系统中未安装 Java,请使用以下链接下载并安装 Java: Download and Install Java
If you do not have Java installed on your system, then download and install the same using the following link Download and Install Java.
Download Pentaho Reporting
使用以下链接下载 Pentaho Reporting Designer 最新版本。本教程使用版本 3.7.0。
Download the latest versions of Pentaho Reporting Designer using the following links. For this tutorial, we are using version 3.7.0.
OS |
URL link for download Pentaho Report Designer |
Windows |
|
Linux |
|
Mac OS |
Install Pentaho Reporting
下载文件后,您会找到一个名为 prd-ce-3.7.0-stable 的 Pentaho Reporting Designer 存档文件。该存档文件应按照下表所述的方式提取。
After downloading the files, you will find an archive file of Pentaho Reporting Designer named prd-ce-3.7.0-stable. That archive should be extracted as explained in the following table.
OS |
Installation Instructions |
Windows |
Extract the downloaded file prd-ce-3.7.0-stable.zip using an Unzip tool. Copy the extracted folder (prd-ce-3.7.0-stable) into c:\ directory. Open c:\prd-ce-3.7.0-stable\report-designer directory. Start Pentaho Reporting Designer by double-clicking on the reportdesigner.bat file. |
Linux |
Extract the downloaded file prd-ce-3.7.0-stable.tar.gz using the following command. $ tar –zxvf prd-ce-3.7.0-stable.tar.gz Copy the extracted folder (prd-ce-3.7.0-stable) into “/usr/local/” directory using the following command. # mv prd-ce-3.7.0-stable /usr/local/ Open “/usr/local/prd-ce-3.7.0-stable/report-designer” directory and start Pentaho Reporting Designer using the following commands. $ cd /usr/local/prd-ce-3.7.0-stable/report-designer $ report-designer.sh |
Mac |
Extract the downloaded file prd-ce-370-stable.tar.gz.You will find that folder in the Finder.Copy and Paste Pentaho Report Designer from Finer into /Application folder.Start Pentaho Report Designer using the following command.$ report-designer.sh |
Install Database Driver
Pentaho Reporting Designer 需要数据库连接才能生成关系报告,因此您需要有 JDBC 驱动程序才能与数据库通信。默认情况下,Pentaho 提供一些不同供应商的 JDBC 驱动程序,以支持不同的数据库,例如 MySQL、H2、HypersonicSQL、Hive 等。
Pentaho Reporting Designer requires a database connection to generate relational reports, therefore you need to have a JDBC driver to communicate with the database. By default, Pentaho provides some JDBC drivers of different vendors to support different databases such as MySQL, H2, HypersonicSQL, Hive, etc.
所有默认数据库驱动程序均可在 Pentaho Reporting Designer 的 /lib/ directory 中获得。如果您想要使用任何其他数据库,请下载相应的 JDBC 驱动程序并将其复制到 Pentaho Reporting Designer 的 /lib/ 目录中。否则,您可以使用 JDK 附带的 JDBC-ODBC 桥接驱动程序来使用 ODBC 驱动程序,此桥接驱动程序 (JDBC-ODBC) 适用于所有数据库服务器。
All the default database drivers are available in the /lib/ directory of the Pentaho Reporting Designer. If you want to use any other database, then download the respective JDBC driver and copy it into the /lib/ directory of Pentaho Reporting Designer. Otherwise, you can use ODBC driver via JDBC-ODBC bridge driver that comes with the JDK and this bridge driver (JDBC-ODBC) is suitable for all database servers.
本教程使用 MySQL 数据库服务器及其各自的驱动程序已随 Pentaho lib(Pentaho Reporting Designer 文件的 /lib/ 目录)文件下载。
For this tutorial, we are using MySQL database server and its respective drivers are already downloaded with the Pentaho lib (/lib/ directory of the Pentaho Reporting Designer) files.
Install Additional Fonts
Pentaho Reporting 使用不同的字体在报告中显示文本。在生成 PDF 文件时,Pentaho Reporting 引擎需要访问物理字体文件。报表引擎会在系统相关字体路径中搜索以查找所有可用的字体。除了这些字体之外,Java 运行时环境可能会提供其他字体,具体取决于 Java 和操作系统版本。
Pentaho Reporting uses different fonts to display text inside reports. When generating PDF files, the Pentaho Reporting Engine needs access to the physical font files. The reporting engine searches system dependent font paths to locate all usable fonts. In addition to these fonts, your Java Runtime Environment may offer additional fonts, depending on your Java and Operating system version.
如果您计划创建 PDF 文档并嵌入字体,请确保仅使用报表引擎可实际访问的字体。
If you plan to create PDF documents with embedded fonts, please ensure that you only use fonts that are physically accessible for the reporting engine.
无论操作系统如何,位于 JRE/lib/fonts/ 中的所有字体文件均始终可用于所有导出。
Regardless of your operating system, all font files located in JRE/lib/fonts/ are always usable for all exports.