The basic server install for the sirsi+sopac+drupal=goodness Part 2

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 = “sirsi”;

ils_version = “3125”

ils_server = “”

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


Path to the InSuRge Client Library


SOPAC URL prefix


Max # of result per page


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.



Comments 9

  • Hello,

    Thank you so much for the tutorial! I’m at the end, and I have a question. You say to do this:

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

    Where do you get sirsiopac from?

  • Hi Jody,
    The connectors at stored on a subversion server. You will need a client and this is a link to the client I use.

    Then once you have that installed open a IE browser and type this url


    The sirsisopac directory will now appear in your window explorer and you can checkout the latest version

  • Hi, Sean. I was great talking with you the other day. Just a couple of questions so far.

    You say, “Remember that you are going to need another httpd server running on port 8080…” but I don’t see any other mention of it in this post or any other. Have a missed a conversation somewhere?

    On a related note, am I right in thinking that the only thing that needs to reside on the sirsi server are the perl webservices (on 8080)? Everything else can live happily on our separate Drupal machine?

    Thanks again. Can’t wait to get started.

  • Hi Scott,
    You are correct I did not mention this in the posts but I probably should have. You are going to need to have another Apache server running on port 8080 and all the perl scripts (webservices) are going to be in that servers cgi-bin directory. Everything else will live and run on the drupal server. It was great to talk to you and I am excited to see this running on another machine.


  • Is that repository still active? I end up getting this error:

    svn: No repository found in ‘svn://’

  • nevermind… typo on my part. …/sirsi ‘s’ opac

  • Hello –

    It seems that using the harvest.php script and the
    to populate the SOPAC datatables is quite time consumig.

    Has anyone come up with a way to extract the entire database from
    Unicorn and load it straight into SOPAC?

    Extracting and reformatting the database is easy, getting it into SOPAC
    maybe another story.


  • Hi! I was surfing and found your blog post… nice! I love your blog. 🙂 Cheers! Sandra. R.

  • […] ILS system catalogs.  It supports Drupal sites and can link with many ILS systems, such as Sirsi (, Evergreen, Koha, and Innovative Interfaces […]

Leave a Reply

Your email address will not be published.