So what are we doing today? Well we are off to John’s SOPAC site to download his sample data set and try and import it into Sphinx.

I just downloaded it to my directory /home/sean/mydownloads

 

Why are we doing this? Well we know that John’s data works and it removes some unknowns and our data is untested.

The next step is to extract the data

gzip -d locum_bib_items-sample.sql.gz

John has created a file that allows us to do a simple file import.

Check to see that all the table creation scripts have run. We didn’t do this the first time!

mysql -u root -p < /usr/local/lib/insurge/sql/scas_insurge.sql

mysql -u root -p < /usr/local/lib/locum/sql/scas_locum.sql

>mysql scas –u username –p

>Enter password

mysql> SOURCE /home/sean/mydownloads/locum_bib_items-sample.sql

or you can do it this way

mysql>scas –u root –p < /home/srobinson/mydownloads/locum_bib_items-sample.sql

Ok, it’s coffee time!

Next step is to use phpMyAdmin and browse the table locum_bib_items to see if everything has load correctly. Looks good. We have 139,343, records and so should you.

Next do everything on the “Install and Configuring Sphinx” page that is on John’s site

We had already installed Insurge and done the first steps of the locum install


mysql -u root -p < /usr/local/lib/locum/sql/scas_locum.sql

We just needed to finish the locum install.

We edited /etc/mysql/my.cnf and added the lines

max_heap_table_size = 200M

init_file = /usr/local/lib/locum/sql/locum_init.sql

at the bottom of the file.

As we are going through the directions there are a couple of things that were missing

On the log_file we needed to create the directories var/log and then create the file locum.log

>cd /usr/local

>sudo mkdir var

>cd var

>sudo mkdir log

>cd log

>sudo touch locum.log

Next piece is the [ils_config] section and this is going to be different because of the sirsi platform. Remember that you are going to need another httpd server running on port 8080 and it needs to be running as the sirsi user rather that nobody.

[ils_config]

ils = “sirsi”;

ils_version = “3125″

ils_server = “training.acpl.lib.in.us”

ils_harvest_port = “8080″

Next it is off to install SOPAC and again we thank John for his instructions!!!!!!!!

I know that John has strongly recommended that we do the SSL but we are skipping it and will probably at some future date regret this decision but what the H*LL.

Since John has a ton of experience with installing a module and Tim and I have very little we are going to step through the process we took to make this happen. I hope this is helpful.

So I have downloaded social-2.0.0-beta1.tar.gz to my home direcrtory /home/sean/mydownloads.

The next step

>sudo tar -zxvf sopac-2.0.0-beta1.tar.gz

We created a directory called sopac and extracted everything there.

The next step

>cd /var/www/html/modules

>sudo mkdir sopac

>cd sopac

>sudo cp –r /home/sean/mydownloads/sopac/* ./

Now it time to get all drupally, go ahead and connect to your drupal server and login in as the administrator and click Administer->Site building->Modules and you should now see SOPAC near the bottom.

So you need to enable the Profile module and the SOPAC module

Administrater->User management->Permissions

Next we are looking at permissions. In our configuration we only had two options Anonymous user and authenticated user. Looking at John’s instructions we are just going to enable authenticated user for access user pages and administer sopac.

Now go to Administrater->Site configuration->SOPAC settings

We are just filling in the blanks but we have needed to make a couple of changes

Path to the Locum Client Library

/usr/local/lib/locum

Path to the InSuRge Client Library

/usr/local/lib/insurge

SOPAC URL prefix

Catalog

Max # of result per page

10

Ok, so what next?

We went back the our drupal homepage and clicked on my library and got the following error.

Fatal error: insurge::require() [function.require]: Failed opening required ‘/usr/local/dsn/scas_dsn.php’ (include_path=’.:/usr/share/php:/usr/share/pear’) in /usr/local/lib/insurge/insurge.php on line 32

So we needed to edit /usr/local/lib/insurge/config/insurge.ini and change where the dns_file was pointing.

dsn_file = “/usr/loca/etc/scas_dsn.php”

This hasn’t completely solved the problem but has pointed to another issue. The CONNECTORS!!!!!

In order for this to work we are going to need the connectors. Duh! They need to be installed in /usr/local/lib/locum/connectors directory

Let’s do that then revisit the above error.

>cd /usr/local/lib/locum/connectors

>sudo mkdir locum_sirsi_3125

>cd locum_sirsi_3125

> sudo cp /home/sean/sirsisopac/trunk/connectors/* ./

Now with changes we can click on my library and everything works.

Cool!