install zabbix_sender in centos - yum

I installed zabbix-sender but when execute zabbix-sender i get command not found.
[root#db1 zabbix]# yum info zabbix-sender
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Installed Packages
Name : zabbix-sender
Arch : x86_64
Version : 3.4.6
Release : 1.el7
Size : 1.0 M
Repo : installed
From repo : _ftp
Summary : Zabbix Sender
URL : http://www.zabbix.com/
License : GPLv2+
Description : Zabbix sender command line utility
when i use thi command
[root#db2 zabbix]# zabbix_sender -z zabbix -s db2 -k mysql[Binlog_cache_disk_use] -o 2000 -vv
-bash: zabbix_sender: command not found
Why does this happen?
[root#db1 zabbix]# !r
rpm -lq zabbix-sender
/usr/bin/zabbix_sender
/usr/share/doc/zabbix-sender-3.4.6
/usr/share/doc/zabbix-sender-3.4.6/AUTHORS
/usr/share/doc/zabbix-sender-3.4.6/COPYING
/usr/share/doc/zabbix-sender-3.4.6/ChangeLog
/usr/share/doc/zabbix-sender-3.4.6/NEWS
/usr/share/doc/zabbix-sender-3.4.6/README
/usr/share/man/man1/zabbix_sender.1.gz
[root#db1 zabbix]# zabbix-sender -z zabbix -s db1 -k mysql[Uptime] -o 1540 -vv
-bash: zabbix-sender: command not found
[root#db1 zabbix]#
checked again
I understand why does this happen! I remove Zabbix-sender and install again. when using Zabbix-sender -z Zabbix -s db1 -k mysql[Uptime] -o 1540 -vv there is no problem and working but after execute prel MySQL-check.pl root password then Zabbix-sender it seems to be removed. Does anyone know why? I using this template link

List files provided by rpm package:
$ rpm -ql zabbix-sender
/usr/bin/zabbix_sender
...
Try /usr/bin/zabbix_sender - do you have correct PATH setting (is /usr/bin/ included there)?

Related

Ubuntu unavaliable install redis-stack-server

according to https://redis.io/docs/stack/get-started/install/linux/, I am trying to install redis-stack on my ubuntu machine with ppa:
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis-stack-server
However with error:
E: Unable to locate package redis-stack-server
So, I am trying to download linux binary file to machine, still error:
$ ./bin/redis-stack-server
Starting redis-stack-server, database path ./var/db/redis-stack
./bin/redis-server: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

singularity returns a permission denied

I would like to build a singularity container for an application shipped via AppImage. To do so, I build the following def file:
Bootstrap: docker
From: debian:bullseye-slim
%post
apt-get update -y
apt-get install -y wget unzip fuse libglu1 libglib2.0-dev libharfbuzz-dev libsm6 dbus
cd /opt
wget https://www.ill.eu/fileadmin/user_upload/ILL/3_Users/Instruments/Instruments_list/00_-_DIFFRACTION/D3/Mag2Pol/Mag2Pol_v5.0.2.AppImage
chmod u+x Mag2Pol_v5.0.2.AppImage
%runscript
exec /opt/Mag2Pol_v5.0.2.AppImage
I build the container using singularity build -f test.sif test.def command. The build runs OK but when running the sif file using ./test.sif I get an /.singularity.d/runscript: 3: exec: /opt/Mag2Pol_v5.0.2.AppImage: Permission denied error. Looking inside the container using a singularity shell command shows that the /opt/Mag2Pol_v5.0.2.AppImage executable belongs to root. I guess that it is the source of the problem but I do not know how to solve it. Would you have any idea ?

Manjaro install ncurses5-compat-libs

I'm trying to install this package ncurses5-compat-libs but I can because of the following problem.
What I did:
1. yay ncurses5-compat-libs
There are 2 types of errors:
Either I will check 'Y' and I will add the key, so in this case, I will receive the error message as follow
gpg: keyserver receive failed: Permission denied
==> Error: Problem importing keys
Or I will check as 'n' to don't add the key and I will receive
==> Verifying source file signatures with gpg...
ncurses-6.1.tar.gz ... FAILED (unknown public key 702353E0F7E48EDB)
==> ERROR: One or more PGP signatures could not be verified!
Error downloading sources: ncurses5-compat-libs
2. sudo gpg --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB
I've tried to add it manually but it didn't work.
3. sudo gpg --recv-keys 702353E0F7E48EDB
Also this one I've tried to add it manually but it didn't work
4. yay -S --noconfirm --needed ncurses5-compat-libs
5. Trying to fallow this forum
and least but not last
6. I've tried to clone the repository by hand by following
git clone http://aur.archlinux.org/ncurses5-compat-libs.git
cd ncurses5-compat-libs
sudo gpg --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB
makepkg -sic
cd ..
sudo rm -r ncurses5-compat-libs
And guess what, I'm back from where I started...
==> Verifying source file signatures with gpg...
ncurses-6.1.tar.gz ... FAILED (unknown public key 702353E0F7E48EDB)
==> ERROR: One or more PGP signatures could not be verified!
Error downloading sources: ncurses5-compat-libs
Dose any of you guys have any idea how can I fix this problem? If so let me know because I'm getting crazy already not been able to fix this.
You shouldn't need specifically ncurses5-compat-libs if you have a higher version of ncurses. Because version 6 is backwards compatible with version 5. You need to check whether you have libtinfo.so.6 or not. If you have it then you just need to create a system link. Check if you have libtinfo.so.6, so Run:
ls /lib/ | grep libtinfo
if you can't see libtinfo.so.6, you need to install ncurses (the current latest version of it: 6.2) and then create a system link that I mentioned below. so run:
sudo pacman -S ncurses
sudo pacman -S lib32-ncurses
if you have libtinfo.so.6 then run:
sudo link /lib/libtinfo.so.6 /lib/libtinfo.so.5
I went a step further from creating the link in the other answer here:
sudo link /lib/libtinfo.so.6 /lib/libtinfo.so.5
And created a dummy package so I could build something that depended on that being a thing:
$ cat /opt/aur/ncurses5-compat-libs-dummy/PKGBUILD
pkgname='ncurses5-compat-libs'
pkgver=6.1
pkgrel=1
arch=(any)
provides=('libtinfo5')
$ cd /opt/aur/ncurses5-compat-libs/dummy
$ makepkg -si
worked like a charm

hostname - command not found issue

I am installing BOWTIE as below in amazonlinux:
wget https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.4/bowtie2-2.2.4-source.zip
unzip bowtie2-2.2.4-source.zip
cd bowtie2-2.2.4
make
echo "BOWTIE installed successfully."
I am getting the below error when I issue the 'make' command:
/bin/sh: hostname: command not found
Can anyone help me to fix this issue
which: no hostname in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
bash-4.2# hostname
bash: hostname: command not found
You have to install
yum install bind-utils -y

Mosquitto Auth Plugin with Openssl issue on raspberry pi

I have first created a user for mosquitto:
sudo adduser --system -no-create-home mosquitto
Then I installed some dependencies:
sudo apt-get install libc-ares-dev libcurl4-openssl-dev libmysqlclient-dev
Then I installed mosquitto:
wget http://mosquitto.org/files/source/mosquitto-1.3.5.tar.gz //download mosquitto-1.3.5
tar xvzf mosquitto-1.3.5.tar.gz //unzip tar file
Then cd mosquitto-1.3.5
Then I put config.mk in edit mode using
sudo nano config.mk
Then I searched for SRV by pressing Ctrl + W
Changed With_SRV:=no
Ctrl + O followed by Enter to save
Ctrl + X to exit out of file
Now I need to install Openssl to build mosquitto.
So I installed Openssl using this command:
wget http://www.openssl.org/source/openssl-1.0.0c.tar.gz
Download md5 file to generate md5 code
wget http://www.openssl.org/source/openssl-1.0.0c.tar.gz.md5
Generate md5sum
md5sum openssl-1.0.0c.tar.gz
Generate md5 code
cat openssl-1.0.0c.tar.gz.md5
if both code matches than we have downloaded the file completely
unzip the tar file
tar -xvzf openssl-1.1.0c.tar.gz 54. cd openssl-1.1.0c
Configure the openssl before compiling it
./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
Compile openssl
make
Install Openssl
sudo make install
The above line gives error, so the below line of code:
sudo make install_sw
Verify if openssl was installed successfully
/usr/local/openssl/bin/openssl version //get the version number of openssl
Come out of the directory and go to the directory of mosquitto:
cd
cd mosquitto-1.3.5
Install another dependency of mosquitto
sudo apt-get install libssl-dev
Compile Mosquitto
sudo make
Install Mosquitto:
sudo make install
download mosquitto auth plugin from github
git clone https://github.com/jpmens/mosquitto-auth-plug.git
Download hiredis
git clone https://github.com/redis/hiredis.git
Go to hiredis directory and compile it and install it
cd hiredis
make
sudo make install
Go to mosquitto auth plugin directory
cd
cd mosquitto-1.3.5
cd mosquitto-auth-plug
Copy the contents of config.mk.in to config.mk
cp config.mk.in config.mk
Open config.mk in edit mode
sudo nano config.mk
Change these lines of code:
MOSQUITTO_SRC = /home/pi/mosquitto-1.3.5
OPENSSLDIR = /usr/local/openssl
Save the file and come out of it
Ctrl + O followed by Enter then
Ctrl + X to exit
Then I try to compile mosquitto-auth-plug:
make
At this time I get this error:
Selected backends: MySQL
Using mosquitto source dir: /home/pi/mosquitto-1.3.5
OpenSSL install dir: /usr/local/openssl
If you changed the backend selection, you might need to 'make clean' first
CFLAGS: -I/home/pi/mosquitto-1.3.5/src/ -I/home/pi/mosquitto-1.3.5/lib/ -fPIC -Wall -Werror -DBE_MYSQL -I/usr/include/mysql -DBIG_JOINS=1 -fno-strict-aliasing -g -DNDEBUG -I/src -DDEBUG=1 -I/usr/local/openssl/include
LDFLAGS: -L/home/pi/mosquitto-1.3.5/lib/
LDADD: -L/usr/lib/arm-linux-gnueabihf -lmysqlclient -lpthread -lz -lm -ldl -L/usr/local/openssl/lib -lcrypto -lmosquitto
cc -I/home/pi/mosquitto-1.3.5/src/ -I/home/pi/mosquitto-1.3.5/lib/ -fPIC -Wall -Werror -DBE_MYSQL `mysql_config --cflags` -I/src -DDEBUG=1 -I/usr/local/openssl/include -c -o cache.o cache.c
cache.c: In function ‘sha_hash’:
cache.c:48:3: error: implicit declaration of function ‘EVP_MD_CTX_new’ [-Werror=implicit-function-declaration]
EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
^
cache.c:48:23: error: initialization makes pointer from integer without a cast [-Werror]
EVP_MD_CTX *mdctx = EVP_MD_CTX_new();
^
cache.c:53:3: error: implicit declaration of function ‘EVP_MD_CTX_free’ [-Werror=implicit-function-declaration]
EVP_MD_CTX_free(mdctx);
^
cc1: all warnings being treated as errors
<builtin>: recipe for target 'cache.o' failed
make: *** [cache.o] Error 1
So, I removed openssl-1.0.0c and installed openssl-1.1.0c version
Then compiling of mosquitto-auth-plug is done successfully
Then move the files as follows:
sudo mv auth-plug.so /etc/mosquitto
sudo mv /etc/mosquitto/mosquitto.conf.example /etc/mosquitto/mosquitto.conf
edit mosquitto .conf file
sudo nano /etc/mosquitto/mosquitto.conf
Press Ctrl + W to search
search for auth_plugin and write below mentioned commands after the second occurance of auth_plugin
auth_plugin /etc/mosquitto/auth-plug.so
auth_opt_backends mysql
auth_opt_redis_host localhost
auth_opt_redis_port 12885
auth_opt_host localhost
auth_opt_port 3306
auth_opt_dbname HAC
auth_opt_user mqtt_user
auth_opt_pass ###YOUR_PASSWORD###
auth_opt_userquery SELECT pw FROM mqtt_users WHERE username = '%s'
auth_opt_superquery SELECT COUNT(*) FROM mqtt_users WHERE username = '%s' AND super = 1
auth_opt_aclquery SELECT topic FROM mqtt_acls WHERE (username = '%s') AND (rw >= %d)
auth_opt_anonusername AnonymouS
Then save the file by presssing Ctrl + O and then Enter
To exit out of the file press Ctrl + X
Then when I run this command:
/usr/local/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
I get the following error:
1486888881: mosquitto version 1.3.5 (build date 2017-02-11 22:22:57+0000) starting
1486888881: Config loaded from /etc/mosquitto/mosquitto.conf.
1486888881: Error: Unable to load auth plugin "/etc/mosquitto/auth-plug.so".
Can anybody help me please?
I have already wasted 4 days in searching a solution of this error.
Update:
I have uninstalled mosquitto and installed its latest version. Still getting the same error but its more descriptive this time. Now it says:
mosquitto version 1.4.10 (build date 2017-02-13 22:22:57+0000) starting
Config loaded from /etc/mosquitto/mosquitto.conf.
Error: Unable to load auth plugin "/etc/mosquitto/auth-plug.so".
Load Error: /etc/mosquitto/auth-plug.so: Undefined Symbol: EVP_MD_CTX_reset