Dec
05
2009
When you try to update debian and you get this error:
There is no public key available for the following key IDs: 9AA38DCD55BE302B
there are two ways to solve the issue:
-
gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B; apt-key add .gnupg/pubring.gpg
-
sudo aptitude install debian-keyring debian-archive-keyring
If you have network problems because of your firewall try the second one. The error, in this case, is something like:
gpg: keyserver timed out
Debian power…
Tags: gpg debian error apt-get update
May
09
2009
get into mysql as root
and execute:
purge binary logs before ''''2008-12-31'''';
exit
That”’’s all!!!
You save a lot of disk space.
Tags: mysql purge bin-log logs
Dec
25
2008
Last week Lucas my co-worker Lucas noticed that in one of our servers didn’t have a swap partition, until now things were going ok because server didn’t have much RAM usage, but now servers is getting more traffic each day and sometimes free ram gets extremely low.
In a normal situation the process here should be, reboot the server, and using gparted or similar create a small amount of free space and allocate that as a swap partition. Fortunately this not needed nowadays, since Kernel 2.6 swap file performance has increased dramatically so the possible benefits from having a dedicated swap partition against a swap file are so small that in some situations it is preferable to have a swap file in case you wan’t to increase / decrease it’s size.
The process for building this kind of swap files is very simple:
# dd if=/dev/zero of=/home/swap bs=1M count=1024
Replacing 1024 with the number of megabytes you want will change the swap file size.
Now that we have the size we want on disk we can prepare it for usage as a swap partition:
# mkswap /home/swap
Now the swap file has being built you must introduce the following line in /etc/fstab file so this partition get’s mounted once the system is rebooted:
/home/swap swap swap defaults 0 0
And finally to test the swap file you should type, which would activate all the partitions marked as “swap” in /etc/fstab
# swapon –a
Now finally we can check that the swap partition has being activated:
# free -m
total used free shared buffers cached
Mem: 2028 1719 308 0 132 1119
-/+ buffers/cache: 468 1559
Swap: 1023 0 1023
Finally there are two useful commands you should be aware if you are playing around with swap files:
# swapon | swapoff
This commands activate and deactivate the usage of swap file.
Tags: swap, swapfile