# Prepare your Linux environment for an archive install

This guide helps you prepare your Linux environment for an archive installation.

Archive installation includes a bundled Tomcat web application server.

For installation of the Pentaho Server on an existing web application server, see [Manual installation](/install/pentaho-installation-overview-cp/manual-installation.md).

### Process overview

1. [Create the Pentaho user](#create-the-pentaho-user)
2. [Create Linux directory structure](#create-linux-directory-structure)
3. [Install Java](#install-java)
4. [Install the Pentaho Repository host database](#install-the-pentaho-repository-host-database)
5. [Download and unpack installation files](#download-and-unpack-installation-files)
6. [Set environment variables](#set-environment-variables)
7. [Advanced Linux considerations](#advanced-linux-considerations)
8. [Prepare your Pentaho Repository](#prepare-your-pentaho-repository)

### Create the Pentaho user

Create a user account with administrative privileges.

You will use this account 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 run commands in its home directory.
3. Verify users can write to the directory where you install Pentaho.

### Create Linux directory structure

Choose an installation path.

Pentaho recommends this directory structure under the `pentaho` user’s home directory:

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:

```
<your home directory>/pentaho/server
<your home directory>/.pentaho
```

4. Verify you have read, write, and execute permissions for the directories you created.

### Install Java

Pentaho requires a supported Java version.

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

Example:

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

### Install the Pentaho Repository host database

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:

* PostgreSQL
* MySQL
* MariaDB
* Oracle
* MS SQL Server

2. Check [Components Reference](/install/components-reference.md) for supported database versions.
3. Install the database you selected.
4. Verify the database is installed correctly.

### Download and unpack installation files

Pentaho Server and Operations Mart are delivered as compressed files.

Download them, unpack them, then move their contents to the correct directories.

#### Download files

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. In the **11.x** list, select **Pentaho 11.0 GA Release**.

{% hint style="info" %}
You might need to select **See all \<number> articles** to see the full list of 11.x downloads.
{% endhint %}

4. Scroll to the bottom of the **Pentaho 11.0 GA Release** page.
5. In the file component section, go to `Pentaho Server/Archive Build (Suggested Installation Method)`.
6. Download `pentaho-server-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

1. Locate the two files you downloaded:
   * `pentaho-server-ee-11.0.0.0-<build number>.zip`
   * `pentaho-operations-mart-11.0.0.0-<build number>.zip`
2. Unpack `pentaho-server-ee-11.0.0.0-<build number>.zip` into the `/pentaho/server` directory.
3. Unpack `pentaho-operations-mart-11.0.0.0-<build number>.zip` into the `/pentaho/server` directory.
4. Move the directory for your database into `pentaho/server/pentaho-server/data/<database name>`. Delete the others.

Use these directory names:

* PostgreSQL → `postgresql`
* MySQL → `mysql5`
* Oracle → `oracle10g`
* MS SQL Server → `sqlserver`

5. Complete the steps for installing Data Integration Operations Mart in the **Administer Pentaho Data Integration and Analytics** document before installing your database.

#### Verify directory structure

Verify the files are placed correctly.

Your `pentaho` directory should include:

* `pentaho/server/pentaho-server/`
* `pentaho/server/pentaho-server/data/<database name>`

### Set environment variables

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

1. Set `PENTAHO_JAVA_HOME` to your Java installation directory:

```
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.

### 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.

#### Systems without video cards

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

Do this before you start Pentaho Server the first time.

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

Example:

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

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

#### 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.

### Prepare your Pentaho Repository

Once you finish preparing your environment, initialize and configure the Pentaho Repository.

Select the database you are using:

* [PostgreSQL](/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process-archived-pages/use-postgresql-as-your-repository-database-archive-installation.md)
* [MySQL](/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process-archived-pages/use-mysql-or-mariadb-as-your-repository-database-archive-installation.md)
* [Oracle](/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process-archived-pages/use-oracle-as-your-repository-database-archive-installation.md)
* [MS SQL Server](/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process-archived-pages/use-ms-sql-server-as-your-repository-database-archive-installation.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pentaho.com/install/legacy-redirects/archive-installation-of-pentaho-legacy-pages/archive-installation-process-archived-pages/prepare-your-linux-environment-for-an-archive-install.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
