# 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
W wersji CI 3.1 e-mail wysłany z załącznikiem jest błędnie kodowany i dociera do adresata z pustym załącznikiem mimo, że wiadomość zajmuje tyle miejsca jakby zawierała załącznik.
WARNING! This attachment is suspicious because its type doesn't match the type declared in the message. If you do not trust the sender, you shouldn't open it in the browser because it may contain malicious contents. Expected: application/pdf (.pdf); found: application/x-empty
Zobacz całość
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
ssh-autologin
mv ssh-autologin /bin/ssh-autologin chmod +x /bin/ssh-autologin
ssh-autologin -l login -g host
Zobacz całość
ex: 0602-108 screen is not a recognized terminal type.
# export TERM=xterm
# vi file.conf
https://ubuntuforums.org/showthread.php?t=884556
sudo fdisk -l sudo mdadm --detail /dev/md0 sudo umount /dev/md0 sudo mdadm --stop /dev/md0 sudo mdadm --zero-superblock /dev/sdax sudo mdadm --zero-superblock /dev/sdbx
### NFS
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=mountd
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --reload
http://www.cyberciti.biz/faq/nmon-performance-analyzer-linux-server-tool/
# Get Root
sudo su
# Download NMON archive
cd /tmp
wget http://nmon.sourceforge.net/docs/MPG_nmon_for_Linux_14a_binaries.zip
# Install unzip if you don't have
yum install unzip
# Unzip archive
unzip MPG_nmon_for_Linux_14a_binaries.zip
# Copy nmon file
cp nmon_x86_64_centos5 /usr/local/bin/
chmod a+x /usr/local/bin/nmon_x86_64_centos5
# Create symbolic link
ln -s /usr/local/bin/nmon_x86_64_centos5 /usr/local/bin/nmon
# vim ~/.bashrc
alias nmon='. ~/.bashrc'
# . ~/.bashrc
#!/bin/ksh
# Use the following script to kill the currently running instance
# of the TSM scheduler, and restart the scheduler in nohup mode.
#
# This script will not work properly if more than one scheduler
# process is running.
# If necessary, the following variables can be customized to allow an
# alternate options file to be used.
# export DSM_DIR=
# export DSM_CONFIG=
# export PATH=$PATH:$DSM_DIR
# Extract the PID for the running TSM Scheduler
PID=$(ps -ef | grep "dsmc sched" | grep -v "grep" | awk {'print $2'});
print "Original TSM scheduler process using PID=$PID"
# Kill the scheduler
kill -9 $PID
# Restart the scheduler with nohup, redirecting all output to NULL
# Output will still be logged in the dsmsched.log
nohup dsmc sched 2>&1 > /dev/null &
# Extract the PID for the running TSM Scheduler
PID=$(ps -ef | grep "dsmc sched" | grep -v "grep" | awk {'print $2'});
print "New TSM scheduler process using PID=$PID"
https://help.ubuntu.com/lts/serverguide/NTP.html
http://www.timesynctool.com/
Całkowite usunięcie i wyczyszczenie systemu po WINE
sudo apt-get remove wine rm -rf $HOME/.wine
rm -f $HOME/.config/menus/applications-merged/wine*
rm -rf $HOME/.local/share/applications/wine
rm -f $HOME/.local/share/desktop-directories/wine*
rm -f $HOME/.local/share/icons/????_*.xpm
sudo apt-get remove –purge wine
sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
vim /etc/nagios3/commands.cfg
define command{
command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ -C public -o $ARG1$
}
vim /etc/nagios3/objects/hostname.cfg
define service{
use generic-service
host_name laptop
service_description Admin email
check_command check_snmp!.1.3.6.1.2.1.1.4.0
} Z wiersza poleceń:
snmpwalk -v1 -c public 192.168.1.1
Baza polskich kodów pocztowych:
https://www.poczta-polska.pl/hermes/uploads/2013/11/spispna.pdf
http://kody.poczta-polska.pl/ - wyszukiwarka
https://www.bphtfi.pl/baza-kodow-pocztowych/ - lista w xls (link nieaktywny)
Lista w xls PLIK
Nagios nie chce wywoływać zdalnych poleceń przez nrpe:
define service{
use generic-service
host_name komputer
service_description Free Space /dev/sda1
check_command check_nrpe!check_sda1
}
przez stronę pojawia się tylko komunikat
(No output returned from plugin)
Zobacz całość
http://askubuntu.com/questions/471847/brightness-fn-key-shortcut-doesnt-work-on-asus-laptop
sudo gedit /etc/default/grub
change
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="
sudo update-grub