.htaccess redirect all pages to new domain —
RewriteEngine on
RewriteRule ^(.*)$ http://new.site/$1 [R=301,L]
Just another blog from admin's
RewriteEngine on
RewriteRule ^(.*)$ http://new.site/$1 [R=301,L]
VPS:/# cd /var
VPS:/var# touch swap.img
VPS:/var# chmod 600 swap.img
VPS:/var# dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 4.0868896 s, 253 MB/s
VPS:/var# mkswap /var/swap.img
Setting up swapspace version 1, size = 1020 GiB
no label, UUID=72761533-8xbe-436l-b07e-c0sabe9cedf3
VPS:/var# swapon /var/swap.img
VPS:/var# echo "/var/swap.img none swap sw 0 0" >> /etc/fstab
VPS:/var# sysctl -w vm.swappiness=30
1. STOP VM on VMWare
2. EDIT and add disk space
3. Start VM
Read the rest of this entry »
I’ve just upgraded from 12.04 to 14.04 on my WUBI installation.
The upgrade told me to Restart to finish the upgrade!!!
But when I did it, I got a black screen with :
4 lines beginning “mount:mounting…” etc,
then “Target file-system doesn’t have requested /sbin/init”
Ok challenge accepted!
Read the rest of this entry »
Check the current state of the VM:
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.getstate
Turn it off and on, restart it etc:
vim-cmd vmsvc/power.on
vim-cmd vmsvc/power.off
vim-cmd vmsvc/power.restart
vim-cmd vmsvc/power.reboot
vim-cmd vmsvc/power.shutdown
These commands work for me with Wireshark 1.6.2 on Ubuntu Server 11.10 (64-bit):
$ sudo apt-get install wireshark
$ sudo dpkg-reconfigure wireshark-common
$ sudo usermod -a -G wireshark $USER
$ sudo reboot
I found two cool programs : Iperf and NetCat
It is no secret that I am a pretty big fan of excellent Linux Software RAID. Creating, assembling and rebuilding small array is fine. But, things started to get nasty when you try to rebuild or re-sync large size array. You may get frustrated when you see it is going to take 22 hours to rebuild the array. You can always increase the speed of Linux Software RAID 0/1/5/6 reconstruction using the following five tips.
Read the rest of this entry »
Type in mysql console :
STOP SLAVE; SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; START SLAVE;
Or just add in my.cnf :
slave-skip-errors = 1062
The Universally Unique Identifier can be used to identify a device independent form its mount point or device name. This is more and more important as many devices today support hot-plugging or are external anyway. Therefore it makes sometimes sense to access a device (for example in fstab) not by device name but by the UUID.
Read the rest of this entry »