Adding Instana repository and installing stanctl tool

Before you install Standard Edition in your online and air-gapped environments, you need to add Instana repository and install the stanctl tool.

Note: The installation commands in the following sections are for a root user. If you are a non-root user, you can run these commands by using sudo.

Adding Instana repository

As a root user on your host, run the following commands to add the repository:

Note: In the following command, replace <download_key> with the download key that you got with your license. For more information, see Purchasing a license.
  • If you have an Ubuntu or Debian host, run these commands:

    Note: You must add the Instana repository to the sources.list file on your host so that the host has access to the Instana installation package.
    export DOWNLOAD_KEY=<download_key>
    
    echo 'deb [signed-by=/usr/share/keyrings/instana-archive-keyring.gpg] https://artifact-public.instana.io/artifactory/rel-debian-public-virtual generic main' > /etc/apt/sources.list.d/instana-product.list
    
    cat << EOF > /etc/apt/auth.conf
    machine artifact-public.instana.io
      login _
      password $DOWNLOAD_KEY
    EOF
    wget -nv -O- --user=_ --password="$DOWNLOAD_KEY" https://artifact-public.instana.io/artifactory/api/security/keypair/public/repositories/rel-debian-public-virtual | gpg --dearmor > /usr/share/keyrings/instana-archive-keyring.gpg
    
  • If you have a Red Hat® Enterprise Linux®, CentOS Stream, Amazon Linux, or Oracle Linux host, run these commands:

    export DOWNLOAD_KEY=<download_key>
    cat << EOF > /etc/yum.repos.d/Instana-Product.repo
    [instana-product]
    name=Instana-Product
    baseurl=https://_:$DOWNLOAD_KEY@artifact-public.instana.io/artifactory/rel-rpm-public-virtual/
    enabled=1
    gpgcheck=0
    gpgkey=https://_:$DOWNLOAD_KEY@artifact-public.instana.io/artifactory/api/security/keypair/public/repositories/rel-rpm-public-virtual
    repo_gpgcheck=1
    EOF
    
  • If you have a SUSE Linux Enterprise Server (SLES) host, run these commands:

    export DOWNLOAD_KEY=<download_key>
    cat << EOF > /etc/zypp/credentials.d/instana_auth
    username=_
    password=$DOWNLOAD_KEY
    EOF
    cat << EOF > /etc/zypp/repos.d/Instana-Product.repo
    [instana-product]
    name=Instana-Product
    baseurl=https://artifact-public.instana.io/artifactory/rel-rpm-public-virtual/?credentials=instana_auth
    enabled=1
    gpgcheck=0
    gpgkey=https://artifact-public.instana.io/artifactory/api/security/keypair/public/repositories/rel-rpm-public-virtual?credentials=instana_auth
    repo_gpgcheck=1
    EOF
    

Installing stanctl command-line tool

The Standard Edition is managed by a command-line tool named stanctl that you must install.

  • If you have an Ubuntu or Debian host, run these commands:

    1. Update the package index files on your host.

      apt update -y
      
    2. Install stanctl.

      apt install -y stanctl
      
    3. To avoid automatic updates, set the stanctl package version.

      apt-mark hold stanctl
      
  • If you have a Red Hat Enterprise Linux or CentOS Stream host, run these commands:

    1. Refresh your yum repositories.

      yum clean expire-cache -y
      
    2. Update the package index files on your host.

      yum update -y
      
    3. Install stanctl.

      yum install -y stanctl
      
    4. If the versionlock plug-in is not installed on your host, run the following command to install the plug-in.

      yum install python3-dnf-plugin-versionlock
      
    5. To avoid automatic updates, set the stanctl package version.

      yum versionlock add stanctl
      
  • If you have an Amazon Linux or Oracle Linux host, run these commands:

    1. Refresh your dnf repositories.

      dnf clean expire-cache -y
      
    2. Update the package index files on your host.

      dnf update -y
      
    3. Install stanctl.

      dnf install -y stanctl
      
    4. To avoid automatic updates, set the stanctl package version.

      dnf versionlock add stanctl
      
  • If you have an SLES host, run these commands:

    1. Refresh and update the package index files on your host.

      zypper refresh
      
      Note: Enter a, which means trust always, when you see the question Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r):
    2. Install stanctl.

      zypper install -y stanctl
      

After you install the tool, it is automatically added to your $PATH. You can run the stanctl commands from any directory. To check the version of stanctl that you installed, run the following command:

stanctl --version

For more information about stanctl commands, see Using stanctl commands.