All of the information provided on the site is provided free of charge in the spirit of open source. If you need work done on your server but do not feel comfortable doing so please contact TotalServerSolutions , the company that I co-founded.

Thanks for visiting!
John Wigle
"eth00"

Mysql 5.0 RHEL4 install problem

I was recently installing mysql 5.0 on a RHEL 4 box and was getting the following really weird error:

[root@mysql mysql]# service mysql start
Starting MySQL ERROR! Couldn't find MySQL manager or server

After looking at all the install documents and making sure I did nothing wrong and that mysql 5.1 did not just need some weird install I found a bug report:

http://bugs.mysql.com/bug.php?id=18820

The last post gives a very simple solution of just commenting out the basedir= and it will start fine, which it does. Once you fix the configuration file the mysqld will work normally, this is apparently just a bug/problem in the current rpms for rhel4 and not in the source or any other release.

Possible backup solutions

There are many different backup solutions that we can deploy for you to ensure they your data is safe. They start at the cheaper options and go up, depending on what level of paranoia you have will determine which you should go with. Each of them has their own advantages and disadvantages. Regardless of the option that you choose it is always advisable to download the site to your local computer occasionally, especially if the site contains very important information. This information was originally for use with Total Server Solutions but it is a good general guide for people thinking about backups.

-jailshell: fork: Resource temporarily unavailable

User accounts in Cpanel servers with jailshell enabled seems to get this error sometimes (When trying to run some commands in console):

-jailshell: fork: Resource temporarily unavailable

I believe this is a bug in Cpanel's jailshell. It may let you use some commands, but usually any command (ls, cat etc.) returns this error. This can be corrected easily:

1) Login to WHM
2) Suspend the account with this issue
3) Unsuspend the account with this issue
4) Done. Suspend/Unsuspend seems to reset the jailshell for the account and remove the error.

Source compile php 4.4.2 for Plesk

I had to figure out how to compile php on a plesk machine and actually get it to work so I took the time to document everything. This guide *should* work, I know it worked on 2 seperate machines. Aside from that do it at your own risk I am not so fond of plesk because it does have so many issues with upgrade. If you have any trouble or dep issues please post thme here so I can work the fixes into the guide.

changing account name in WHM screws InnoDB databases *FIX*

I had to change multiple account names through WHM. After changing account names I found out that MySQL databases with InnoDB screwed up, throwing following error:

Can't open file: 'example_config.ibd' (errno: 1)

I was googling alot on this matter but none of the fixes I found worked for me. So, to save the day here's what you got to do:

1) Change back to old username (using WHM's modify account)
2) Make dump of your database, add this in beginning of the dump: SET FOREIGN_KEY_CHECKS=0;
3) DROP the whole database (Dropping only tables might work, I havent tried it)
4) Change username to the new username (using WHM's modify account)
5) Restore database from the dump.
6) All set, your database should work just fine with no errors.

If this doesnt help you, take a look at this post in MySQL forums: http://forums.mysql.com/read.php?22,34050,52933#msg-52933

Adding a VPS in OpenVZ

This is another really basic guide that is aimed at getting a very basic VPS online. It is the companion guide to my guide on installing openvz. The below shows the downside to useing openvz instead of paying thousands for a real Virtuozo license. If you can deal with doing a little by shell you can save a lot of cash. This is also an open source project so if you wanted to help contribute you could. I do not go into all of the detauls to configuring it but by the end of the guide you will have a vps with just ssh running.

Install openvz

This is a rather short and simple mostly copy/paste guide on how to install openvz from http://www.openvz.org . I have been working with this product for only a short time but I have found it to be very nice. Since it is based off the same technology that Virtuozzo uses it should be just as stable. The only real downside is that it does not have a fancy gui, I for one can deal with that for a testing enviroment! It also works fine for a production enviroment if you want to host VPS from it. Future guides will cover the actual configuration, this is simply installing it and NOT setting up any VPS. The openvz has a lot of documentation on their website which can also be useful. I am only installing the centos 4 minimal and regular because that is all I would believe most people would want, the website has some more. Hint Hint! Don't use fedora core!! Also they only have the templates for yum for Centos 4 so using the centos 3 image is hard. They also have images for fedora core with the yum templates if you want to get them. In time I may try to release an image wih cPanel already installed.

Install yum on RHEL4

So why do you want to install yum on a rhel box if you already have up2date for RHEL4? Well there are a number of reasons, the main one and the reason I wrote this is that I was installing openvz and it needed yum installed. Trying to just use the yum rpm or source compiling was getting all sorts of python errors. I decided to just grab the centos 4 rpms. Note this is not going to be used for updating, up2date still is used for that.


