Wiki‎ > ‎Installation‎ > ‎

Installing PhiloLogic on MacOSX Tiger

Who can use this guide?

If you wish to install Philologic3 on OS X Tiger, this guide is for you. Should work for Intel and PPC.

If you want to install on OS X 10.5 Leopard, it should work with this exception:

NOTE -- for a walk through of a complete PhiloLogic installation on 10.5 Leopard, dependencies and all, see this page: Installing PhiloLogic for Leopard

Installing Prerequisites

Developer Tools

You will need to install Apple's Developer Tools before you begin this guide. This should be on your Tiger install media.

MySQL (optional)

MySQL is optional. Philologic can run without it, but terms browsing and some bibliograpic metadata limiters will not work.

There is a nice GUI installer available from:

Install, set a root password if you like, and create a database for philologic, something like this:

GRANT ALL ON philologic.* to 'philologic'@localhost IDENTIFIED BY 'somepassword';

That creates a user philologic with password somepassword;

Perl Modules

We have had much trouble getting DBI/DBD working correctly on OS X 10.4. Here is the best guess at what to do. First make sure you have installed MySQL from the binary installer provided by MySQL.


Not sure if this is necessary, but it couldn't hurt (and it helped us with our mysterious problems last time):

sudo fink install openssl openssl-dev openssl-shlibs


Same thing here...

sudo fink install libgcrypt libgcrypt-shlibs


We have had major problems getting DBI and DBD configured and running on OS X 10.4. It seems every time MySQL or Perl or these modules change at all, the new versions require some new kludge to get up and running.

You can try using the bundle, or installing them separately.

Update: The last time I went to install these, on 10.4.11, I was able to use CPAN to install DBD::mysql (it installed DBI automatically I suppose) with only one hack:

ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql


sudo perl -MCPAN -e shell
force install Bundle::DBD::mysql

'force' because it does some testing of DB connectivity and I didn't feel like setting up the test user.


You should my able to install the bundle via:

sudo perl -MCPAN -e shell

and then

install Bundle::DBD::mysql

Install them separately


Install DBI via MCPAN.

sudo perl -e -MCPAN "install DBI"

If that one-liner doesn't do anything (exits really fast and prints nothing), try this:

sudo perl -MCPAN -e shell

and then:

install DBI

Respond with the default (enter) for all choices.


Download DBD:

Install via:

sudo make install

If you get a messge about mysql_config not being in your path, make sure that you have MySQL installed and that it is indeed in your path. If you used the OS X package installer above, you will have MySQL in /usr/local/mysql/bin. You can make sure this is always in your path by creating a file named .bash_profile in your home directory that contains

export PATH=/usr/local/mysql/bin:$PATH

symlink for mysql socket

After installing, we find that DBD is not looking for the mysql socket in the right spot. So make a symlink:

sudo mkdir -p /var/lib/mysql/
sudo ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

symlink for library

You may also find that you need to run this symlink creation command:

ln -s /usr/local/mysql/lib /usr/local/mysql/lib/mysql

That seems to be necessary for non-Intel installs at the moment... or maybe Intel too? Don't know.

Take from:


Download Unicode::String:

Install via:

sudo make install

gdbm, gdbm-shlibs, gawk and agrep

Easiest, in my view, is to use Fink or Darwin Ports to install these programs.


Download and install Fink (and optionally Fink Commander) from here:

If you want to install Fink from the command line, check out:

If you want Fink to be in your path, you can make a .bash_profile file that contains the line:

export PATH=/sw/bin:$PATH

Then, install gdbm, gdbm-shlibs, gawk and agrep either from the command line:

sudo fink install gdbm
sudo fink install gdbm-shlibs
sudo fink install agrep
sudo fink install gawk

Or, use the GUI app Fink Commander.

Darwin Ports -- Fink alternative

Darwin Ports provides a very easy interface for installing a variety of Unixy utilities that we will need. You can use it instead of Fink if you like (I haven't verified that everything we need is available there, but it probably is.

Without Fink or Darwin Ports

I'm not sure how to do everything without Fink yet. My advice is to use Fink.


To build gawk from source, if you aren't using Fink:

Download gawk:

Install via:

sudo make install

Gawk installs into /usr/local/bin.

Making sure they are in your path

No matter how you install them, agrep and gawk need to be in your path. Try this:

which agrep
which gawk

Any luck? If not, edit your .bash_profile and log in again. If you used Fink, they should conveniently be in /sw/bin. If otherwise, check places like /opt/local/bin and /usr/local/bin.

Installing Philologic

Web Paths

Think of a good place to have the web root and cgi-bin. Create these directories:

mkdir /Library/WebServer/Documents/philologic
mkdir /Library/WebServer/CGI-Executables/philologic


Now issue the command:

export CFLAGS="-I/sw/include -L/sw/lib"

That tells the installer where to find some libraries like gdbm.h.

Binary paths

Now, we need to make sure that all your new binaries are available in your path. Depending on how you installed agrep and gawk, you may need to add their paths to your path, e.g.:

export PATH=$PATH:/sw/bin:/opt/local/bin:/usr/local/bin

or whatever you need.

Download Philologic

Download the Philologic installer:

You might be able to use the command:

curl -O

Unzip, untar and cd into the installer directory.

gunzip philologic-v3.1.osx.t2.tar.gz
tar -xvf philologic-v3.1.osx.t2.tar
cd philologic-v3.1.osx


Now try to configure. You can change these options if you know what you need:

./configure --with-cgi-path=/Library/WebServer/CGI-Executables/philologic --with-cgi-url=/cgi-bin/philologic --with-web-path=/Library/WebServer/Documents/philologic --with-web-url=/philologic --with-authuser-group=admin --with-init-d=$HOME --with-boot-init-d=$HOME

If you got errors, check your pre-reqs and path and try again.


Now, try to install:

sudo make install

If all goes well, it should end with:

/philoinstall/init/nserver stop
/philoinstall/init/nserver: line 8: kill: (18333) - No such process
/philoinstall/init/nserver start


Philologic comes with a startup item for OS X that will start nserver, a daemon that is necessary for Philologic to operate. If you installed into the default /var/lib/philologic, you can set up this startup item as follows:

sudo mv /var/lib/philologic/goodies/OSX/NSERVER_OSX/NServer /Library/StartupItems/
sudo chmod +x /Library/StartupItems/NServer/NServer

OS-X 10.5 (Leopard) sort patches

If you are installing on Leopard, you will need to patch the system because of different sort parameters which are part of the new OS. Instructions in our Patch List:

Please let us know if you find other problems.

Loading your first database

Find yourself a TEI file, and load it thussly:

philoload dbname myteifile.tei