Installing agent on Raspbian

Started by blairmc96, June 07, 2019, 09:55:55 PM

Previous topic - Next topic

blairmc96

I'm trying to install the agent on a Raspberry pi (see version below), and am following instructions from the Wiki.

https://wiki.netxms.org/wiki/Using_APT_Repository

Please let me know what I am doing wrong.

Thanks!

pi@piaware:~ $ sudo wget http://packages.netxms.org/netxms-release_1.2_all.deb
--2019-06-07 18:38:59--  http://packages.netxms.org/netxms-release_1.2_all.deb
Resolving packages.netxms.org (packages.netxms.org)... 5.9.112.213
Connecting to packages.netxms.org (packages.netxms.org)|5.9.112.213|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6878 (6.7K) [application/octet-stream]
Saving to: 'netxms-release_1.2_all.deb.2'

netxms-release_1.2_all.deb.2                     100%[==========================================================================================================>]   6.72K  --.-KB/s    in 0s

2019-06-07 18:38:59 (30.9 MB/s) - 'netxms-release_1.2_all.deb.2' saved [6878/6878]

pi@piaware:~ $ sudo dpkg -i netxms-release_1.2_all.deb
(Reading database ... 42332 files and directories currently installed.)
Preparing to unpack netxms-release_1.2_all.deb ...
Unpacking netxms-release (1.2) over (1.2) ...
Setting up netxms-release (1.2) ...
pi@piaware:~ $ sudo apt-get update
Hit:1 http://flightaware.com/mirror/raspbian/raspbian stretch InRelease
Hit:2 http://flightaware.com/adsb/piaware/files/packages stretch InRelease
Hit:3 http://flightaware.com/mirror/raspberrypi/debian stretch InRelease
Hit:4 http://packages.netxms.org/debian stretch InRelease
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-armhf/Packages' as repository 'http://packages.netxms.org/debian stretch InRelease' doesn't support architecture 'armhf'
pi@piaware:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@piaware:~ $

blairmc96

Can I please get some help with this?

Thanks

Tursiops



Tursiops

Oops. That's because I misspelled it. It's raspbian, not raspian.
You can browse through the repository: https://packages.netxms.org/


blairmc96

Thanks for the reply.

I'm not quite sure what to do with this knowledge... how do I proceed?  I found a deb file under the raspbian folder and I tried this below:

What am I missing?

pi@retropie:~ $ wget https://packages.netxms.org/raspbian/pool/jessie/main/n/netxms/netxms-agent_2.1-M2-1_armhf.deb
--2019-07-01 04:18:57--  https://packages.netxms.org/raspbian/pool/jessie/main/n/netxms/netxms-agent_2.1-M2-1_armhf.deb
Resolving packages.netxms.org (packages.netxms.org)... 5.9.112.213
Connecting to packages.netxms.org (packages.netxms.org)|5.9.112.213|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 196588 (192K) [application/octet-stream]
Saving to: 'netxms-agent_2.1-M2-1_armhf.deb'

netxms-agent_2.1-M2-1_armhf.deb       100%[=======================================================================>] 191.98K   623KB/s    in 0.3s

2019-07-01 04:18:58 (623 KB/s) - 'netxms-agent_2.1-M2-1_armhf.deb' saved [196588/196588]

pi@retropie:~ $ sudo dpkg -i netxms-agent_2.1-M2-1_armhf.deb
Selecting previously unselected package netxms-agent:armhf.
(Reading database ... 96679 files and directories currently installed.)
Preparing to unpack netxms-agent_2.1-M2-1_armhf.deb ...
Unpacking netxms-agent:armhf (2.1-M2-1) ...
dpkg: dependency problems prevent configuration of netxms-agent:armhf:
netxms-agent:armhf depends on netxms-base (= 2.1-M2-1); however:
  Package netxms-base is not installed.
netxms-agent:armhf depends on netxms-dbdrv-sqlite3 (= 2.1-M2-1); however:
  Package netxms-dbdrv-sqlite3 is not installed.
netxms-agent:armhf depends on libsensors4 (>= 1:3.1.1); however:
  Package libsensors4 is not installed.
netxms-agent:armhf depends on libssl1.0.0 (>= 1.0.0); however:
  Package libssl1.0.0 is not installed.

dpkg: error processing package netxms-agent:armhf (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u11) ...
Errors were encountered while processing:
netxms-agent:armhf
pi@retropie:~ $

Victor Kirhenshtein

Hi,

you have to add new source for apt. Create new file named netxms.list in /etc/apt/sources.list.d/ with content like this:

deb http://packages.netxms.org/raspbian stretch main


You may also need to install GPG key with command

wget -q -O - http://packages.netxms.org/netxms.gpg | sudo apt-key add -

Best regards,
Victor

blairmc96

#7
Victor, thanks for the information.  This worked for me.

For those wanting all the info, below are all the steps I followed, however I had to comment out the other line (deb http://packages.netxms.org/debian stretch main) in netxms.list.  This file already existed, I guess due to some of the steps I followed earlier

Create new file named netxms.list in /etc/apt/sources.list.d/ with content like this, Comment out existing line

deb http://packages.netxms.org/raspbian stretch main
#deb http://packages.netxms.org/debian stretch main


wget -q -O - http://packages.netxms.org/netxms.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install netxms-agent
sudo nano /etc/nxagentd.conf
sudo systemctl enable nxagentd

Edit nxagentd.conf and change MasterServers to your NetXMS server
The default file had 127.0.0.1/8, I had to remove the CIDR notation to get it to work


sudo service nxagentd restart

rchab

Just an update :

Point 1 :
 
Quoteyou have to add new source for apt in /etc/apt/sources.list.d/
Be carreful on version :deb http://packages.netxms.org/raspbian stretch main
  To know raspbian realease : cat /etc/os-release

Point 2 :
Quotewget -q -O - http://packages.netxms.org/netxms.gpg | sudo apt-key add -  => wrong
wget -q -O - https://packages.netxms.org/netxms.gpg | sudo apt-key add -  => Ok

Use httpS: instead of http: