srijeda, 24. lipnja 2020.

Install Nagios Plugins on CentOS 8

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/

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

----------------------------------------

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

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

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

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