OS X

How to install Sphinx on OS X

by Irish on August 10, 2010

Getting a local development environment setup to run Sphinx on your Mac is pretty easy. You can boil it down to the following quick commands.

$ wget http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
$ tar xvzf sphinx-0.9.9.tar.gz
$ cd sphinx-0.9.9
$ ./configure
$ make
$ sudo make install

This assumes you’re using a default MySQL installation. If however you’re like me and using MySQL installed from macports, you’ll need to pass the location of the MySQL configuration directories to Sphinx. The configure command would then change like so:

$ ./configure
$ ./configure --with-mysql-includes=/opt/local/include/mysql5/mysql/ --with-mysql-libs=/opt/local/lib/mysql5/mysql/

On a side note, Sphinx 1.10-beta has also just recently been released (July 10′). This release has real-time indexes support, a welcome addition I have been waiting for. Definately check it out.

{ 2 comments }

OS X “Safe Sleep” Mode

by Irish on June 22, 2010

I seem to continually have the problem of my laptop waking up on its own in my backpack. I’m not sure what exactly is the cause, but I’m gonna assume it’s from the screen not staying completely locked/closed. However, I found this OS X command on Andrew Dupont’s blog, which puts OS X into a “safe sleep” mode. This causes OS X to write memory state to a hibernation image at sleep time. Now for me to awaken my Macbook Pro, opening the lid is not enough. Now it takes a press of the power button, and a few more seconds than before, but no more accidental awakening, or half-dead battery upon arriving at my destination.

$ sudo pmset -a hibernatemode 1

Now just put your computer to sleep like you normally would. I for one prefer to use the quick keys (cmd + option + eject). Check the man page for more options.

$ man pmset

{ 0 comments }