DocumentRoot

Updating, recompiling, VirtualHost templates, customizations, php safemode …I want apache 2.0, php 5 and mysql 5

Updating, recompiling, VirtualHost templates, customizations, php safemode …I want apache 2.0, php 5 and mysql 5 – DirectAdmin essentially will work with any version of the software you want (within reason).  

You can even use these newer versions of the software should with to have them.

*** Now For Apache 2.2 and php 5.x, we have a new custombuild script available:
http://files.directadmin.com/services/custombuild/1.1.

Though It will install both apache 2.2 and php 5 automatically for you.

It also contain code for installing mysql 5.  The custombuild script is considering the more recent way to install apache 2, php 5 and mysql 5.

The rest of the guide will still work, but it’s more time consuming.


To convert apache 1.3 to apache 2.0, use this guide:
directadmin.com/features.php?id=441


For php 5, use this guide (after you are running the apache version you want to have):
help.directadmin.com/item.php?id=135


Regard to  MySQL 5.0, you must at first decide if you are eligible for the version change.  If you are running MySQL 4.1.x or higher, then there won’t be any issues.

If you are running MySQL 4.0.x or lower, then you have to take note of the following:

There are  passwords and table format changes between 4.0 and 4.1.   Updating tables to the 4.1 format is not too difficult after the update is done:

mysql_fix_privilege_tables –user=da_admin –password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd |cut -d= -f2`

**However**, the password format cannot be convert to the new password format in 4.1.   You have two choices:
1) After updating, go through all MySQL accounts and resave their passwords.  You will need to know their plaintext password to do this.

This will be ideal so that you will be using the latest formats and do not need to worry about compatibility issues with future releases.

2) Retain the old password formats and tell the new version of mysql to use those old formats by adding:

[mysqld]
old_passwords

into your /etc/my.cnf file, then restart mysqld.  You will need to create this file.

This second option is good to save time, but if you ever need to transfer the accounts to a new server that is  already running MySQL 4.1 or igher, you will need to resave all mysqld password for that transferred account.

Consequently MySQL server should have all passwords in the same format.. either the new one, or the old one.  If there are already account in the new format, you need to resave the passwords to it.

Once you’ve decided if the update is for you, use these guides to do it:

FreeBSD/Debian:
You will need to get the binaries for your particular OS version.  If you are not able to file them on files.directadmin.com/services, then go to dev.mysql.com and download the binaries for your system.

We do not have any special compile options, and we use all stock binaries from dev.mysql.com whenever possible.

 

  **Please Note** that the guide for there contains freebsd binaries.  Debian binaries would have to be downloaded if you use Debian.  The same instructions apply.

Redhat/Fedora/CentOS (anything with rpms):
Conversion with rpms is quite easy as  (note the above notices about moving from 4.0 to 4.1 or higher still apply).
Download the 4 MySQL rpms that you want use it, either from files.directadmin.com or from dev.mysql.com.  You will need the server, client, shared and devel rpms.

You must not have any mismatch version. We recommend generic i386 rpms.  If you have 64-bit system, then you will need binaries specific to your system (dev.mysql.com has everything you’ll need)
Use wget to download all 4 rpms, then use “rpm -Uvh file.rpm” to update/install them, for example:

mkdir mysql
cd mysql
wget http://files.directadmin.com/services/all/mysql/MySQL-client-5.0.37-0.i386.rpm
wget http://files.directadmin.com/services/all/mysql/MySQL-devel-5.0.37-0.i386.rpm
wget http://files.directadmin.com/services/all/mysql/MySQL-server-5.0.37-0.i386.rpm
wget http://files.directadmin.com/services/all/mysql/MySQL-shared-5.0.37-0.i386.rpm
rpm -Uvh MySQL-*-5.0.37-0.i386.rpm
/sbin/service mysqld restart

 

Again, keep it in mind that any changes you may need to do to your database is to make this version work.

yet If you have a clean DirectAdmin install without any databases on it and you wish to install the new version, it would be likely easier to use this guide to move cleanly to the version you want:

It will install all data and passwords after deleting the previous data (hence, youll need a new install first because any databases are going to be lost).

For the guide, you would replace the 4.0 rpms use in the example and simply downoad the 5.0.x version mentioned above.

It’s also recommended you do a full php recompile to load in MySQL’s current version of the client libraries.  Even if you are going to be updating php anyway, do MySQL first.

Leave a Reply

Your email address will not be published. Required fields are marked *