Markus Blog What's going on Internet?

31Mar/086

CPanel Problem Upgrading MySQL 5

Several months ago I had problem on upgrading CPanel's MySQL 4.1 to MySQL 5. The problem was occurred on Centos 5 OpenVZ based VPS. Since someone contact me at WebHostingTalk forum asking about the same problem so I decided to re-try again the steps to fix the problem. Hence I post it here too, for future and general purposes :)

ok, do this at your own risk :) backup your mysql data first!

the steps i do:

31Mar/084

Xen VPS “4gb seg fix up” Problem

It's a known issues on Xen based Virtual Private Server (VPS) that often it shows "4gb seg fix up" error messages. After a few search I found this command to fix it.

Run the commands below on DomU

First try disabling tls by renaming it to tls.disabled:

mv /lib/tls /lib/tls.disabled
mv /usr/lib/tls /usr/lib/tls.disabled

If this doesn't work then try this command:

echo 'hwcap 0 nosegneg' > /etc/ld.so.conf.d/libc6-xen.conf && ldconfig

after that you'll need to restart the VPS

Tagged as: , 4 Comments
31Mar/080

Checking Your Linux Centos Version

To check your Linux Centos version, just type:

cat /etc/redhat-release

it will show you the information like this:

CentOS release 5 (Final)
Tagged as: , No Comments
5Dec/071

Creating /dev/random

Somehow in some Linux Centos installation the /dev/random is missing. The problem is some software needs it to working well. Here is how to create it:

mknod /dev/random c 1 9

Other devices might be missing to such as /dev/urandom, /dev/null and /dev/ptmx if you need those device here is how to create it:

mknod /dev/urandom c 1 9
mknod /dev/ptmx c 5 2
mknod /dev/null c 1 3
chmod +666 /dev/null
5Dec/074

Error: “bind to port 22 on 0.0.0.0 failed: Address already in use”

Yesterday I setup a Linux Centos server which then having problem with connection refused/dropped when I configuring it via SSH.I check the sshd log file, and see “Error: bind to port 22 on 0.0.0.0 failed: Address already in use” error message. Some web page I read said that it’s because IPv4 and IPv6 are both configured to listen SSH, we need to turn off one. Here is how to fix it:

/etc/ssh/sshd_config

Look for

Port 22
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::

If you use IPv4, uncomment this line:

ListenAddress 0.0.0.0

So it look like this:

Port 22
Protocol 2
ListenAddress 0.0.0.0
#ListenAddress ::

For IPv6, uncomment this one:

ListenAddress ::

So it look like this:

Port 22
Protocol 2
#ListenAddress 0.0.0.0
ListenAddress ::
1Aug/070

Closing Open DNS Problem on BIND

Today I'm installing new CPanel server which come with BIND on it. After finished installing, I look at DNSReport website and found out that the DNS server have “open DNS” problem.

Here is easy fix for open DNS problem, all you need to do is modify your

/etc/named.conf

file to look like this:

acl "trusted" {
      11.22.33.44;
      44.33.22.11;
      66.55.44.33;
      127.0.0.1;
};
 
options {
      directory "/var/named";
      version "not currently available";
      allow-recursion { trusted; };
      allow-notify { trusted; };
      allow-transfer { trusted; };
};

Where all IP addresses are your nameserver IPs, including cluster server IP if you set it.

5Jul/073

Apache Can’t Load Modules Problem

Today I’m having problem with CPanel’s Apache when I upgrade it. The Apache server won’t start, it gives this error messages:

Syntax error on line 216 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/libexec/mod_bwlimited.so into server: /usr/local/apache/libexec/mod_bwlimited.so: cannot open shared object file: No such file or directory
/etc/init.d/httpd start: httpd could not be started

Obviously that the module mod_bwlimited.so cannot be found by Apache, here is how to fix it:

cd /usr/local/cpanel/apache
/usr/local/apache/bin/apxs -iac mod_bwlimited.c

After compile finish the .so file will be copied to the right directory and you can start Apache by executing command:

service httpd start
30Jun/070

Synchronizing Server Date and Time Using rdate

You can sync or update the date and time of your linux server by using rdate command. rdate command will the check the time server and compare the date time on your server to the time server.

If there is time difference, rdate will update your server date time. To update your server date time run this command:

rdate -s <timeserver></timeserver>

The list of time server can be found on this website: http://www.eecis.udel.edu/~mills/ntp/clock1a.html use the one that near with your server location.

Since my server is in Singapore then I use this command:

rdate -s nets.org.sg

To set the hardware clock to match with your system clock, you can use this command:

/sbin/hwclock --systohc
Page 4 of 512345