DBCollect/Install: Difference between revisions

From Dirty Cache Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.
Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.
== Prerequisites ==
* Python 2.6 or higher
* Python-argparse (is usually included in the Python distribution except for very old versions)
* Enterprise Linux 6, 7 or 8 (RHEL, Oracle Linux, etc), Solaris 11, IBM AIX 7
* Some free space in /tmp (or elsewhere, use --tempdir)
* Oracle RDBMS 11g or higher (optional)
* Diagnostics pack license OR statspack configured on the database(s)
* Access to the 'oracle' special user or dba privileges ('root' not required)
* Database instances up and running (opened read/write required for AWR/Statspack)
* SYS credentials (hence the 'oracle' or dba user requirement)


== Downloading DBcollect ==
== Downloading DBcollect ==

Revision as of 11:58, 24 May 2024


DBcollect Install

Summary

Installing DBCollect is pretty simple: download the latest dbcollect zipapp, put it somewhere in $PATH, and make it executable.

Prerequisites

  • Python 2.6 or higher
  • Python-argparse (is usually included in the Python distribution except for very old versions)
  • Enterprise Linux 6, 7 or 8 (RHEL, Oracle Linux, etc), Solaris 11, IBM AIX 7
  • Some free space in /tmp (or elsewhere, use --tempdir)
  • Oracle RDBMS 11g or higher (optional)
  • Diagnostics pack license OR statspack configured on the database(s)
  • Access to the 'oracle' special user or dba privileges ('root' not required)
  • Database instances up and running (opened read/write required for AWR/Statspack)
  • SYS credentials (hence the 'oracle' or dba user requirement)

Downloading DBcollect

The latest release is always available on the releases page: DBcollect package

On the releases page, go to the latest release, open Assets and download dbcollect.

Scripted install

To make life a bit easier, the github page provides a simple script that downloads the latest dbcollect release, puts it in /usr/local/bin and makes it executable.

This requires the host on which you run this to have internet access. If you run this as root, all works as expected. If you run this as other user (i.e., oracle), you need to move it yourself to the right location.

# This requires internet access via https
# Inspect downloader (optional)
curl https://raw.githubusercontent.com/outrunnl/dbcollect/master/scripts/download | less

# Download using downloader
curl https://raw.githubusercontent.com/outrunnl/dbcollect/master/scripts/download | python

# Move it to /usr/local/bin
sudo mv dbcollect /usr/local/bin

# Or move it to the current user's $HOME/bin (if it exists, usually user 'oracle'):
mv dbcollect $HOME/bin/

WARNING

Do NOT put dbcollect in non-standard locations such as /tmp, /root etc. The user dbcollect runs as (usually oracle) needs to have access to the dbcollect file (hence it does not work in /root). It also may not work on mounted paths that have execute disabled (/tmp, /var/tmp, ...)

Do NOT clone the git repository and run it from there (it will result in an error). This to prevent tampering, and weird problems (the zipapp package ensures all required files are contained in a predictable location).

Other requirements

Python

The dbcollect app runs using a shebang (#!/usr/bin/env python). This means Python needs to be available in the environment. Some systems do not have this by default. Enable it using

alternatives --set python /usr/bin/python3