Skip to content

Installing the Lineai SQL Agent (Linux)

The agents send metadata to Lineai, they are installed on the servers upon which the applications or databases are running. The applications and databases to be scanned are specified in the agent configuration files.

The Lineai repository contains a script, named install_agents.sh, that automates the installation of the Linux agents. The script adds the Lineai key to the repo keyring, adds the Lineai package repository, updates the apt cache, and installs the agents using the default package manager (DPKG).

Terminal window
sudo cp path/to/yourCertificate.cer /usr/local/share/ca-certificates
# if ca-certificates is not on machine
sudo apt-get install -y ca-certificates
sudo update-ca-certificates

IMPORTING ROOT/INTERMEDIATE CERTIFICATE TO JDK

Terminal window
keytool -import -trustcacerts -keystore path/to/cacerts -storepass changeit-alias lineai -file path/to/certificate.cer

Use wget or curl to retrieve the install_agents.tar file. Be certain to open any firewall for port 80 (http) or 443 (https). Extract the tar file.

COMMANDS

Terminal window
cd /tmp
Terminal window
wget http://your_server/lineai/server/packages/install_agents.tar
Terminal window
tar -xvf install_agents.tar
Sample output
Terminal window
$ cd /tmp
$ wget http://ubuntu24server/lineai/server/packages/install_agents.tar
--2025-01-09 13:45:08--http://ubuntu24server/lineai/server/packages/install_agents.tar
Resolving ubuntu24server (ubuntu24server)... 192.168.1.89
Connecting to ubuntu24server (ubuntu24server)|192.168.1.89|:80... connected.
HTTP request sent, awaiting response... 200
Length: 30720 (30K) [application/x-tar]
Saving to: ‘install_agents.tar’
install_agents.tar 100%[============================================================>] 30.00K --.-KB/s in 0s
2025-01-09 13:45:08 (95.6 MB/s) - ‘install_agents.tar’ saved [30720/30720]
$ tar xvf ./install_agents.tar
./install_agents.sh

Commands

Terminal window
sudo ./install_agents.sh --server=your_server --label=agent_name

Replace agent_name with a descriptive name for the agent. If the descriptive name contains spaces be sure to put the name in quotes. For example, -l “agent name”.

If the label is not specified, agent_type-hostname_of_lineai_server is used.

Sample output (Debian-based systems)
Terminal window
$ sudo ./`install_agents.sh` --server=ubuntu24server --label=my-cool-agents
Checking operating system...
Supported OS version: ubuntu 24.
Adding repository key...
--2025-01-09 13:47:38-- http://ubuntu24server/lineai/server/packages/lineai.com.gpg
Connecting to ubuntu24server:80... connected.
HTTP request sent, awaiting response... 200
Length: 3130 (3.1K) [application/octet-stream]
Saving to: ‘/usr/share/keyrings/lineai-server.key’
/usr/share/keyrings/lineai-server.key 100%[=================================>] 3.06K --.-KB/s in 0s
2025-01-09 13:47:38 (591 MB/s) - ‘/usr/share/keyrings/lineai-server.key’ saved [3130/3130]
Added http://ubuntu24server/lineai/server/packages/lineai.com.gpg to list of trusted keys.
4.0K -rw-r--r-- 1 root root 3.1K Jan 2 09:37 /usr/share/keyrings/lineai-server.key
Adding repository...
Added /etc/apt/sources.list.d/lineai-agents.list
Installing agents...
[ package installation output omitted for clarity ]
Register and configure the Java and SQL agents in Lineai: Sidebar > Agents

For security, agents must be authorized before they will send metadata to Lineai.

Obtain AGENT_UUID and AGENT_PASSWORD from your Lineai administrator, or set these environment variables before starting the agent. If credentials are not pre-provisioned, the agent may register with the server and await administrator approval before scans are accepted.