Top Nav

MySQL 4.1.13 Binary Install To RHEL 3 Taroon

Recent I had to install MySQL on a RHEL 3 server. Normally I’d do this with RPMs but in this case the client needed an install that exactly matched another server which had been installed using the TAR/GZ binary distribution.

Here are the steps used for the install:

1. Download the binary TAR/GZ distribution. In this case it was named mysql-standard-4.1.13-pc-linux-gnu-i686.tar.gz and I downloaded it to /root/archive.

2. Unpack the distribution.

3. The steps provided in the INSTALL-BINARY text file included in the distribution outline the following steps:

Taking these one at a time:

Skip this step. The mysql group already exists so there is no need to add it.

Skip this step. The mysql user already exists so there is no need to add it.

Complete this steps as provided.

Complete these steps as provided.

We’ll skip this step for now since we need to setup an init script for the server.

That’s it for the basic install. Now we need to:

1. Setup an init script and set the mysql server to start on boot.
2. Setup the my.cnf file.
3. Start the mysql server and set initial passwords.
4. Replace default mysql binary with a symlink to the new install.

Now one step at a time:

1. Setup an init script and set the mysql server to start on boot.

The mysql distribution includes a usable init script so we’ll copy it into place:

And then set the service to start on boot:

Now verify that the service will start at runlevels 2 to 5:

Of course it’s never that easy. You’ll also need to edit the /etc/init.d/mysql script, find the line near the top like:

And change it to read:

2. Setup the my.cnf file.

The default RHEL install of mysql which we are not using provided an default my.cnf file. It is workable but we want to be consistent with our production server so we’ll copy it’s my.cnf file to /etc/my.cnf.

If you don’t want to copy the file from another server you can use one of the files provided as part of the mysql distribution in the support-files/ folder.

The my.cnf file that we are using moves the mysql data directroy to /var/lib/mysql.

3. Start the mysql server and set initial passwords.

Now we can start the mysql server with:

And we can set the initial passwords with:

4. Replace default mysql binary with a symlink to the new install.

We want to make sure that we use the new mysql binary instead of the old one. So we’ll remove the old binary and symlink the new one in it’s place.

And that’s it!

0

Increase Max Process Memory Allocation

Use this command to increase the max memory that a single process can use:

Add to /etc/sysctl.conf to reload on each boot.

0

Determine Apache Compile Settings

How can one determine what settings were used to compile an install of the Apache webserver?

At a command line type the following:

You’ll get back results similar to this:

If you have the source code that was used to do the build available then you can look in the file “config.log”. At the top of the file you’ll see something like this:

The text in bold is the configure line that was used.

0

Determine Apache Built In Modules

How can one determine what modules have been compiled into an Apache install?

From the command line type:

You’ll get results similar to this:

0

Determine Apache Version

How can one determine the version of Apache webserver installed on a system?

From the command line type:

You’ll get results similar to this:

So in this case the version is 2.0.54.

You can get similar information by requesting a non-existent page from the server with your web browser. The server version will be displayed at the end of the error message.

0