Compiling MySQL 5.1 for OWm2
Hopefully as MySQL 5.1 moves to a final stable release things will get much simpler... in the meantime, that's what you are supposed to do. The versions used are explicitly stated, if you have any weird surprise by later version pls signal it here.Pls note that this instructions are for Debian only, maybe they work under other systems, but I haven't checked them and I do not plan to check them in the future.
NB! Make 300% sure you have no older MySQL installs in your box, if you do you are going to waste a LOT of time.
Download the latest version from here: http://dev.mysql.com/downloads/mysql/5.1.html#source (using mysql-5.1.26-rc in this example)
- wget http://dev.mysql.com/get/Downloads/MySQL-5.1/mysql-5.1.26-rc.tar.gz/from/http://mysql.infocom.ua/
- tar xvf mysql-5.1.26-rc.tar.gz
Get the innoDB plugin from: http://www.innodb.com/innodb_plugin/download/101/ (using 1.0.1 for the example)
- wget http://www.innodb.com/download/innodb_plugin/innodb_plugin-1.0.1.tar.gz
- tar xvf innodb_plugin-1.0.1.tar.gz
Delete the standard Innobase storage engine and replace it with the plugin
- rm -R ./mysql-5.1.26-rc/storage/innobase
- mkdir ./mysql-5.1.26-rc/storage/innobase
- cp -R ./innodb_plugin-1.0.1 ./mysql-5.1.26-rc/storage/innobase
Get Sphinx and place the SphinxSE storage engine in MySQL sources
- wget http://www.sphinxsearch.com/downloads/sphinx-0.9.8.tar.gz
- tar xvf sphinx-0.9.8.tar.gz
- cp -R ./sphinx-0.9.8/mysqlse ./mysql-5.1.26-rc/storage/sphinx
- cd mysql-5.1.26-rc
- sh BUILD/autorun.sh
Note! if you cannot extecute aclocal at this point it probably means your automake is outdated.
Now let's compile it
- ./configure --with-plugins=innobase,sphinx
- make
- make install
If everything went smoot, on starting MySQL you should be able to execute show engines and see both Innodb and Sphinx in it.
Next we need to mount plugin UDF libraries (sources are at http://www.mysqludf.org ). They are used to implement an Oracle-like RAISE_EXCEPTION behaviour and to have the standard XML functions we are using in OWm2
- wget http://www.mysqludf.org/lib_mysqludf_xql/lib_mysqludf_xql-0.9.7.tar.gz
- wget http://www.mysqludf.org/lib_mysqludf_udf/lib_mysqludf_udf_0.0.3.tar.gz
- tar xvf lib_mysqludf_xql-0.9.7.tar.gz
- mkdir lib_mysqludf_udf_0.0.3
- mv lib_mysqludf_udf_0.0.3.tar.gz lib_mysqludf_udf_0.0.3
- cd lib_mysqludf_udf_0.0.3
- tar xvf lib_mysqludf_udf_0.0.3.tar.gz
- gcc -shared lib_mysqludf_udf.c -o lib_mysqludf_udf.so -I /usr/include/mysql
You should have a lib_mysqludf_udf.so file in your dir now
- cd ../lib_mysqludf_xql-0.9.7
- apt-get install libxml2-dev
- ./configure
- make
- make install
- libtool --finish /usr/local/lib/lib_mysqludf_xql
- mysql -u root -p < installdb.sql
- cd ../lib_mysqludf_udf_0.0.3
- cp lib_mysqludf_udf.so /usr/local/lib/mysql/plugin
- mysql -u root -p < lib_mysqludf_udf.sql
This should be enough, for now. Next we have to start Mysql



Post new comment