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
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
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
https://www.raspberrypi.org/forums/viewtopic.php?t=57552 - nie działa
sudo aptitude install xscreensaver vim /home/pi/.xscreensaver
mode: off
Najpierw tworzymy nowy katalog na pliki strony
sudo mkdir -p /var/www/example.com/public_html
I nadajemy odpowiednie uprawnienia
sudo chown -R $USER:$USER /var/www/example.com/public_html
sudo chmod -R 755 /var/www
Dodajemy nowy plik konfiguracyjny w katalogu /etc/apache2/sites-available
sudo nano /etc/apache2/sites-available/example.com.conf
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Aktywujemy nową stronę i restartujemy apache
sudo a2ensite example.com.conf sudo service apache2 restart
vim /usr/share/redmine/config/configuration.yml
# default configuration options for all environments
default:
# Outgoing emails configuration (see examples above)
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.domain.com
port: 587
domain: domain.com
authentication: :login
user_name: "redmine@domain.com"
password: "password"
cp /usr/share/redmine/config/configuration.yml /etc/redmine/configuration.yml
W wersji 4+
vim /opt/redmine/config/configuration.yml
# default configuration options for all environments
production:
delivery_method: :smtp
smtp_settings:
# tls: true
enable_starttls_auto: true
address: smtp.domain.com
port: 587
domain: domain.com
authentication: :plain
user_name: "redmine@domain.com"
password: "redmine_password"
service apache2 restart
vim ~/.bashrc
alias mount='mount |column -t'
/dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev)
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2
ssh-keygen ssh-copy-id user@11.22.33.44 //remote machine ssh user@11.22.33.44 //nopassword
http://linux.die.net/man/1/rsync
http://www.thegeekstuff.com/2010/09/rsync-command-examples/
sudo aptitude install rsync
rsync -av root@10.20.30.1:/home/* /mnt/home
-a option is a combination flag. It stands for "archive" and syncs recursively and preserves symbolic links, special and device files, modification times, group, owner, and permissions.
-z If you are transferring files that have not already been compressed, like text files, you can reduce the network transfer by adding compression with the -z option:
-P flag is very helpful. It combines the flags --progress and --partial. The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers
http://superuser.com/questions/446603/samba-domain-controller-remove-1-windows-client
pdbedit -L -w | grep '\[[WI]' //lista komputerów podłączonych do domeny pdbedit -L -w | grep '\[[WI]' | grep machine_name pdbedit -x -m machine_name //usuń komputer