'System Administrator' Category

  • Complete list of option: hostapd.conf

    May 21, 2015
    Example for hostapd configuration file hostapd.conf See also
  • Mount nfs on MacOs

    January 18, 2015
    Tip: Operation not permitted Error If you get an error which read as follows: 192.168.3.1:/mp3 Operation not permitted Try to mount it as follows with -o resvport command: mount -t nfs -o resvport 192.168.3.1:/home /home OR mount an NFS in read/write mode, enter: mount -t nfs -o resvport,rw 192.168.3.1:/home /home Recommend mount Command Options I […]
  • Ifconfig: Examples To Configure Network Interface

    January 15, 2015
    Ifconfig: Examples To Configure Network Interface.
  • Copy Disk structure for RAID

    April 15, 2014
    Use that command to copy the structure of sda to sdd: sfdisk -d /dev/sda | sfdisk /dev/sdd
  • Add a file to the swap

    April 15, 2014
    Sometimes you can need to add more swap and you can’t change the partitioning of your disk. You can add a file to you swap that we be handle like a disk partition. I recommand to create that file on a ssd disk, because when you server start to swap, it’s not a good side. […]
  • Disk MBR

    April 14, 2014
    Copy MBR between disks: dd if=/dev/sda bs=446 count=1 | dd of=/dev/sdz bs=446 count=1 How to know what bootloader is installed: dd if=/dev/sda bs=446 count=1 2> /dev/null| strings -a
  • Encrypted directory with losetup

    April 14, 2014
    Create a file device: dd if=/dev/zero of=/tmp/crypto.raw bs=1M count=100 Mount Loop device: losetup -e blowfish `losetup -f` /tmp/crypto.raw Format: mkfs.ext3 /dev/loop0 losetup -d /dev/loop0 Mount Loop device: mount -t ext3 /tmp/crypto.raw /mnt/crypto/ -o encryption=blowfish
  • Tcpdump

    April 14, 2014
    Get the last 20 packets exept ssh connections tcpdump -s 0 -n not port ssh -c 20 Get the last 100 http packets and extract hosts tcpdump -s 0 -n -ttt -v -A port 80 -c 100 | grep Host Get the last 100 MySQL queries tcpdump -s 0 -n -ttt -v -A port 3306 […]
  • Sphinx Search

    April 13, 2014
    I use Sphinx to search text in 5 millions records. Mysql is not as good, sphinx is a deticated read only database to search text. The performance are so good, that I use sphinx for everything, even for regular queries. I managed to reduce the load of my servers by a factor of 10 ! […]
  • Memcache

    April 13, 2014
    I was having performace issue in 2008 on my websites, the traffic was getting hight and I had no budget the get more servers. I already used an architecture with squid as a load balancer, and mysql slaves severs. With no budget, I had to find a way to improve the load performace with the […]