ubuntu下安装koha开源图书管理系统

ubuntu 14.04 安装 koha开源图书管理系统

废话不多话,直接上步骤

一、系统环境

ubuntu 14.04 LTS

web:Apache2

sql:Mysql5.5

二、添加koha软件源

  • apt-get update
  • echo deb http://debian.koha-community.org/koha oldstable main | sudo tee /etc/apt/sources.list.d/koha.list
  • wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -
  • apt-get update

三、安装koha

  • apt-get install koha-common

如果提示以下报错:

Errors were encountered while processing:
libapache2-mpm-itk
apache2-mpm-itk
koha-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

执行以下命令:

  • a2dismod mpm_event
  • a2enmod mpm_prefork
  • service apache2 restart
  • apt-get install -f

四 、配置koha

koha的配置文件位置:/etc/koha/koha-sites.conf

  • vim /etc/koha/koha-sites.conf

DOMAIN=”.myDNSname.org”    (如果有域名的话,可以配置下域名)
INTRAPORT=”8080″   (此处我修改成8080,默认是80)
INTRAPREFIX=””
INTRASUFFIX=”-intra”
OPACPORT=”80″
OPACPREFIX=””
OPACSUFFIX=””

五、配置mysql

  • mysql_secure_installation  (此命令可以修改mysql的root密码,已近相关登陆参数)

六、创建koha实例

  • a2enmod rewrite
  • a2enmod cgi
  • service apache2 restart
  • koha-create –create-db library   (library为图书馆的名字,自定义,下面的配置会用到)
  • vim /etc/apache2/ports.conf   (配置Apache2的默认端口)

Listen 8080

  • service apache2 restart
  • a2dissite 000-default
  • a2enmod deflate
  • a2ensite library
  • service apache2 restart

七、登陆koah web界面

浏览器打开http://172.17.10.100

QQ截图20160122171214

 

登陆账户和密码在配置文件中可以找到:/etc/koha/sites/library/koha-conf.xml
<config>
<db_scheme>mysql</db_scheme>
<database>koha_xd-library</database>
<hostname>localhost</hostname>
<port>3306</port>
<user>koha_xd-library</user>                 (用户名)
<pass>dfadjsklfadf</pass>                   (密码)
<biblioserver>biblios</biblioserver>
<biblioservershadow>1</biblioservershadow>
<authorityserver>authorities</authorityserver>
<authorityservershadow>1</authorityservershadow>
<pluginsdir>/var/lib/koha/xd-library/plugins</pluginsdir>
<enable_plugins>0</enable_plugins>