Excluding Packages from Yum Update

When running a ‘yum update’ under CentOS, there are certain packages you may be running which you wish to remain static, or which can potentially cause errors with the update eg. Samba.

In these situations it is useful to force yum to exclude certain packages from being updated under CentOS.

Yum uses a configuration file located at <strong>/etc/yum/yum.conf or /etc/yum.conf

If you wish to exclude packages you need to define a list for exclusion from updates or installs. This should be a space separated list. (Shell globs using wildcards * and ?) are allowed).
Continue reading Excluding Packages from Yum Update

How to remove Tomcat on cPanel

Want to remove Tomcat from cPanel?

Log-into your server as root using ssh:

Execute the following command to stop the Tomcat process:
# /usr/sbin/stoptomcat

…and to remove the next files, enter:
# rm -f /usr/sbin/starttomcat
# rm -f /usr/sbin/startomcat
# rm -f /usr/sbin/stoptomcat

Finally, remove all mod_jk lines from httpd.conf, including addmodule, loadmodule, and include lines.

Linux server tip: force reboot/shutdown

Forcing reboot

A Linux Server is not Windows XP and if reboot fail you usually still connect by SSH and do something. This commands will show you how to remotely hard reboot machine. Hard reboot mean that shutdown scripts will not run and machine reboot immediately without syncing hard disk drives, shutdown applications etc, it’s more like hitting the reset button.

echo 1 > /proc/sys/kernel/sysrq

echo b > /proc/sysrq-trigger

This commands enable sysrq and after this calls fast reboot. If you want to force shutdown machine try this.

Force shutdown

echo 1 > /proc/sys/kernel/sysrq

echo o > /proc/sysrq-trigger

This came handy, when I had a server that had some IO error and it can no longer read from disk, only few cached binaries into memory kept it running (kernel, SSHD, bash), I could still access the machine via SSH but can no longer do anything, forcing the reboot as mentioned above was my only resort, and it worked like charm…

How To Set Up A Load-Balanced MySQL Cluster With MySQL 5.1

This tutorial is based on Falko Timme’s tutorial for MySQL Cluster 5.0. It shows how to configure a MySQL 5.1 cluster with five nodes: 1 x management, 2 x storage nodes and 2 x balancer nodes. This cluster is load-balanced by an Ultra Monkey package which provides heartbeat (for checking if the other node is still alive) and ldirectord (to split up the requests to the nodes of the MySQL cluster).
Continue reading How To Set Up A Load-Balanced MySQL Cluster With MySQL 5.1

How to update Virtuozzo Node to the newest Kernel

Virtuozzo includes a utility to update itself and the included templates. To run this, you will need to ssh into the hardware node and execute the command:

vzup2date

In order to update the templates, add a -t to the command thusly:

vzup2date -t

It should be noted that if Virtuozzo is installed on the server, the standard Redhat up2date command should never be run.

If you are running Virtuozzo on a Windows server, then you can run the Virtuozzo update utility accessed through the Start menu.