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: http://philologic.uchicago.edu/wiki/index.php/Patches#Patch:_Field-delimited_sort_Semantics_Broken_in_OSX_10.5 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 PrerequisitesDeveloper ToolsYou 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: http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg Install, set a root password if you like, and create a database for philologic, something like this: CREATE DATABASE philologic; That creates a user philologic with password somepassword;
Perl ModulesWe 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. OpenSSLNot 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 OpenSSLSame thing here... sudo fink install libgcrypt libgcrypt-shlibs DBI/DBDWe 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 Then: sudo perl -MCPAN -e shell 'force' because it does some testing of DB connectivity and I didn't feel like setting up the test user. BundleYou should my able to install the bundle via: sudo perl -MCPAN -e shell and then install Bundle::DBD::mysql Install them separatelyDBIInstall 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. DBDDownload DBD: http://search.cpan.org/~capttofu/DBD-mysql/lib/Bundle/DBD/mysql.pm Install via: perl Makefile.pl 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 socketAfter 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/ symlink for libraryYou 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: http://www.thescripts.com/forum/thread676055.html Unicode::StringDownload Unicode::String: http://search.cpan.org/~gaas/Unicode-String-2.09/String.pm Install via: perl Makefile.pl gdbm, gdbm-shlibs, gawk and agrepEasiest, in my view, is to use Fink or Darwin Ports to install these programs. FINKDownload and install Fink (and optionally Fink Commander) from here: http://www.finkproject.org/download/ If you want to install Fink from the command line, check out: http://textsnippets.com/posts/show/322 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
sudo fink install gdbm Or, use the GUI app Fink Commander. Darwin Ports -- Fink alternativeDarwin 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. http://darwinports.opendarwin.org/ Without Fink or Darwin PortsI'm not sure how to do everything without Fink yet. My advice is to use Fink. gawkTo build gawk from source, if you aren't using Fink: Download gawk: ftp://ftp.gnu.org/gnu/gawk/gawk-3.1.5.tar.gz Install via: ./configure Gawk installs into /usr/local/bin. Making sure they are in your pathNo matter how you install them, agrep and gawk need to be in your path. Try this: which agrep 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 PhilologicWeb PathsThink of a good place to have the web root and cgi-bin. Create these directories: mkdir /Library/WebServer/Documents/philologic CFLAGSNow issue the command: export CFLAGS="-I/sw/include -L/sw/lib" That tells the installer where to find some libraries like gdbm.h. Binary pathsNow, 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 PhilologicDownload the Philologic installer: http://philologic.uchicago.edu/download.php You might be able to use the command: curl -O http://philologic.uchicago.edu/philologic3/distribution/philologic-v3.1.osx.t2.tar.gz Unzip, untar and cd into the installer directory. gunzip philologic-v3.1.osx.t2.tar.gz ConfigureNow 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. InstallNow, try to install: sudo make install If all goes well, it should end with: /philoinstall/init/nserver stop StartupItemsPhilologic 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/ OS-X 10.5 (Leopard) sort patchesIf 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 databaseFind yourself a TEI file, and load it thussly: philoload dbname myteifile.tei |