> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/installation/installing-data-quality-observability-self-hosted-on-self-hosted-spark-standalone/complete-the-initial-setup.md).

# Complete the initial setup

After [installing Collibra DQ Standalone](/data-quality-self-hosted/installation/installing-data-quality-observability-self-hosted-on-self-hosted-spark-standalone/install-on-self-hosted-spark-standalone.md), you are ready to complete the initial setup.

## Set the license key and name

After executing the `setup.sh` script, set the license key and name. They are provided by Collibra in your license provision email. Use the following commands:

```
export DQ_INSTALL_DIR=/opt 
echo "export LICENSE_KEY=<key>" >> $DQ_INSTALL_DIR/owl/config/owl-env.sh 
echo "export LICENSE_NAME=<name>" >> $DQ_INSTALL_DIR/owl/config/owl-env.sh 
```

Then restart the DQ Web service:

```
./owlmanage.sh stop=owlweb
./owlmanage.sh start=owlweb
```

## Log in to Collibra DQ

1. Verify that the DQ Web application is running by opening the following URL in your browser:

   `<YOUR_SERVER_IP>:9000`

   The Collibra DQ login page displays.

   ![Login page of DQ Web UI](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-7993d65202e0cd4e94dd7404995f5dd1e07cd85f%2FDQ-Login.png?alt=media)
2. Log in to the admin user account. The username is **admin** and the password is specified in the environment variable DQ\_ADMIN\_USER\_PASSWORD.

   <div data-gb-custom-block data-tag="hint" data-style="success" class="hint hint-success"><p>If necessary, select the <strong>Remember Me</strong> option. After you log out, this option will automatically log you in if you have an active SSO session and SAML is enabled.</p></div>

## Verify that the Spark cluster has started

1. Open the following URL in your browser:

   `<YOUR_SERVER_IP>:8080`

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This port may not be open depending on your environment.</p></div>

   The Spark Master page displays.

   ![Fig 3: Spark Master Web UI](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-44c51f5ee2c6824004ee91f1b7f5fc1db6ea00f4%2FScreenshot%202021-06-14%20at%204.17.30%20PM.png?alt=media)
2. Take note of the Spark Master URL. It is required during DQ Agent configuration.

## Update DQ Agent properties

In this step, you'll start the DQ Agent, which creates a file called `agent.properties`. You'll then stop the agent, edit the `agent.properties` file, and then restart DQ Agent.

{% stepper %}
{% step %}
Start the DQ Agent. Enter the following commands:

```
cd $OWL_BASE/owl/bin
./owlmanage.sh start=owlagent
```

This process creates the file `agent.properties` in the `$OWL_BASE/owl/config` directory.

{% hint style="info" %}
To see the directory structure created by `setup.sh`, go to [Data Quality & Observability (self-hosted) Directory Structure](/data-quality-self-hosted/architecture/data-quality-observability-self-hosted-directory-structure.md).
{% endhint %}
{% endstep %}

{% step %}
Stop the DQ Agent. Enter the following command:

```
./owlmanage.sh stop=owlagent
```

{% endstep %}

{% step %}
Add the following lines to the agent.properties file:

```
sparksubmitmode=native
sparkhome=</your/spark/home/folder>
```

{% endstep %}

{% step %}
Start the agent again. Enter the following command:

```
./owlmanage.sh start=owlagent
```

{% endstep %}

{% step %}
The `agent.properties` file identifies the number of agents installed on your server. Since this is the first non-default agent installed, the expected number of agents is 2. Verify that `agent.properties` contains the correct details.

```
cd $OWL_BASE/owl/config
cat agent.properties
```

The output should include `agentid=2`.
{% endstep %}
{% endstepper %}

## Edit the DQ Agent configuration

{% stepper %}
{% step %}
In the DQ Web, open Admin Console and click **Agent Configuration**.
{% endstep %}

{% step %}
In the row that displays **2** under Agent ID, click **Actions** and then click **Edit**. The Edit Agent dialog displays.

![Edit Agent dialog](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-e9c418c8e7b5c8ddc991a2bfef7234ae98e7889d%2Fdq-install-standalone-edit-agent.png?alt=media)

Notice that the paths in the following fields use `/opt/owl/` as the base path, which do not match the base path to your instance of Collibra DQ:

* **Base Path**
* **Collibra DQ Core JAR**
* **Collibra DQ Core Logs**
* **Collibra DQ Script**
* **Collibra DQ Web Logs**
  {% endstep %}

{% step %}
Update the paths in these fields to include the proper base path.

{% hint style="warning" %}
The `owlmanage.sh start=owlagent` script does not respect the `OWL_BASE` environment variable. You must edit the Agent Configuration to follow the `OWL_BASE`.
{% endhint %}
{% endstep %}

{% step %}
In the **Default Master Path** field, enter the Spark Master URL that you copied from the Spark Master page.
{% endstep %}

{% step %}
Update the values in the following fields based on the requirements of your instance:

* **Number of Executors(s)**
* **Executor Memory (GB)**
* **No. of Core(s)**
* **Driver Memory (GB)**
  {% endstep %}

{% step %}
In the **Free form (Appended)** field, enter the following command:

```
-conf spark.cores.max=8
```

{% endstep %}

{% step %}
In the **Default Deployment Mode** field, select **Client**.
{% endstep %}
{% endstepper %}

For more information on configuring the DQ Agent, go to [Set up a DQ agent](/data-quality-self-hosted/installation/agent/set-up-a-dq-agent.md).

## Map a connection to the DQ Agent

Follow the steps provided in [Map data source connections to a DQ agent](/data-quality-self-hosted/installation/agent/map-data-source-connections-to-a-dq-agent.md).

## Run the first DQ job

{% stepper %}
{% step %}
In the DQ Web, open the Explorer page.
{% endstep %}

{% step %}
Select a connection, schema, and table.
{% endstep %}

{% step %}
Click **Create DQ Job**.
{% endstep %}
{% endstepper %}

For more information on DQ jobs, go to [Create a DQ job](/data-quality-self-hosted/core-concepts/explorer/create-a-dq-job.md).

## What's next

[Troubleshooting self-hosted Spark Standalone installations](/data-quality-self-hosted/installation/installing-data-quality-observability-self-hosted-on-self-hosted-spark-standalone/troubleshooting-self-hosted-spark-standalone-installations.md)
