MySQL 5 on FC4
Once of my production servers is running FC4. I am not on a hurry to upgrade it for fear of clobbering some of the settings. The box took a lot of work to set up, and I am not looking forward to the upgrade. But I did need MySQL 5 installed. FC4 comes with MySQL 4, which does not support stored procedures.
Removing the current version of MySQL and installing Version 5 was easy. To remove the existing version:
# yum remove '*mysql*'
As well as removing the mysql components this also removed php-mysql, which I need, as it has a MySQL dependency. I then downloaded the SRPM package from http://dev.mysql.com, and issued a rebuild command:
# rpmbuild --rebuild MySQL-5.0.24a-0.src.rpm
MySQL built without any problems, and I installed the packages from /usr/src/redhat/RPMS/i386.
I now had an updated version of MySQL but php-mysql could not be installed, and I need it. This was more than just a dependency issue, as the library it is linked to no longer exists. I downloaded the php SRPM from fedoralegacy.org, and installed the source with:
# rpm --install php-5.0.4-10.5.src.rpm
The SPEC file has to be edited to change the mysql dependency. Go to /usr/src/redhat/SPECS/, and edit the file php.spec.
%package mysql
Summary: A module for PHP applications that use MySQL databases.
Group: Development/Languages
Requires: php = %{version}-%{release}
Provides: php_database, php-mysqli
Obsoletes: mod_php3-mysql, stronghold-php-mysql
BuildRequires: mysql-devel >= 4.1.0
Replace:
BuildRequires: mysql-devel >= 4.1.0
With:
BuildRequires: MySQL-devel >= 4.1.0
Build the RPM files:
# rpmbuild -bb /usr/src/redhat/SPECS/php.spec
You can now install php-mysql rpm from /usr/src/redhat/RPMS/i386.
Posted in Uncategorized