Conky - Install and autostart Kategoria: Raspberry PI | Tagi: monitoring, conky | Autor: Bartłomiej Gałęzia

sudo aptitude install conky
wget -O /home/pi/.conkyrc https://blog.cssoft.pl/images/conkyrc.txt
sudo vim /usr/bin/conky.sh
#!/bin/sh
(sleep 4s && conky) &
exit 0
sudo vim /etc/xdg/autostart/conky.desktop
[Desktop Entry]
Name=conky
Type=Application
Exec=sh /usr/bin/conky.sh
Terminal=false
Comment=system monitoring tool.Categories=Utility;
sudo reboot

https://html.dynu.net/index.php/installing-conky-linux/

How to add weather info

sudo vim /home/pi/.conkyrc
${font Dejavu Sans Mono:size=8}${alignc}${color green}${execpi 300 curl wttr.in/Warsaw?T0 --silent --max-time 3}

https://askubuntu.com/questions/1190907/how-can-i-get-conky-to-display-weather

"It was not possible to execute the cron job via CLI. The following technical errors have appeared:

Your data directory is invalid Ensure there is a file called “.ocdata” in the root of the data directory."

 

Rozwiązanie:

Przejdź w menu do "Basic Settings" i wybierz "Webcron" a następnie kliknij spowrotem na "Ajax".

 

Źródło: https://help.nextcloud.com/t/ensure-there-is-a-file-called-ocdata-in-the-root-of-the-data-directory/23735/2

Zabbix Server - Detect operating system error Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

Rozwiązanie:

visudo
zabbix  ALL=(root) NOPASSWD: /usr/bin/nmap

https://ixnfo.com/en/solution-of-error-with-detect-operating-system-in-zabbix.html

Zabbix Server - Add SNMP Host Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

Dodaj repozytoria non-free do sources.list

vim /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free

deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free

deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free

Zainstaluj na serwerze paczki snmp i snmp-base

aptitude update
aptitude install snmp snmp-mibs-downloader

Zobacz całość

Zabbix Server - Add APC UPS Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

Dodaj repozytoria non-free do sources.list

vim /etc/apt/sources.list
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free

deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free

deb http://deb.debian.org/debian buster-updates main contrib non-free
deb-src http://deb.debian.org/debian buster-updates main contrib non-free

Zainstaluj na serwerze paczki snmp i snmp-base

aptitude update
aptitude install snmp snmp-mibs-downloader

Zobacz całość

Zabbix Server - Add Host Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

Wybieramy w menu:

Configuration -> Host -> Create Host

Uzupełniamy formularz:

Host name = computer_hostname
Visible name = Hostname PC
Groups = Linux servers
Agent interfaces = 192.168.1.10

W zakładce Templates wybieramy szablon:

Select -> Template OS Linux

i potwierdzamy małym przyciskiem Add i dużym przyciskiem Add.

https://tecadmin.net/add-host-zabbix-server-monitor/

Zabbix Agent - Install on Ubuntu 18.04 Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

#wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
#sudo dpkg -i zabbix-release_4.0-3+bionic_all.deb
sudo aptitude update
sudo aptitude install zabbix-agent
sudo vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.1.10
Hostname=computer_hostname
sudo systemctl enable zabbix-agent 
sudo systemctl start zabbix-agent

https://tecadmin.net/install-zabbix-agent-on-ubuntu-and-debian/

Zabbix Server - Administration Queue Error Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

Po wejściu w menu

Administration -> Queue

pokazuje się błąd

Cannot display item queue.

Rozwiązanie:

vim /usr/share/zabbix/include/defines.inc.php
define('ZBX_SOCKET_TIMEOUT', 10); // socket timeout limit
service zabbix-server restart
service zabbix-agent restart

https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/45925-zabbix-3-02-cannot-display-item-queue

Zabbix Server - Konfiguracja poczty Kategoria: Zabbix | Tagi: zabbix | Autor: Bartłomiej Gałęzia

Po zalogowaniu przechodzimy do Menu:

Administration -> Media types -> Email

i uzupełniamy formularz.

Po uzupełnieniu klikamy w Update.

vim /etc/mysql/my.cnf

or

vim /etc/mysql/mariadb.conf.d/50-server.cnf #Debian 10
bind-address           = 0.0.0.0
sudo service mysql restart
mysql -uroot -p
use ocsdb;
GRANT ALL ON ocsdb.* TO ocsuser@'192.168.0.1' IDENTIFIED BY 'ocspassword';
FLUSH PRIVILEGES;

https://linuxize.com/post/mysql-remote-access/

Zabbix Server - Install on Debian 10.3.0 Kategoria: Zabbix | Tagi: debian10, zabbix | Autor: Bartłomiej Gałęzia

1. Base packages

su
apt-get update
apt-get install aptitude vim nmap mc screen traceroute sudo
aptitude install apache2 mariadb-server
aptitude install php php-mbstring php-gd php-xml php-bcmath php-ldap php-mysql

Zobacz całość