*NOTE* There was some confusion below, this guide is only to be used on a RHEL4 server - it will break RHEL3.

Never users error list for email

When having trouble with email I got the following error in the exim_paniclog on a cpanel server:

User 0 set for local_delivery transport is on the never_users list

The issue appears to be with some of the libraries the following commands should fix it:

ln -s libdb2.so.3 libdb.so.3
/scripts/eximup --force
/etc/rc.d/init.d/exim restart

Thanks to this thread on cpanel forums that I found after a little bit of searching for this fix:
http://forums.cpanel.net/showthread.php?p=135790

cPanel's fix for perl

This email was sent out to all of those who directly purchase cPanel licenses, of course if you are like most people and do not directly own a license but get it through a datacenter you never got this email. I have pasted it below which also contains a fix for the perl problems which are causing a lot of trouble with just about everything, including email. I have corrected a few typo's in the email so that just copy and pasting it will now work, it was not working for their version, and added a few more commands that I needed on some servers.
Updated Jan 13th with the latest version of cpan

Here is the copy/paste version I created:
ls -alh /root/.gnupg
(just make sure it exists)

cd /usr/local/src/
wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.805.tar.g...
tar zxvf libwww-perl-5.805.tar.gz
cd libwww-perl-5.805
perl Makefile.PL
make
make install
cd ../

wget http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/CPAN-1.83.tar.gz
tar zxvf CPAN-1.83.tar.gz
cd CPAN-1.83
perl Makefile.PL
make
make install

/usr/local/cpanel/bin/checkperlmodules
/scripts/updatenow
/scripts/rrdtoolinstall

cPanel perl failing to be setup correctly

As is usual with cPanel another thing has become broken, this time however it is pretty serious. It appears that somebody borked the entire perl setup within cPanel which obviously is a very quick way at ruining cPanel. At this time there is apparently a fix in edge, though I have no want to test it when you can fix it manually. The fix is luckily pretty easy simply run:

perl -MCPAN -e shell

and just hit enter a whole lot of times when it comes up with the perl configuration. I usually select "EUMM" then 5 (north america) 4 (USA) then any random number you see listed for a mirror. After that point you should be good to go and perl should be working.

If you are still having trouble with perl not working then take a look at:
http://www.eth0.us/net-aim-pm

it has some more fixes. Between these two pages I have been able to fix every server so this should work fine. The one it did not I had to completely rpm -e perl and reinstall it.

To reinstall:
up2date --get perl

Can't locate Net/Aim.pm

This error is cropping up on a lot of new cPanel installs:

Can't locate Net/AIM.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/i686-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /scripts /scripts /scripts /scripts /scripts /scripts)

Once I installed the net aim stuff I started to get a new error:

Can't locate Tie/IxHash.pm in @INC (@INC contains: /usr/local/cpanel /usr/lib/perl5/5.8.7/i686-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /usr/local/cpanel /scripts /usr/local/cpanel /scripts /usr/local/cpanel /scripts /usr/local/cpanel) at /usr/local/cpanel/Cpanel/Form.pm line 16

Yet another error I was getting:

Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.8.7/i686-linux /usr/lib/perl5/5.8.7 /usr/lib/perl5/site_perl/5.8.7/i686-linux /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /scripts /scripts /scripts /scripts /scripts /scripts /scripts /scripts) at cPScript/Mysql.pm line 23.

Yes more errors:

Mod_python global mutex error

I ran into a problem where apache would not start due to some sort of mod_python error. This is typically something you only see on a busy server. If you get the following error:

[error] (28)No space left on device: mod_python: Failed to create global mutex 0 of 4 (/tmp/mpmtx175910).
Configuration Failed

Simply run the following to fix it:

echo "kernel.sem = 512 32000 100 512" >> /etc/sysctl.conf; sysctl -p; service httpd start

Install subversion version management system (cvs replacement)

Untitled Document

Subversion is a program much like cvs that allows for version management. Though I am not extremely familiar with it I was asked to install it on a redhat enterprise 3 update 6 server. The following rpms should work great as long as you have it running the latest according to up2date. If you have RHEL4 you can apparently just do up2date -l subversion. Anyways simply download and install these rpms:

Egrep

While many people use the grep command through a pipe | there are more efficient ways of using it. I have nearly killed a server on many occasions by running cat filename |grep some-term while the command tries to list a huge file. Instead simply use egrep which is more efficient in terms of speed and system resources.

Powered by Drupal - Theme created by Danger4k