Installing the Lineai Java 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).
Install a Certificate
Section titled “Install a Certificate”sudo cp path/to/yourCertificate.cer /usr/local/share/ca-certificates#if ca-certificates is not on machinesudo apt-get install -y ca-certificatessudo update-ca-certificatesIMPORTING ROOT/INTERMEDIATE CERTIFICATE TO JDK
keytool -import -trustcacerts -keystore path/to/cacerts -storepass changeit-alias lineai -file path/to/certificate.cerDownload the install_agents.sh Script
Section titled “Download the install_agents.sh Script”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
cd /tmpwget http://your_server/lineai/server/packages/install_agents.tartar -xvf install_agents.tarSample output
$ cd /tmp$ wget http://ubuntu24server/lineai/server/packages/install_agents.tar--2025-01-09 13:45:08--http://ubuntu24server/lineai/server/packages/install_agents.tarResolving ubuntu24server (ubuntu24server)... 192.168.1.89Connecting to ubuntu24server (ubuntu24server)|192.168.1.89|:80... connected.HTTP request sent, awaiting response... 200Length: 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.shExecute the install_agents.sh Script
Section titled “Execute the install_agents.sh Script”The script runs on Debian‑based distributions.
COMMANDS
sudo ./install_agents.sh --server=your_server --label=agent_nameReplace 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)
$ sudo ./`install_agents.sh` --server=ubuntu24server --label=my-cool-agentsChecking operating system...Supported OS version: ubuntu 24.…Adding repository key...--2025-01-09 13:47:38-- http://ubuntu24server/lineai/server/packages/lineai.com.gpgConnecting to ubuntu24server:80... connected.HTTP request sent, awaiting response... 200Length: 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.keyAdding repository...Added /etc/apt/sources.list.d/lineai-agents.listInstalling agents...
[ package installation output omitted for clarity ]
Register and configure the Java and SQL agents in Lineai: Sidebar > AgentsAuthorize the Agent
Section titled “Authorize the Agent”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.
Next Steps
Section titled “Next Steps”To run a scan immediately, see Binary Scanning via Command Line (Java). To configure scanning, and set up a scanning schedule, see Configuring the Lineai Java Agent.