Installation Nagios plugins from the CentOS 8 repository.
Install epel repository;
# dnf install epel-release
Check Nagios plugins;
# dnf list nagios-plugins-*
Install nrpe agent;
# dnf install nrpe
# dnf install gcc glibc glibc-common make gettext automake autoconf wget openssl-devel
Install Nagios plugins;
# dnf install nagios-plugins-{nt,apt,dbi,dig,dns,fts,log,ntp,rpc,ssh,tcp,ups,disk,load,nrpe,swap,dhcp,disk,hpjd,http,icmp,ircd,ldap,load,mrtg,nrpe,perl,ping,real,smtp,snmp,swap,time,wave,fping,mysql,procs,users,dummy,fping,mailq,mysql,pgsql,procs,users,uptime,breeze,by_ssh,flexlm,nagios,nwstat,oracle,overcr,radius,uptime,cluster,sensors,bonding,cluster,sensors,file_age,mrtgtraf,ide_smart,remove_perfdata}
Nagios plugins will be installed in /usr/lib64/nagios/plugins/ directory;
# ls -1 /usr/lib64/nagios/plugins/
------------------------------------------------------------
Or you can try the second method installing Nagios plugins on CentOS 8;
Install nrpe agent and required programmes;
# dnf install nrpe gcc glibc glibc-common make gettext automake autoconf wget openssl-devel
Download plugins;
# wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
Unpack the plugins;
# tar -xvzf nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
# cd nagios-plugins-2.2.1
Define the user and group to use;
# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
Compile the software;
# make
# make install
Nagios plugins are installed in /usr/local/nagios/libexec/ directory;
# ls /usr/local/nagios/libexec/
srijeda, 24. lipnja 2020.
utorak, 23. travnja 2019.
Create Let's Encrypt Certificate Authority (CA), SSL Certificate in openSUSE Leap 15.x
If you're running apache2 web server in openSUSE Leap 15.x,
create a virtual host config file named /etc/apache2/conf.d/mydomain.example.com.conf
1. Configure apache2 for https:
# vim /etc/apache2/conf.d/mydomain.example.com.conf
<VirtualHost *:443>
DocumentRoot "/srv/www/htdocs/owncloud"
ServerName mydomain.example.com
SSLEngine On
SSLCertificateFile /etc/certbot/live/mydomain.example.com/fullchain.pem
SSLCertificateKeyFile /etc/certbot/live/mydomain.example.com/privkey.pem
<Directory "/srv/www/htdocs/owncloud">
DirectoryIndex index.html info.php index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
----------------------------------------
# systemctl restart apache2
----------------------------------------
2. Install certboot:
# zypper in certbot python-certbot python-certbot-apache
----------------------------------------
3. Configure data for certboot:
# vim /etc/certbot/cli.ini
rsa-key-size = 4096
server = https://acme-v01.api.letsencrypt.org/directory
email = mailaddress@something.com
domain = mydomain.example.com
authenticator = webroot
webroot-path = /srv/www/htdocs/owncloud
----------------------------------------
3.1. Configure data for letsencrypt:
# vim /etc/letsencrypt/cli.ini
rsa-key-size = 4096
server = https://acme-v01.api.letsencrypt.org/directory
email = mailaddress@something.com
authenticator = webroot
webroot-path = /srv/www/htdocs/owncloud
domain = mydomain.example.com
----------------------------------------
4. Create cert:
# certbot --authenticator webroot --installer apache
# certbot --apache
# systemctl stop apache2
# systemctl start apache2
----------------------------------------
5. Auto renew cert with cron, every 30 days in 2:00 AM:
# crontab -e
# SSL certificates renew
0 2 1 * * /usr/bin/certbot renew
----------------------------------------
create a virtual host config file named /etc/apache2/conf.d/mydomain.example.com.conf
1. Configure apache2 for https:
# vim /etc/apache2/conf.d/mydomain.example.com.conf
<VirtualHost *:443>
DocumentRoot "/srv/www/htdocs/owncloud"
ServerName mydomain.example.com
SSLEngine On
SSLCertificateFile /etc/certbot/live/mydomain.example.com/fullchain.pem
SSLCertificateKeyFile /etc/certbot/live/mydomain.example.com/privkey.pem
<Directory "/srv/www/htdocs/owncloud">
DirectoryIndex index.html info.php index.php
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
----------------------------------------
# systemctl restart apache2
----------------------------------------
2. Install certboot:
# zypper in certbot python-certbot python-certbot-apache
----------------------------------------
3. Configure data for certboot:
# vim /etc/certbot/cli.ini
rsa-key-size = 4096
server = https://acme-v01.api.letsencrypt.org/directory
email = mailaddress@something.com
domain = mydomain.example.com
authenticator = webroot
webroot-path = /srv/www/htdocs/owncloud
----------------------------------------
3.1. Configure data for letsencrypt:
# vim /etc/letsencrypt/cli.ini
rsa-key-size = 4096
server = https://acme-v01.api.letsencrypt.org/directory
email = mailaddress@something.com
authenticator = webroot
webroot-path = /srv/www/htdocs/owncloud
domain = mydomain.example.com
----------------------------------------
4. Create cert:
# certbot --authenticator webroot --installer apache
# certbot --apache
# systemctl stop apache2
# systemctl start apache2
----------------------------------------
5. Auto renew cert with cron, every 30 days in 2:00 AM:
# crontab -e
# SSL certificates renew
0 2 1 * * /usr/bin/certbot renew
----------------------------------------
ponedjeljak, 4. veljače 2019.
How to manually delete old kernel on Ubuntu, Mint, Debian...
Open command line, and enter:
$ sudo uname -a
$ sudo dpkg --list | grep linux-image
$ sudo dpkg --purge linux-image{,-extra}-4.x.x-xxx-generic
$ sudo apt update && apt upgrade && apt autoremove
$ sudo uname -a
$ sudo dpkg --list | grep linux-image
$ sudo dpkg --purge linux-image{,-extra}-4.x.x-xxx-generic
$ sudo apt update && apt upgrade && apt autoremove
petak, 9. studenoga 2018.
KDE mount USB device fails at OpenSuse
KDE mount USB device fails at OpenSuse
An error occured while accesiing , the system responded: An unspecified error has occured. An read ACL for if 1000 to failed: invalid argument
$ sudo mkdir -p /run/media/my_user
$ sudo chown my_user:users /run/media/my_user
$ sudo chmod 775 /run/media/my_user
An error occured while accesiing , the system responded: An unspecified error has occured. An read ACL for if 1000 to failed: invalid argument
$ sudo mkdir -p /run/media/my_user
$ sudo chown my_user:users /run/media/my_user
$ sudo chmod 775 /run/media/my_user
Disable Network Manager on Mint
$ sudo stop network-manager
$ echo "manual" | sudo tee /etc/init/network-manager.override
$ sudo vi /etc/NetworkManager/NetworkManager.conf
$ sudo vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# network interface not managed by Network Manager
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 182.168.1.1
dns-nameservers 8.8.8.8
$ nmcli dev status
$ echo "manual" | sudo tee /etc/init/network-manager.override
$ sudo vi /etc/NetworkManager/NetworkManager.conf
$ sudo vi /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# network interface not managed by Network Manager
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
gateway 182.168.1.1
dns-nameservers 8.8.8.8
$ nmcli dev status
Games for KDE OpenSUSE
# zypper install bomber bovo granatier kapman katomic kblackbox kblocks kbounce kbreakout kdiamond kfourinline kgoldrunner kigo killbots kiriki kjumpingcube klickety klines kmahjongg kmines knavalbattle knetwalk kolf kollision konquest kpat kreversi kshisen ksirk ksnakeduel kspaceduel ksquares ksudoku ktuberling kubrick lskat palapeli picmi kajongg
Dolphin - Super User Mode
Application Menu >
Dolphin >
Edit Applications >
New Item >
General >
Name: Dolphin - Super User Mode
Command: dbus-launch dolphin -qwindowtitle "%c" "%u"
Advanced > Run as a different user
Dolphin >
Edit Applications >
New Item >
General >
Name: Dolphin - Super User Mode
Command: dbus-launch dolphin -qwindowtitle "%c" "%u"
Advanced > Run as a different user
nedjelja, 17. lipnja 2018.
Change vendor and update all packages from Packman repo in OpenSuse 15.0
Add all Packman repo into OpenSuse Leap 15.0:
$ sudo zypper ar -f http://packman.jacobs-university.de/suse/openSUSE_Leap_15.0/ Packman-repo-15.0
Show all repos in OpenSuse:
$ sudo zypper repos
$ sudo zypper install --from [repository] [package]
In my case update gstreamer-plugins-bad-lang package from Packman repo:
$ sudo zypper install --from Packman-repo-15.0 gstreamer-plugins-bad-lang
Change vendor and update all packages from Packman repo:
$ sudo zypper dup --from Packman-repo-15.0
Refresh repo, update packages and upgrade and clean OpenSuse:
$ sudo zypper ref && sudo zypper update -y && sudo zypper dup -y && sudo zypper clean
subota, 16. lipnja 2018.
Allow CUPS to install printer in Chrome browser
This procedure will allow CUPS to install printer in Chrome browser. If Chrome shows unauthorized message, do the following.
CUPS > Administration > Add printer on Chrome shows:
Unauthorized
Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket.
Create a copy of the CUPS config file:
# cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf-BAK
Edit CUPS:
# vim /etc/cups/cupsd.conf
Change:
AuthType Default
Require user @SYSTEM
Order deny,allow
To:
AuthType None
# AuthType Default
# Require user @SYSTEM
Order deny,allow
Restart CUPS after editing:
# systemctl restart cups
CUPS > Administration > Add printer on Chrome shows:
Unauthorized
Enter your username and password or the root username and password to access this page. If you are using Kerberos authentication, make sure you have a valid Kerberos ticket.
Create a copy of the CUPS config file:
# cp /etc/cups/cupsd.conf /etc/cups/cupsd.conf-BAK
Edit CUPS:
# vim /etc/cups/cupsd.conf
Change:
AuthType Default
Require user @SYSTEM
Order deny,allow
To:
AuthType None
# AuthType Default
# Require user @SYSTEM
Order deny,allow
Restart CUPS after editing:
# systemctl restart cups
četvrtak, 2. ožujka 2017.
CTRL key stopped working on HP ProBook 450
Left CTRL key stopped working on HP ProBook 450 G2
My laptop runs on Linux and Windows 10 and on both systems the CTRL key did
not work properly.
BIOS was the problem.
If your CTRL key does not work, first check if you can use FN key
instead of CTRL.
For example, FN+C is the same as CTRL+C or FN+V is the same as CTRL+V.
You can try this with a line from a text.
If the FN key works as CTRL key then
turn off your laptop,
unplug it,
TAKE OUT THE BATTERY for 10-15 seconds and then put it back in and turn
the laptop on.
The CTRL key should work normally now.
My laptop runs on Linux and Windows 10 and on both systems the CTRL key did
not work properly.
BIOS was the problem.
If your CTRL key does not work, first check if you can use FN key
instead of CTRL.
For example, FN+C is the same as CTRL+C or FN+V is the same as CTRL+V.
You can try this with a line from a text.
If the FN key works as CTRL key then
turn off your laptop,
unplug it,
TAKE OUT THE BATTERY for 10-15 seconds and then put it back in and turn
the laptop on.
The CTRL key should work normally now.
ponedjeljak, 28. studenoga 2016.
How to install Popcorn Time on Linux, Watch torrent movies instantly
Linux 32 bit - Installation with CLI, Terminator
1. $ cd ~/Downloads
2. $ mkdir popcorn-time && cd popcorn-time
3. $ wget https://github.com/PopcornTime-CE/desktop/releases/download/v0.4.0-2/popcorn-time-community-v0.4.0-2-32bit.tar.xz
tar --xz -xvf popcorn-time-community-v0.4.0-2-32bit.tar.xz
4. $ ./install
Linux 64 bit - Installation with CLI, Terminator
1. $ cd ~/Downloads
2. $ mkdir popcorn-time && cd popcorn-time
3. $ wget https://github.com/PopcornTime-CE/desktop/releases/download/v0.4.0-2/popcorn-time-community-v0.4.0-2-64bit.tar.xz
tar --xz -xvf popcorn-time-community-v0.4.0-2-64bit.tar.xz
4. $ ./install
1. $ cd ~/Downloads
2. $ mkdir popcorn-time && cd popcorn-time
3. $ wget https://github.com/PopcornTime-CE/desktop/releases/download/v0.4.0-2/popcorn-time-community-v0.4.0-2-32bit.tar.xz
tar --xz -xvf popcorn-time-community-v0.4.0-2-32bit.tar.xz
4. $ ./install
Linux 64 bit - Installation with CLI, Terminator
1. $ cd ~/Downloads
2. $ mkdir popcorn-time && cd popcorn-time
3. $ wget https://github.com/PopcornTime-CE/desktop/releases/download/v0.4.0-2/popcorn-time-community-v0.4.0-2-64bit.tar.xz
tar --xz -xvf popcorn-time-community-v0.4.0-2-64bit.tar.xz
4. $ ./install
ponedjeljak, 7. studenoga 2016.
UFW on Raspbian, Raspberry Pi iptables-persistent
After upgrading Raspbian OS, and after restarting Raspberry Pi iptables is empty.
I can't connect to Raspberry PI with NFS.
To normally start UFW after boot do the following:
$ sudo apt-get install iptables-persistent
$ sudo invoke-rc.d iptables-persistent save
I can't connect to Raspberry PI with NFS.
To normally start UFW after boot do the following:
$ sudo apt-get install iptables-persistent
$ sudo invoke-rc.d iptables-persistent save
nedjelja, 16. kolovoza 2015.
How to upgrade OpenSuse 13.1 to 13.2
How to upgrade OpenSuse 13.1 to 13.2
$ su
# cat /etc/os-release
# cp -Rv /etc/zypp/repos.d /etc/zypp/repos.d.orig
# sed -i 's/13.1/13.2/g' /etc/zypp/repos.d/*
# zypper lr --uri
# zypper ref
# zypper refresh && zypper update && zypper dup
# cat /etc/os-release
$ su
# cat /etc/os-release
# cp -Rv /etc/zypp/repos.d /etc/zypp/repos.d.orig
# sed -i 's/13.1/13.2/g' /etc/zypp/repos.d/*
# zypper lr --uri
# zypper ref
# zypper refresh && zypper update && zypper dup
# cat /etc/os-release
petak, 31. srpnja 2015.
configure NFS server and NFS client in OpenSuse
Example:
NFS Server IP: 192.168.1.5
NFS Client IP: 192.168.1.100
/home/user/folder : /home/your_username/your_folder
----------------------------------------
Configure NFS Server in OpenSuse 13.1:
SERVER nfs:
----------------------------------------
# zypper install nfs-kernel-server yast2-nfs-server
# systemctl enable rpcbind.service
# systemctl start rpcbind.service
# systemctl enable nfsserver.service
# systemctl start nfsserver.service
----------------------------------------
# vi /etc/exports
### share for all subnet:
/home/user/folder 192.168.1.0/24(rw,async,insecure,no_root_squash,no_subtree_check,nohide)
### share for one ip:
/home/user/folder 192.168.1.100(rw,async,insecure,no_root_squash,no_subtree_check,nohide)
----------------------------------------
# systemctl restart rpcbind.service
# systemctl restart nfsserver.service
# exportfs -a
----------------------------------------
----------------------------------------
Configure NFS Client in OpenSuse 13.1:
CLIENT nfs:
----------------------------------------
# systemctl enable rpcbind.service
# systemctl start rpcbind.service
----------------------------------------
# showmount -e 192.168.1.5
----------------------------------------
# vi /etc/fstab
192.168.1.5:/home/user_server/folder_server /client_home/client_username/client_folder nfs rw,async,hard,intr 0 0
----------------------------------------
Allow ports in firewall for nfs clients:
# yast > Security and Users > Firewall > Allowed Services > Add
----------------------------------------
NFS Server IP: 192.168.1.5
NFS Client IP: 192.168.1.100
/home/user/folder : /home/your_username/your_folder
----------------------------------------
Configure NFS Server in OpenSuse 13.1:
SERVER nfs:
----------------------------------------
# zypper install nfs-kernel-server yast2-nfs-server
# systemctl enable rpcbind.service
# systemctl start rpcbind.service
# systemctl enable nfsserver.service
# systemctl start nfsserver.service
----------------------------------------
# vi /etc/exports
### share for all subnet:
/home/user/folder 192.168.1.0/24(rw,async,insecure,no_root_squash,no_subtree_check,nohide)
### share for one ip:
/home/user/folder 192.168.1.100(rw,async,insecure,no_root_squash,no_subtree_check,nohide)
----------------------------------------
# systemctl restart rpcbind.service
# systemctl restart nfsserver.service
# exportfs -a
----------------------------------------
----------------------------------------
Configure NFS Client in OpenSuse 13.1:
CLIENT nfs:
----------------------------------------
# systemctl enable rpcbind.service
# systemctl start rpcbind.service
----------------------------------------
# showmount -e 192.168.1.5
----------------------------------------
# vi /etc/fstab
192.168.1.5:/home/user_server/folder_server /client_home/client_username/client_folder nfs rw,async,hard,intr 0 0
----------------------------------------
Allow ports in firewall for nfs clients:
# yast > Security and Users > Firewall > Allowed Services > Add
----------------------------------------
ponedjeljak, 27. srpnja 2015.
How to create in command line qrcode with qrencode
OpenSuse 13.1
# su
# zypper refresh && zypper update && zypper dup
# zypper install qrencode
$ qrencode -o ~/Desktop/example.png "This is a example"
# su
# zypper refresh && zypper update && zypper dup
# zypper install qrencode
$ qrencode -o ~/Desktop/example.png "This is a example"
četvrtak, 9. srpnja 2015.
Distro upgrade Mint 17.1 to 17.2
$ sudo sed -i 's/rebecca/rafaela/' /etc/apt/sources.list
$ sudo sed -i 's/rebecca/rafaela/' /etc/apt/sources.list.d/official-package-repositories.list
$ sudo apt update && sudo apt upgrade && sudo apt-get -f install && apt dist-upgrade && sudo apt-get -f install
nedjelja, 28. lipnja 2015.
How to Huawei E173s work on OpenSuse 13.2 KDE
How to Huawei E173s-2 work on OpenSuse 13.2 KDE
------------------------------------------------------
$ lsusb
ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem off)
------------------------------------------------------
$ su
# mkdir /etc/usb_modeswitch.d
------------------------------------------------------
# vi /etc/usb_modeswitch.d/12d1:1c0b
#######################################################
# Huawei E173s
DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b
TargetVendor= 0x12d1
TargetProduct= 0x1c0b
CheckSuccess=20
MessageEndpoint= 0x0f
MessageContent= "55534243123456780000000000000011062000000100000000000000000000"
------------------------------------------------------
# vi /lib/udev/rules.d/40-usb_modeswitch.rules
# Huawei E173s
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1c0b"
------------------------------------------------------
# vi /etc/modules
# manual override for Huawei E173s to work
usbserial vendor=0x12d1 product=0x1c0b
------------------------------------------------------
Unplug and plug the USB device type lsusb
$ lsusb
ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)
------------------------------------------------------
$ lsusb
ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem off)
------------------------------------------------------
$ su
# mkdir /etc/usb_modeswitch.d
------------------------------------------------------
# vi /etc/usb_modeswitch.d/12d1:1c0b
#######################################################
# Huawei E173s
DefaultVendor= 0x12d1
DefaultProduct= 0x1c0b
TargetVendor= 0x12d1
TargetProduct= 0x1c0b
CheckSuccess=20
MessageEndpoint= 0x0f
MessageContent= "55534243123456780000000000000011062000000100000000000000000000"
------------------------------------------------------
# vi /lib/udev/rules.d/40-usb_modeswitch.rules
# Huawei E173s
ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1c0b", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1c0b"
------------------------------------------------------
# vi /etc/modules
# manual override for Huawei E173s to work
usbserial vendor=0x12d1 product=0x1c0b
------------------------------------------------------
Unplug and plug the USB device type lsusb
$ lsusb
ID 12d1:1c05 Huawei Technologies Co., Ltd. E173s 3G broadband stick (modem on)
nedjelja, 17. svibnja 2015.
How to install Virtual Machine Manager to Mint or Ubuntu
Install Virtual Machine Manager on Mint or Ubuntu:
$ sudo apt-get install qemu-system qemu-utils libvirt-bin virt-manager python-spice-client-gtk virt-viewer
$ sudo apt-get install qemu-system qemu-utils libvirt-bin virt-manager python-spice-client-gtk virt-viewer
Exit fullscreen from Virtual Machine Manager on CentOS, Mint, Ubuntu
Exit fullscreen from Virtual Machine Manager on CentOS, Mint, Ubuntu
hit Ctrl-Alt to 'unhinge' the mouse and move the mouse to the top-middle of the screen.
A little applet drops down to allow you to leave full screen.
hit Ctrl-Alt to 'unhinge' the mouse and move the mouse to the top-middle of the screen.
A little applet drops down to allow you to leave full screen.
subota, 2. svibnja 2015.
Pretplati se na:
Postovi (Atom)




