Skip to content

Instantly share code, notes, and snippets.

@ngs
Created October 17, 2011 19:22
Show Gist options
  • Save ngs/1293508 to your computer and use it in GitHub Desktop.
Save ngs/1293508 to your computer and use it in GitHub Desktop.
installing mroonga on Mac OS X Lion

Install MySQL + MeCab + Groonga using Homebrew

$ brew install mysql
$ brew install mecab
$ brew install groonga
$ cd /usr/local
$ sudo ln -s Cellar/mysql/5.5.15 mysql

Clone mroonga from Github

$ md ~/src
$ cd ~/src
$ git clone https://github.com/mroonga/mroonga.git

Build

$ cd ~/src
$ cp ~/Library/Caches/Homebrew/mysql-5.5.15.tar.gz .
$ tar xvfz mysql-5.5.15.tar.gz
$ cd mysql-5.5.15/include
$ ln -s probes_mysql_nodtrace.h probes_mysql_dtrace.h
$ cd ~/src/mroonga
$ PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./autogen.sh
$ aclocal -I /usr/local/share/aclocal
$ automake -a
$ autoconf
$ autoheader
$ automake -a
$ ./configure --prefix=$HOME/local \
    --with-mysql-source=$HOME/src/mysql-5.5.15 \
    --with-mysql-config=/usr/local/bin/mysql_config \
    --with-mecab=/usr/local/Cellar/mecab/0.98
$ make && make install
$ mysql -uroot -e "INSTALL PLUGIN groonga SONAME 'ha_groonga.so';"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment