Kolab2 Integration with MySQL
From Kolab Wiki
(php-)MySQL for Kolab How to install and compile MySQL for Kolab inclusive needed dependencies of php and apache_php - Warning: this article is experimental and should not be used in a productive system without testing!
Contents |
MySQL/php
Needed packages
OpenPKG provides the needed MySQL source rpm under [[1]]. Cave: ftp.openpkg.org tends to be very slow, and it needs a registration. No more packages beside the Kolab standard packages are needed. There are also some newer MySQL versions to be found under ftp://ftp.openpkg.org/current/SRC/EVAL/).
Download the MySQL source rpm with
wget ftp://your-registered@mail.address@ftp.openpkg.org/current/SRC/BASE/mysql-*version*.src.rpm
Replace the first "@" with "%40" if you are not able to download the file with wget.
Package installation
- Package compilation:
- (re-)compile MySQL:
/kolab/bin/openpkg rpm --rebuild mysql-5.1.34-20090422.src.rpm
- (re-)compile PHP:
/kolab/bin/openpkg rpm --rebuild php-5.2.8-20081209_kolab2.src.rpm --define "with_imap yes" --define "with_ssl yes" --define "with_zlib yes" --define "with_imap_annotate yes" --define "with_imap_myrights yes" --define "with_spl yes" --define "with_gettext yes" --define "with_dom yes" --define "with_mcrypt yes" --define "with_iconv yes" --define "with_mbstring yes" --define "with_mbregex yes" --define "with_gd yes" --define "with_ctype yes" --define "with_openldap yes" --define "with_mhash yes" --define "with_bdb yes" --define "with_pear yes" --define "with_xml yes" --define "with_mm yes" --define "with_sqlite yes" --define "with_mysql yes"
- (re-)compile apache-php:
/kolab/bin/openpkg rpm --rebuild apache-php-5.2.8-20081209_kolab2.src.rpm --define "with_imap yes" --define "with_ssl yes" --define "with_zlib yes" --define "with_imap_annotate yes" --define "with_imap_myrights yes" --define "with_gettext yes" --define "with_dom yes" --define "with_mcrypt yes" --define "with_iconv yes" --define "with_mbstring yes" --define "with_mbregex yes" --define "with_gd yes" --define "with_ctype yes" --define "with_openldap yes" --define "with_mhash yes" --define "with_bdb yes" --define "with_pear yes" --define "with_xml yes" --define "with_mm yes" --define "with_sqlite yes" --define "with_mysql yes"
- Install packages:
- mysql: /kolab/bin/openpkg rpm -ihv /kolab/RPM/PKG/mysql-5.1.34-20090422.ix86-suse10.3-kolab.rpm
- Do not forget: Immediately assign a root password for MySQL
- mysql: /kolab/bin/openpkg rpm -ihv /kolab/RPM/PKG/mysql-5.1.34-20090422.ix86-suse10.3-kolab.rpm
eg: /kolab/bin/mysqladmin -u root password 'new_password'
- php:
/kolab/bin/openpkg rpm -ihv /kolab/RPM/PKG/php-5.2.8-20081209_kolab2.ix86-suse10.3-kolab.rpm
- apache-php:
/kolab/bin/openpkg rpm -ihv /kolab/RPM/PKG/apache-php-5.2.8-20081209_kolab2.ix86-suse10.3-kolab.rpm
- supplement kolab-install.sh with "-D php::with_mysql -D apache-php::with_mysql" (ca. line 25, behind DEFINE)
- mysql has to be inserted into 00INDEX.rdf:
- look at 1st.README for this
- Make update:
sh install-kolab.sh 2>&1 | tee /root/kolab-update.log
Errors
The message
php-5.2.8-20081209_kolab2: php searches a frood called 'mysql'
means that mysql has to be inserted into 00INDEX.rdf - take a look into the 1st.README.
Suggested route
1. compile MySQL, install it 2. then (re-)compile php and apache-php 3. execute install-kolab.sh -X (generates 00INDEX.rdf) 4. sh install-kolab.sh 2>&1|tee /root/kolab-update.log (installs packages) 5. kolabconf -n
