Skip to content

How do I install Nanitor Agent on Linux/BSD/Mac?

For the Windows operating system see How do I install/distribute the Nanitor Agent on Windows?

Preparing

First, decide if you want to download the installation files ahead of time and distribute them to the systems in question or if you want to download the Nanitor agent directly onto the system in question. Here are the instructions for downloading the agent ahead of time. If you are going to download the installation files directly, you'll need to fetch your setup URL here.

Proxy configuration

If you want to configure a proxy on the agent during the setup process you should do so before you signup the agent, regardless of which path you choose below. Here is an example of Ubuntu using path B.

apt install ./nanitor-agent.deb
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin proxy-set user:[email protected]:1234
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key <signup-url>
sudo systemctl start nanitor-agent

proxy.company.com is the FQDN of the proxy you need to use, 1234 is the port the proxy is using (often it is 8080) and user/Password is the authentication for the Proxy. If the Proxy requires no authentication then you leave that off and it becomes

apt install ./nanitor-agent.deb
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin proxy-set proxy.company.com:1234
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key <signup-url>
sudo systemctl start nanitor-agent

For more details see the Agent proxy setup guide

Installation

Path A: Download the agent first and distribute it to the client

Log into your system and execute the following. I'm working on our demo system which is at version 3.4.1.10810-11181 at the time of this writing, so the zip file I'm working with is demo-nanitor-agent-3_4_1_10810-11181_x86_64_xxx.zip. Your filename will vary slightly so adjust accordingly. Also, I'm assuming you have already cd into the directory where you uploaded the zip file to (ideally /tmp)

unzip demo-nanitor-agent-3_4_1_10810-11181_x86_64_rpm.zip
sudo yum install nanitor-agent-3_4_1_10810-11181.x86_64.rpm
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key `cat signup-url.txt`
sudo systemctl start nanitor-agent
sudo systemctl status nanitor-agent
unzip demo-nanitor-agent_3_4_1_10810-11181_amd64_deb.zip
sudo apt install ./nanitor-agent_3_4_1_10810-11181_amd64.deb
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key `cat signup-url.txt`
sudo systemctl start nanitor-agent
sudo systemctl status nanitor-agent
unzip demo-nanitor-agent-3_4_1_10810-11181_x86_64_rpm.zip
sudo yum install nanitor-agent-3_4_1_10810-11181.x86_64.rpm
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key `cat signup-url.txt`
sudo service nanitor-agent start
sudo service nanitor-agent status
unzip demo-nanitor-agent_3_4_1_10810-11181_amd64_deb.zip
sudo apt install ./nanitor-agent_3_4_1_10810-11181_amd64.deb
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key `cat signup-url.txt`
sudo service nanitor-agent start
sudo service nanitor-agent status
cd /tmp
unset PKG_PATH
mkdir -p /etc/signify
curl -o /etc/signify/nanitor-agent.pub https://nanitor.io/files/certs/nanitor-agent-openbsd.pub
unzip nanitor-nanitor-agent-3_4_1_10810-11181_openbsd_amd64_tgz.zip
mv nanitor-agent-3_4_1_10810-11181_openbsd_amd64.tgz nanitor-agent-1.9.5.8622.tgz
pkg_add ./nanitor-agent-1.9.5.8622
/usr/local/bin/nanitor-agent-bin signup --key `cat signup-url.txt`
echo 'pkg_scripts="nanitor_agent"' >> /etc/rc.conf.local
/etc/rc.d/nanitor_agent start
unzip demo-nanitor-agent-3_4_1_10810-11181_freebsd_amd64_txz.zip
pkg install ./nanitor-agent-3_4_1_10810-11181_freebsd_amd64.txz
/usr/local/bin/nanitor-agent-bin signup --key `cat signup-url.txt`
service nanitor_agent enable
service nanitor_agent start
service nanitor_agent status
unzip demo-nanitor-agent_3_4_1_10810-11181_osx64_pkg.zip
sudo launchctl setenv nanitor_signup_url <signup-url>
sudo installer -pkg ./nanitor-agent_3_4_1_10810-11181_osx64.pkg -target /Library/

Path B: Download the agent from the client

This is a bit simpler approach as there is no prep work other than grabbing the signup URL and then open up a terminal or a shell on the client. Make sure you replace <signup-url> with your actual signup URL

sudo yum install https://nanitor.io/agents/nanitor-agent-latest.x86_64.rpm
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key <signup-url>
sudo systemctl start nanitor-agent
sudo systemctl status nanitor-agent   
cd /tmp
sudo curl -o nanitor-agent.deb https://nanitor.io/agents/nanitor-agent-latest_amd64.deb
sudo apt install ./nanitor-agent.deb 
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key <signup-url>
sudo systemctl start nanitor-agent
sudo systemctl status nanitor-agent
sudo yum install https://nanitor.io/agents/nanitor-agent-latest.x86_64.rpm
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key <signup-url>
sudo service nanitor-agent start
sudo service nanitor-agent status
cd /tmp
sudo curl -o nanitor-agent.deb https://nanitor.io/agents/nanitor-agent-latest_amd64.deb
sudo apt install ./nanitor-agent.deb 
sudo /usr/lib/nanitor-agent/bin/nanitor-agent-bin signup --key <signup-url>
sudo service nanitor-agent start
sudo service nanitor-agent status
cd /tmp
curl -o nanitor-agent.tgz https://nanitor.io/agents/nanitor-agent-latest_openbsd_amd64.tgz
unset PKG_PATH
mkdir -p /etc/signify
curl -o /etc/signify/nanitor-agent.pub https://nanitor.io/files/certs/nanitor-agent-openbsd.pub
mv nanitor-agent-1.9.5.8622-6564_openbsd_amd64.tgz nanitor-agent-1.9.5.8622.tgz
pkg_add ./nanitor-agent-1.9.5.8622
/usr/local/bin/nanitor-agent-bin signup --key <signup-url>
echo 'pkg_scripts="nanitor_agent"' >> /etc/rc.conf.local
/etc/rc.d/nanitor_agent start
cd /tmp
curl -o nanitor-agent.txz https://nanitor.io/agents/nanitor-agent-latest_freebsd_amd64.txz
unzip demo-nanitor-agent-3_4_1_10810-11181_freebsd_amd64_txz.zip
pkg install ./nanitor-agent-3_4_1_10810-11181_freebsd_amd64.txz
/usr/local/bin/nanitor-agent-bin signup --key <signup-url>
service nanitor_agent enable
service nanitor_agent start
service nanitor_agent status
cd /tmp
wget https://nanitor.io/agents/nanitor-agent-latest_osx64.pkg
sudo launchctl setenv nanitor_signup_url <signup-url>
sudo installer -pkg ./nanitor-agent-latest_osx64.pkg -target /Library/