Skip to content

Instantly share code, notes, and snippets.

@geraldke
Last active February 18, 2018 06:50
Show Gist options
  • Save geraldke/d40609b408b6b1f66ae3ab21507fedd2 to your computer and use it in GitHub Desktop.
Save geraldke/d40609b408b6b1f66ae3ab21507fedd2 to your computer and use it in GitHub Desktop.
How to install Mysql 5.6 and Sphinx 2.0.9 on Ubuntu 16.04
Before starting, make sure to uninstall any existing versions of MySQL and Sphinx.
A. Install MySQL 5.6 and Sphinx 2.0.9 from source on Ubuntu 16.04
* If you have a Mac, please proceed to section B
1. Install MySQL from source
a. download mysql source (http://dev.mysql.com/downloads/mysql/)
- choose 5.6, source code. Do not choose the packages which targets certain architectures (i386 / 64 bit), these are already pre-built. You want to compile from source, the filename should be something like mysql-5.6.34.tar.gz.
b. Follow the instructions on https://dev.mysql.com/doc/refman/5.6/en/installing-source-distribution.html
- you only need to follow the part under `the basic installation command sequence looks like this:`, the rest just explains the process.
Notes:
- instead of doing `make install`, you might also want to use `checkinstall` instead (sudo apt-get install checkinstall). This would allow you to build a deb package and still use dpkg to add / remove later which is very helpful.
c. Symlink mysql client
- the mysql client is also included under bin directory. You can add this to your path or just symlink it. e.g sudo ln -s /usr/local/mysql/bin/mysql /usr/local/bin/mysql
2. Install Sphinx 2.0.9 from source
a. Download sphinx tarball (http://sphinxsearch.com/downloads/archive/). please choose Source tarball (tar.gz) 2.0.9-release.
b. follow instructions on http://sphinxsearch.com/docs/current/compiling-source-linux.html
Make sure to specify mysql libs, something like ./configure --with-mysql-libs=/usr/local/lib/mysql
note: if you get an error about missing libmysqlclient.so files (shared objs are equiv to dlls), you can just create a symlink to what you have.
something like:
cd /usr/local/mysql/lib
ln -s libmysqlclient.so.18 libmysqlclient.so.16
ldconfig
That's it. Good luck! :D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment