M

  • mod rewrite
    # zapnout mod rewrite RewriteEngine on # zmena pripony (nastavit Base, aby nepresmeroval na umisteni souboru ve filesystemu - /var/www/html...) RewriteBase /mujweb RewriteRule ^(.*).html $1.php # presmerovani na novy web/domenu RewriteCond ...
  • mod_layout
    add banner (header) to all pages, but prevent adding ...
  • mount a charset
    /etc/fstab: /dev/hdb1 /mnt/hdb1 vfat rw,iocharset=iso8859-2,codepage=852 0 0 nebo ručně: mount -o iocharset=iso8859-2,codepage=852 /dev/hdb1 /mnt/hdb1 ...
  • mount ext3 s pravy pro usera
    podle http://www.willempen.org/mount-user-permissions/ po primountovani nove partition je vlastnikem root a nelze zapisovat jako user, resenim je: cd /mnt/hdc1 chown user:user . zustane i po umount/mount ...
  • mdadm re-add removed disk
    mdadm --detail /dev/md1 Number Major Minor RaidDevice State 0 ...
  • maškaráda / NAT / překlad adres
    echo "1" > /proc/sys/net/ipv4/ip_forward iptables -t nat -F iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE dát třeba na konec /etc/rc.d/rc.local ...
  • mysqldump
    dump vsech databazi: mysqldump --add-drop-table -h HOST -u USER -pPASSWORD --all-databases | gzip > all-databases.sql.gz dump databáze: mysqldump --compress --add-drop-table -h host -u user -p database > database.sql nebo: mysqldump ...
  • mysql dotaz: ze dvou stejnych tabulek vybrat pouze neduplicitni zaznamy
    tabulka1, sloupec1 obsahuje radky a, b, c, d, e, f tabulka2, sloupec1 obsahuje radky a, b, c dotaz by mel vratit pouze neparove hodnoty - tzn. d, ...
  • mysql replication
    http://dev.mysql.com/doc/refman/5.0/en/replication-howto.html SHOW MASTER STATUS; SHOW SLAVE STATUS; pokud je chyba, napravit (vetsinou pri modifikaci SLAVE tabulky) a pak: SLAVE STOP; SLAVE START; ...
  • mount samba folder
    To be able to access the samba share read-write as non-root users, you must add uid and gid entries to the smbmount command /etc/fstab entry: //winbox/share /mnt/share ...
  • mencoder
    convert and resize .3gp to .mpg mencoder video_in.3gp \ -oac mp3lame -ovc lavc \ -vf scale=352:288 -o video_out.mpg capture webcam with audio mencoder \ ...
  • minecraft client startup script with username
    #!/bin/bash BIN=$HOME/.minecraft/bin java -Xms512M -Xmx1024M \ -cp ...
  • monitorování senzorů pomocí IPMI
    1) odinstalovat lm-sensors2) apt-get install ipmitool3) modprobe ipmi_devintf ipmi_msghandler ipmi_si(melo by se vytvorit zarizeni /dev/ipmi0)4) vypis senzorů: ipmitool sensornebo pouze hodnotu teploty CPU (např. do ...
  • monitorování teploty HDD
    1) apt-get install hddtemp2) hddtemp /dev/hd? ...
  • Monitor megaraid status in ESXi
    1) Download LSI vmware monitoring utility http://www.lsi.com/DistributionSystem/AssetDocument/8.00.23_Vmware_CLI.zip (no more available, see attachment below...) 2) Copy MegaCli utility via scp ...