# Step 1: Prepare your environment

Prepare your Windows or Linux environment for a manual installation of Pentaho by completing the tasks for that environment:

* [Preparing a Windows environment](#preparing-a-windows-environment)
* [Preparing a Linux environment](#preparing-a-linux-environment)

## Preparing a Windows environment for manual installation

Prepare a Windows environment for a manual installation by completing the following tasks, in order:

{% hint style="info" %}
**Note**: If you already installed a supported web application server, skip [Install your web application server](#install-your-web-application-server).
{% endhint %}

{% stepper %}
{% step %}

### Create Windows folder structure

1. Sign in to the machine where you will run Pentaho Server.
2. Create the folder path. (For example, `pentaho\server\pentaho-server`).
3. Verify you have permission to read, write, and run commands in these directories.
4. Verify users can write to the folder where you install Pentaho.
   {% endstep %}

{% step %}

### Install Java on Windows

Pentaho requires a supported Java version.

1. Check [Components Reference](https://docs.pentaho.com/install/components-reference) for supported Java versions.
2. Download a supported JRE or JDK from the [Oracle website](http://www.oracle.com/technetwork/java/javase/downloads/index.html) and install it.
3. Set `JAVA_HOME` to your Java install folder.

Example: `set JAVA_HOME="C:\Program Files\Java\jdk11.x.x.x"`
{% endstep %}

{% step %}

### Install your web application server

If you want to deploy Pentaho Server to your own Tomcat web application server, install Tomcat first.

1. Check [Components Reference](https://docs.pentaho.com/install/components-reference) for supported Tomcat versions.
2. Install the web application server by following the vendor’s documentation. Pentaho recommends installing Tomcat in `pentaho\server\pentaho-server`.
3. Start the web application server and verify the default page loads.
4. Stop the web application server.
   {% endstep %}

{% step %}

### Install the Pentaho Repository host database on Windows

The Pentaho Repository stores data used for scheduling and security. It also stores metadata and models for reports.

1. Choose and install a database to host the Pentaho Repository. Pentaho supports the following databases:
   * PostgreSQL
   * MySQL
   * MariaDB
   * Oracle
   * MS SQL Server
2. Check [Components Reference](https://docs.pentaho.com/install/components-reference) for supported database versions.
3. Install the database.
4. Verify the database starts and you can connect to it.
   {% endstep %}

{% step %}

### Download and unpack installation files in Windows

Download the compressed installation files. Then unpack them into the correct directories.

#### Download files in Windows

1. Sign in to the [Support Portal](https://support.pentaho.com/hc/en-us) using the credentials from your Pentaho Welcome Packet.
2. In the **Pentaho** card, select **Download**.
3. On the **11.x** page, select **Pentaho 11.0 GA Release**.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p><strong>Note</strong>: You might need to select <strong>See all &#x3C;number> articles</strong> to see the full list of 11.x downloads.</p></div>
4. Scroll to the bottom of the **Pentaho 11.0 GA Release** page.
5. In the file component section, go to `Pentaho Server\Manual Build (No Web Application Server)`.
6. Download `pentaho-server-manual-ee-11.0.0.0-<build number>.zip`.
7. In the file component section, go back to `11.0.0.0-GA`.
8. Open the `Operations Mart` folder.
9. Download `pentaho-operations-mart-11.0.0.0-<build number>.zip`.

#### Unpack installation files in Windows

1. Locate the two files you downloaded:
   * `pentaho-server-manual-ee-11.0.0.0-<build number>.zip`
   * `pentaho-operations-mart-11.0.0.0-<build number>.zip`

2. Unpack `pentaho-server-manual-ee-11.0.0.0-<build number>.zip`. Move the contents to `\pentaho\server\pentaho-server`.

3. Unpack `pentaho-operations-mart-11.0.0.0-<build number>.zip`. Move the contents to `\pentaho\server\pentaho-server`.

4. In `\pentaho-server`, open `\pentaho-server-manual-ee`.

5. Unpack these ZIP files and move the contents to the correct directories:

   <table><thead><tr><th width="329">File to unpack</th><th>Folder where you move the file contents</th></tr></thead><tbody><tr><td><code>license-installer.zip</code></td><td><code>pentaho\server</code></td></tr><tr><td><code>jdbc-distribution-utility.zip</code></td><td><code>pentaho\server</code></td></tr><tr><td><code>pentaho-data.zip</code></td><td><code>pentaho\server\pentaho-server</code></td></tr><tr><td><code>pentaho-solutions.zip</code></td><td><code>pentaho\server\pentaho-server</code></td></tr></tbody></table>

6. Copy the `.war` and `.html` files to these directories:

   | File                              | Directories that you copy the file into                              |
   | --------------------------------- | -------------------------------------------------------------------- |
   | `pentaho.war`                     | `pentaho\server\pentaho-server\<tomcat installation folder>\webapps` |
   | `pentaho-style.war`               | `pentaho\server\pentaho-server\<tomcat installation folder>\webapps` |
   | `PentahoServer_OSS_Licenses.html` | `pentaho\server\pentaho-server`                                      |

#### Verify folder structure in Windows

1. Verify the files are placed correctly. Your `pentaho` folder should include:
   * `pentaho\server\pentaho-server\`
   * `pentaho\server\pentaho-server\data\<database name>`
2. If your web application server is installed outside `pentaho\server\pentaho-server`, verify:
   * `pentaho.war` is in your web application server’s `webapps` folder.
   * `pentaho-style.war` is in your web application server’s `webapps` folder.
     {% endstep %}

{% step %}

### Set environment variables in Windows

If you do not set the required environment variables, Pentaho might not start.

1. Set `PENTAHO_JAVA_HOME` to your Java installation folder: `SET PENTAHO_JAVA_HOME=C:\Program Files\Java\jdk11.x.x.x`
2. (Optional) If you are using a JRE, also set `JRE_HOME`.
3. Sign out and sign in again. Then verify the variables are set: `ECHO %PENTAHO_JAVA_HOME%`

After you finish preparing your environment, go to [Step 2: Prepare your Pentaho Repository](https://docs.pentaho.com/install/pentaho-installation-overview-cp/manual-installation/step-2-prepare-your-pentaho-repository).
{% endstep %}
{% endstepper %}

## Prepare your Linux environment for a manual installation

Prepare a Linux environment for a manual installation by completing the following tasks, in order:

{% hint style="info" %}
**Note**: If you already installed a supported web application server, skip Install your web application server.
{% endhint %}

{% stepper %}
{% step %}

### Create the Pentaho user in Linux

Create a user account with administrative privileges. You will use it for the remaining steps.

1. Create an administrative user on the server and name it `pentaho`.
2. Verify the `pentaho` user can read, write, and execute in its home directory.
3. Verify users can write to the directory where you install Pentaho.
   {% endstep %}

{% step %}

### Create Linux directory structure

Choose an installation path. Pentaho recommends this directory structure.

1. Sign in to the machine where you will run the Pentaho Server.
2. Make sure you are signed in as the `pentaho` user.
3. Create these directories under the `pentaho` user’s home directory:

   ```
   <your home directory>/pentaho/server/pentaho-server
   <your home directory>/.pentaho
   ```
4. Verify you have read, write, and execute permissions for the directories you created.
   {% endstep %}

{% step %}

### Install Java on Linux

Pentaho requires a supported Java version.

1. Check [Components Reference](https://docs.pentaho.com/install/components-reference) for the supported Java version.
2. Download and install the supported JRE or JDK.
3. Set `JAVA_HOME` to your Java installation directory. Example:

   ```
   export JAVA_HOME=/usr/lib/jvm/jdk11.x.x.x
   ```

{% endstep %}

{% step %}

### Install your web application server

If you plan to deploy Pentaho on your own Tomcat server, install Tomcat first.

{% hint style="info" %}
**Note**: If you already have a supported Tomcat installed, skip this section.
{% endhint %}

1. Check [Components Reference](https://docs.pentaho.com/install/components-reference) for the supported Tomcat version.
2. Install your web application server, following its vendor documentation.
3. Start the web application server and verify you can reach the default page.
4. Stop the web application server.
   {% endstep %}

{% step %}

### Install the Pentaho Repository host database on Linux

The Pentaho Repository stores data used for scheduling and security. It also stores metadata and models for reports.

1. Choose a supported database type:
   * PostgreSQL
   * MySQL
   * MariaDB
   * Oracle
   * MS SQL Server
2. Check [Components Reference](https://docs.pentaho.com/install/components-reference) for supported database versions.
3. Install the database you selected.
4. Verify the database is installed and running.
   {% endstep %}

{% step %}

### Download and unpack installation files

Pentaho Server and Operations Mart are delivered as compressed files. Download them, unpack them, then copy the contents to the correct directories.

#### Download files

1. Sign in to the [Support Portal](https://support.pentaho.com/hc/en-us) using the credentials in your Pentaho Welcome Packet.
2. In the **Pentaho** card, select **Download**.
3. In the **11.x** list, select **Pentaho 11.0 GA Release**.

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>You might need to select <strong>See all &#x3C;number> articles</strong> to see all downloads.</p></div>
4. In **Pentaho Server/Manual Build (No Web Application Server)**, download: `pentaho-server-manual-ee-11.0.0.0-<build number>.zip`
5. In **Operations Mart**, download: `pentaho-operations-mart-11.0.0.0-<build number>.zip`

#### Unpack installation files

1. Unpack `pentaho-server-manual-ee-11.0.0.0-<build number>.zip`.
2. Move its contents to: `/pentaho/server/pentaho-server`
3. Unpack `pentaho-operations-mart-11.0.0.0-<build number>.zip`.
4. Move its contents to: `/pentaho/server/pentaho-server`
5. In `/pentaho-server`, go to `/pentaho-server-manual-ee`.
6. Unpack these ZIP files and move their contents as shown:
   * `license-installer.zip` → `pentaho/server`
   * `jdbc-distribution-utility.zip` → `pentaho/server`
   * `pentaho-data.zip` → `pentaho/server/pentaho-server`
   * `pentaho-solutions.zip` → `pentaho/server/pentaho-server`
7. Copy these files to your web application server:
   * `pentaho.war` → `pentaho/server/pentaho-server/<tomcat installation directory>/webapps`
   * `pentaho-style.war` → `pentaho/server/pentaho-server/<tomcat installation directory>/webapps`
   * `PentahoServer_OSS_Licenses.html` → `pentaho/server/pentaho-server`

#### Verify directory structure in Linux

1. Verify these directories exist:
   * `pentaho/server/pentaho-server/`
   * `pentaho/server/pentaho-server/data/<database name>`
2. If your web application server is not under `pentaho/server/pentaho-server`, verify you copied the WAR files to your chosen `<tomcat installation directory>/webapps` directory.
   {% endstep %}

{% step %}

### Set environment variables in Linux

If you do not set the required `*_HOME` environment variables, Pentaho may not start correctly.

1. Set `PENTAHO_JAVA_HOME` to your Java installation path. Example:

   ```
   export PENTAHO_JAVA_HOME=/usr/lib/jvm/java-11-oracle
   ```
2. (Optional) If you are using a JRE, also set `JRE_HOME`.
3. Sign out and sign back in, then verify the variables are set.
   {% endstep %}

{% step %}

### Review advanced Linux considerations

Some headless server scenarios need extra configuration:

* A system with no video card
* A system with a video card but no X server installed

In some environments (especially without a video card), you might need both procedures to generate reports.

#### Linux systems without video cards

Add `-Djava.awt.headless=true` to `CATALINA_OPTS` in your application server startup scripts.

{% hint style="warning" %}
Startup can fail if any environment variable value is invalid. Double-check settings after edits.
{% endhint %}

Example:

{% code overflow="wrap" %}

```xml
export CATALINA_OPTS="-Djava.awt.headless=true -Xms4096m -Xmx6144m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
```

{% endcode %}

If you create a service control script, add the same parameter to its `CATALINA_OPTS`.

#### Linux systems without X11

Chart generation requires X11 functions.

If you cannot install an X server, install `Xvfb` instead. Xvfb emulates X11 in memory.

Install Xvfb using your operating system’s package manager.

After you finish preparing your environment, go to [Step 2: Prepare your Pentaho Repository](https://docs.pentaho.com/install/pentaho-installation-overview-cp/manual-installation/step-2-prepare-your-pentaho-repository).
{% endstep %}
{% endstepper %}