Zabbix install - MySQL ERROR 1118 (42000) Kategoria: Zabbix | Tagi: mariadb, mysql, zabbix | Autor: Bartłomiej Gałęzia

ERROR 1118 (42000) at line 1278: Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

W pliku:

/usr/share/doc/zabbix-server-mysql/create.sql.gz

trzeba dodać na początku:

SET SESSION innodb_strict_mode=OFF;

PHP Przekierowanie na inny URL Kategoria: WWW | Tagi: php, przekierowanie, redirect | Autor: Bartłomiej Gałęzia

<?php header('Location: http:://google.pl'); ?>

albo w HTML

<html>
<head>
<meta http-equiv="refresh" content="5;url=http://192.168.1.1/">
</head>
<body>
Trwa migracja na nowy serwer 192.168.1.1<br/>
Za 5 sekund nastapi przekierowanie.
</body>
</html>

Ubuntu - Reset password Kategoria: Linux | Tagi: PASSWORD, ubuntu | Autor: Bartłomiej Gałęzia

From the official Ubuntu LostPassword documentation:

1. Reboot your computer.
2. Hold Shift during boot to start GRUB menu.
3. Highlight your image and press E to edit.
4. Find the line starting with "linux" and append rw init=/bin/bash at the end of that line.
5. Press Ctrl + X to boot.
6. Type in passwd username.
7. Set your password.

Źródło: https://askubuntu.com/questions/24006/how-do-i-reset-a-lost-administrative-password

raspi-config

enable camera

Camera test

vcgencmd get_camera
raspivid -o - -t 0 -hf -w 800 -h 400 -fps 24 |cvlc -vvv stream:///dev/stdin --sout '#standard{access=http,mux=ts,dst=:8160}' :demux=h264

VLC

Media -> Open Network Stream -> http://192.168.1.1:8160 -> Play

https://www.youtube.com/watch?v=JjPsW-7FUng

https://medium.com/home-wireless/headless-streaming-video-with-the-raspberry-pi-zero-w-and-raspberry-pi-camera-38bef1968e1

Drukarka Canon MX525 na Ubuntu 18.04 Kategoria: Linux | Tagi: canon, printer | Autor: Bartłomiej Gałęzia

Pobierz sterowniki ze strony Canon na Linux (64 - bit)

https://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mx_series/mx525.html?type=drivers&language=en&os=linux%20(64-bit)

MX520 series ScanGear MP Ver. 2.10 for Linux (debian Packagearchive)

https://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mx_series/mx525.html?type=drivers&driverdetailid=tcm:13-1030669&os=linux%20%2864-bit%29&language=en

MX520 series IJ Printer Driver Ver. 3.90 for Linux (debian Packagearchive)

https://www.canon-europe.com/support/consumer_products/products/fax__multifunctionals/inkjet/pixma_mx_series/mx525.html?type=drivers&driverdetailid=tcm:13-1030651&os=linux%20%2864-bit%29&language=en

Rozpakuj pliki:

cnijfilter-mx520series-3.90-1-deb.tar.gz
scangearmp-mx520series-2.10-1-deb.tar.gz

Uruchomi skrypt do instalowania skanera:

cd scangearmp-mx520series-2.10-1-deb
./install.php

Skaner będzie już widoczny w aplikacji Simple Scan lub Scanimage.

Zainstaluj paczki 64bit dla drukarki:

cd cnijfilter-mx520series-3.90-1-deb/
sudo dpkg -i packages/*amd64.deb
./install.sh

Źródło: https://tutorialforlinux.com/2018/04/23/printer-canon-mx525-driver-for-ubuntu-18-04-bionic-how-to-download-install/

ERROR 1153 (08S01) at line 4025: Got a packet bigger than 'max_allowed_packet' bytes

vim /etc/mysql/mysql.conf.d/mysqld.cnf
max_allowed_packet = 512M
vim /etc/mysql/conf.d/mysqldump.cnf
max_allowed_packet = 512M
service mysql restart

apt-get error ubuntu - IPv6 Kategoria: Linux | Autor: Bartłomiej Gałęzia

0% [Connecting to archive.ubuntu.com(2001:67c:1360:8c01::1a)]
cat /proc/sys/net/ipv6/conf/all/disable_ipv6

0 means its enabled
1 means its disabled/

echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6

https://www.crybit.com/0-connecting-to-archive-ubuntu-com/

Mysql-server reset root password Kategoria: Linux | Tagi: mysql | Autor: Bartłomiej Gałęzia

sudo mysqld_safe --skip-grant-tables
sudo mysql --user=root mysql
update user set authentication_string=password('1111') where user='root';
flush privileges;

https://dba.stackexchange.com/questions/55116/mysql-login-after-secure-installation

https://stackoverflow.com/questions/30692812/mysql-user-db-does-not-have-password-columns-installing-mysql-on-osx

You have to change SATA Operation in BIOS

from "RAID on" to "AHCI"

https://www.reddit.com/r/Ubuntu/comments/93m46g/18041_installer_not_detecting_any_partitionsnew/