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 <
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
If rpm / yum command hangs during operations or you see error messages – it means your rpm database corrupted. /var/lib/rpm/ stores rpm database just delete the same and rebuild rpm database:
Command to rebuild rpm database
rm -f /var/lib/rpm/__db*
rpm --rebuilddb -v -v
Forcing the restore of a transfered cPanel account , even if the new system says the username is all ready in use
/scripts/restorepkg –force –skipres <account.tar.gz>
When installing the CSF firewall on your CentOS server, you need to make sure that you have libwww-perl installed
This is easily done by installed it with yum on CentOS 5
yum install perl-libwww-perl
Want to remove Tomcat from cPanel?
Log-into your server as root using ssh:
Execute the following command to stop the Tomcat process:
…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.
Issues with suhosin or mod_security , then best check your Apache error logs
tail -f /usr/local/apache/logs/error_log
When troubleshooting the Exim log file:
tail -f /var/log/exim_mainlog
If you need to restart or rebuild Exim, you can dump your databases
Which Exim just rebuilds automatically by issuing the following command via SSH:
rm -fv /var/spool/exim/db/*
Then to start Exim:
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.
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…
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
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:
In order to update the templates, add a -t to the command thusly:
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.