Installing Koha

{I live-blogged this and have not yet checked for typos for all the commands below — will check later today; apologies in advance, until then}

Aaron Williams, Mercyhurst University, {}

Link to slides coming soon

Works as a web developer at Mercyhurst

  • responsible for main website at the university
  • Full stack developer
  • Linux experience; installing and maintaining various software stacks (Apache MySQL PERL PHP)
  • Polygot (know multiple languages)

Installing Koha — overview

  • Minimum hardware requirements
    • it works on a raspberry pi (runs slow):
      • 700mhz ARM processor
      • 512 MB of memory
      • 3.5 watts of power
      • SD card storage
    • Better hardware recommended for speed

Koha minimum software requirements

  • Linux — usually Debian or Ubuntu but other Linux distros are supported
  • Apache web server
  • MySQL
  • PERL Programming language: lots of Perl dependencies

Installation methods

  • From source/git
  • apt-get and pre-built packages [make everything easy]

Installing Koha [can use VirtualBox on your own computer to set up a virtual host]

Ubuntu/Debian package commands:

  • Add community repository
    • echo deb stable main | sudo tee /etc/apt/sources.list.d/koha.list
  • Add trusted repository key
    • wget -O- | sudo apt-key add -
  • Update Ubuntu or Debian using apt-get
    • sudo apt-get update
    • sudo apt-get upgrade
  • Clear the apt-get packager manager cache
    • sudo apt-get clean
  • Install Koha and dependencies
    • sudo apt-get install koha-common
    • [takes 5 mins on a reasonably fast internet connection]
  • Problem with Apache itk (errors on install; usually happens)
    • sudo a2dismod mpm_event
    • sudo a2enmond mpm_prefork
    • sudo service apache2 restart
    • sudo apt-get install -f
  • Edit initial config file
    • sudo nano /etc/koha/koha-sites.conf
    • Edit intraport, opacport, domain, and memcache [for database, makes Koha faster] settings depending on install
  • Install mysql-server dependence
    • sudo apt-get install mysql-server
  • Ensure rewrite and cgi are enabled
    • sudo a2enmod rewrite && sudo a2enmod cgi && sudo service apache2 restart
  • Setup the database for Koha
    • sudo koha-create --create-db library
  • Secure mysql installation (follow onscreen wizard)
    • sudo mysql_secure_installation
  • Add new 8080 port (for IP based install) to Apache
    • sudo nano /etc/apache2/ports.conf
    • need to add listen on 8080 (missed the details)
  • Enable vhost on Apache
    • sudo a2enmod deflate && sudo a2ensite library && sudo service apache2 restart
  • Test to ensure everything is working
    • In web browser, visit localhost or {Koha maintenance message}
    • In web browser, visit localhost:8080 or
  • Visiting localhost:8080 or
    • should prompt for username or password
    • username –> koha_library
    • password –>
      • sudo xmlstarlet sel -t -v 'yazgfs/config/pass' /etc/koha/sites/library/koha-conf.xml
    • Follow onscreen instructions/wizard

Resources: Ubuntu: Debian: