Kategoria - Linux - liczba wpisów 197
Debian, Ubuntu, Fedora

http://psdoom.sourceforge.net/

RHCSA and RHCE Certification content in detailed Kategoria: Linux | Autor: Franciszek Musiel

RHCSA and RHCE Certification content in detailed

https://arkit.co.in/rhcsa-and-rhce-certification-content-in-detailed/

 

 

 

Websync - RSYNC web manager Kategoria: Linux | Autor: Bartłomiej Gałęzia

http://furier.github.io/websync/

Linux CMDCHALLANGE Kategoria: Linux | Tagi: funny, learn, shell, bash, cmd, linux | Autor: Franciszek Musiel

https://cmdchallenge.com/#/hello_world

Centos 7 jak włączyć Jumboframe'y - MTU 9000 Kategoria: Linux | Autor: Bartłomiej Gałęzia

http://www.microhowto.info/howto/persistently_change_the_mtu_of_a_network_interface_on_redhat.html

vim /etc/sysconfig/network-scripts/ifcfg-eth0
MTU=9000
ifdown eth0
ifup eth0

Instalacja sterowników nVidia na Centos 7 Kategoria: Linux | Autor: Bartłomiej Gałęzia

https://linuxconfig.org/nvidia-geforce-driver-installation-on-centos-7-linux-64-bit

yum update

reboot

yum install kernel-devel-$(uname -r) gcc

echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf
dracut /boot/initramfs-$(uname -r).img $(uname -r) --force

systemctl disable gdm

reboot

Pobieramy aktualne sterowniki ze strony nvidia.com

wget http://pl.download.nvidia.com/XFree86/Linux-x86_64/375.26/NVIDIA-Linux-x86_64-375.26.run

chmod +x NVIDIA-Linux-x86_64-375.26.run
./NVIDIA-Linux-x86_64-375.26.run

nvidia-xconfig

systemctl enable gdm

reboot

Terminal recursive search history Kategoria: Linux | Tagi: recursive, TERMINAL, linux, search, ssh | Autor: Franciszek Musiel

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
cd .fzf/
./install
source ~/.bashrc

Jak wysłać wynik polecenia CRON na inny adres mailowy Kategoria: Linux | Tagi: cron | Autor: Bartłomiej Gałęzia

(tutaj_wykonywane_zadanie_crona)| mail -s "TYTUL maila" adres@mailowy.pl &>/dev/null

CHECK_NRPE: Socket timeout after 10 seconds. Kategoria: Linux | Tagi: nagios, nrpe | Autor: Bartłomiej Gałęzia

Nagios nie chce wykonać polecenia na hoście zdalnym.

/usr/lib/nagios/plugins/./check_nrpe -H 11.22.33.44 -c check_users

i zwraca błąd

CHECK_NRPE: Socket timeout after 10 seconds.

na hoście zdalnym w logach widnieje komunikat:

Could not read request from client, bailing out...

Zobacz całość

sSMTP - wysyłanie maili z konsoli przez SMTP Kategoria: Linux | Autor: Bartłomiej Gałęzia

Instalujemy paczkę ssmtp

aptitude install ssmtp

Edytujemy configi zgodnie ze swoj serwerem pocztowym

vim /etc/ssmtp/ssmtp.conf
root=username@domain.com

mailhub=mail.domain.com:587

rewriteDomain=domain.com

hostname=hostname

FromLineOverride=YES

AuthUser=username@domain.com
AuthPass=sicret_password
UseTLS=YES
UseSTARTTLS=YES

Zobacz całość

rsync poprzez tunel Kategoria: Linux | Autor: Wojciech Gazda

zestawiamy tunel z serwera z ktorego chcemy kopiowac na serwer z ktorego mamy dostep do serwera na ktory chcemy kopiowac

czyli laczymy sie po ssh na serwer z ktorego chcemy kopiowac i na nim wydajemy ponizsze polecenie

serwerzrodlowy# ssh user@serwer -L 56565:serwerdocelowy:22

zostaniemy zalogowani na serwer wazna sprawa nie mozemy zamknac tego polaczenia 

wiec w innej karcie (zakladce klienta ssh czy co tam uzywacie) sprawdzamy czy tunel stoi 

ps -ef | grep 56565

powinno pokazac odpalony proces ssh z danym portem 

no i teraz mozemy sobie spokojnie zapuscic rsync'a

rsync -e "ssh -p 56565" -avzA /skad/ root@localhost:/doklad/

find - kilka polecen Kategoria: Linux | Autor: Wojciech Gazda

kilka "myków" z użyciem find'a

sprawdzenie ile zajmuja pliki starsze niz 31dni 

 

find ./ -type f -mtime +31 -exec ls -l {} \; | awk '{ total += $5 }; END { print total/1024/1024/1024 " GB" }'

 

zmiana nazwy kilku plikow 

find . -name '*czescnazwyplikudozmiany*' -exec bash -c 'mv $0 ${0/czescnazwyplikudozmiany/nacozmieniamy}' {} \;

 

kasowanie duzej ilosci plikow

ls -1 | wc -l && time find . -type f -delete

dodatkowo w bonusie policzy ile plikow i w jakim czasie zostaly usuniete

 

Virtualbox zdalne włączenie panelu Kategoria: Linux | Autor: Bartłomiej Gałęzia

ssh -Y user@host "VirtualBox"

Simple Screen Recorder

http://www.maartenbaert.be/simplescreenrecorder/#download

sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder

sudo apt-get update

sudo apt-get install simplescreenrecorder

 

 

 

 

Ubuntu 10.04.2 - APT stare źródła Kategoria: Linux | Autor: Bartłomiej Gałęzia

Naprawa pliku sources.list w starych instalacjach ubuntu:
sudo sed -i -e 's/pl.archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update

Rsync full system backup Kategoria: Linux | Tagi: Rsync | Autor: Bartłomiej Gałęzia

# rsync -aAXv --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} / /path/to/backup/folder

https://wiki.archlinux.org/index.php/full_system_backup_with_rsync

Rsync backup na innym porcie niż 22 Kategoria: Linux | Autor: Bartłomiej Gałęzia

rsync -rtv -e 'ssh -p 12345' --progress user@host:/home/user /home/user

Cockpit Monitor Kategoria: Linux | Tagi: monitoring, performance, linux | Autor: Franciszek Musiel

http://www.tecmint.com/cockpit-monitor-multiple-linux-servers-via-web-browser/

"Cockpit is an easy-to-use, lightweight and simple yet powerful remote manager for GNU/Linux servers, it’s an interactive server administration user interface that offers a live Linux session via a web browser.

It can run on several Linux distributions including Debian, Ubuntu, Fedora, CentOS, RHEL, Arch Linux among others.

Cockpit makes Linux discoverable thereby enabling system administrators to easily and reliably carry out tasks such as starting containers, managing storage, network configurations, log inspections coupled with several others."

CENTOS

yum install cockpit sos -y
systemctl enable --now cockpit.socket
firewall-cmd --add-service=cockpit
firewall-cmd --add-service=cockpit --permanent

REDHAT

subscription-manager repos --enable rhel-7-server-extras-rpms
yum install cockpit sos -y
systemctl enable --now cockpit.socket
firewall-cmd --add-service=cockpit
firewall-cmd --add-service=cockpit --permanent

https://server.domain.com:9090

Autologowanie SSH - wymiana kluczy Kategoria: Linux | Autor: Bartłomiej Gałęzia

ssh-autologin
mv ssh-autologin /bin/ssh-autologin
chmod +x /bin/ssh-autologin
ssh-autologin -l login -g host

Zobacz całość

QRadar SIEM - recovery admin password Kategoria: Linux | Tagi: PASSWORD, QRADAR, SIEM | Autor: Franciszek Musiel

To recover the Admin password (eg. the password for the web interface) on a v7.7.2.x Siem installation, you can use the command:

# /opt/qradar/support/changePasswd.sh -a

# /etc/init.d/tomcat restart