22 Apr, 2008  |  Posted by Danesh  |  in HowTo, Linux

I was playing a round with new software today which needed MySQL 5. My server’s running CentOS 4.6 which ships by default with MySQL 4.

The to upgrade to MySQL 5 from MySQL 4 is easy. There are 2 options you could use.

The first option would require you to remove all MySQL 4 packages by running,

># yum remove mysql

The seconf option is way simpler.

># yum --enablerepo=centosplus update mysql

This will download MySQL 5 from the plus repository and replace the installed MySQL 4.

Remeber to backup your DBs before updating.

20 Feb, 2008  |  Posted by Danesh  |  in HowTo, Linux, hacks

If you are like me then you must hate the “BEEP!” that comes along with Linux. Turning it off in KDE or Gnome is easy but what if you are on the virtual console? Here’s how you get rid of the “BEEP!” temporarily or permanently.

Temporary solution,

** make sure to be root or use sudo **

1. Check if you have the pcspkr module loaded.

[root@nosebleed ~]# lsmod | grep pcspkr

pcspkr                  7105  0

2. Remove the module. lsmod will return nothing if the module was removed.

[root@nosebleed ~]# rmmod pcspkr

[root@nosebleed ~]# lsmod | grep pcspkr

3. Restore the module when done.

[root@nosebleed ~]# modprobe pcspkr

[root@nosebleed ~]# lsmod | grep pcspkr

pcspkr                  7105  0

Permanent solution,

** make sure to be root or use sudo **

1. add the pcspkr module to the modprobe blacklist file.

[root@nosebleed ~]# vi /etc/modprobe.d/blacklist

Add the lines below to the file.

# pcspkr - turn off pc speaker "BEEP!"

blacklist pcspkr

2. Reboot, and check if the pcspkr module was loaded. If the blacklist file kicked in then nothing will be returned.

[root@nosebleed ~]# lsmod | grep pcspkr

This fix works for my CentOS and Ubuntu but not openSUSE as the pcspkr driver is built right into the kernel.

14 Feb, 2008  |  Posted by Danesh  |  in HowTo, Linux

Webmin is a web based control panel for system administrators for Unix/Linux. I use Webmin for reports mainly. More about Webmin here.

This is how you would install Webmin on Centos 4.

1. First start by downloading the latest version of Webmin. The current version is 1.400.

I prefer to use use wget to directly download the file onto the server but it’s up to you.

wget http://prdownloads.sourceforge.net/webadmin/webmin-1.400-1.noarch.rpm

2. Install the Webmin rpm package.

rpm -ivh  webmin-1.400-1.noarch.rpm
[root@proxy0 /]# rpm -ivh webmin-1.400-1.noarch.rpm
warning: webmin-1.400-1.noarch.rpm: V3 DSA signature: NOKEY, key ID 11f63c51
Preparing...                ########################################### [100%]
Operating system is CentOS Linux
1:webmin                 ########################################### [100%]
Webmin install complete. You can now login to https://proxy0.klm1.netcel360.com:10000/
as root with your root password.

3. Check if the Webmin service has been started.

service webmin status
[root@proxy0 /]# service webmin status
webmin (pid 4878) is running

That’s it, you can now login using your root id at https://localhost:10000

Continue Reading ->