FANDOM


以APT套件方式安裝Koha,是最簡潔的方法之一。Koha支援squeeze (6.x) and wheezy (7.x) jessie(8.x),不支援舊的版本。建議使用 'koha-common' 套件,不要用 'koha' 套件。目前支援三個版本:

  • 當前穩定版 (3.18)
  • 舊的穩定版 (3.16)
  • 發展版本 (development release)

安裝 Debian jessie 還有若干步驟,才能把 Koha 安裝完畢

  1. 新增 Koha 的資料來源
  2. 加入 ATP 信任鑰
  3. 安裝 Koha

資料來源Edit

在/etc/apt/sources.list檔案裡,新增內容 deb http://debian.koha-community.org/koha squeeze main

$ su
# nano /etc/apt/sources.list

加入信任鑰Edit

再把 gpg.asc 鑰加入 ATP信任鑰內

# wget -O- http://debian.koha-community.org/koha/gpg.asc | sudo apt-key add -

安裝 Koha Edit

再執行

# apt-get update
# apt-get upgrade

直至無錯誤訊息。 接著正式安裝 Koha

# apt-get update
# apt-get install koha-common

讀取 Koha 的文件

# less /usr/share/doc/koha-common/README.Debian

README.Debian 檔案列出組態 Koha 的指令。
為什麼沒有 Koha 套件呢?因為還沒有做好。
koha-common 包括所有的程式碼與支援的腳本,沒有提供安裝時應給的 Koha instance,但允許使用 Koha 新增與相關的工具產生期望的 instance,以此指令產生的內容,自動被工作排程接管,Zebra將啟用等。

Koha 的情況差不多,但祗有一個網站。不過,還不能被套件的工具管理,必須手動設定工作排程與 Zebra。參見 bug 5071。不建議使用它。

初始組態Edit

先安裝Apache mod_rewrite 模組

$ sudo a2enmod rewrite

再安裝 MySQL

$ sudo apt-get install mysql-server

安裝後組態Edit

You will want to consider doing the following after installing this package:

  • Install mysql-server, for a local database.
  • Alternatively, set up a connection to a remote MySQL server:
    - rm /etc/mysql/koha-common.cnf
    - $EDITOR /etc/mysql/koha-common.cnf

[client]
host = some.other.host
user = mysqlusername
password = mysqlpassword
* Enable the rewrite module: a2enmod rewrite

  • Listen on port 8080: $EDITOR /etc/apache2/ports.conf
  • Alternatively, configure koha-create, using /etc/koha/koha-sites.conf
    (see /usr/sbin/koha-create for which variables to set).
    * After that, you can create a new Koha instance:
    - koha-create --create-db name

Koha 檔案系統布局在 DebianEdit

The Debian packaging of Koha puts files in the following places:

  • /etc/koha -- system configuration files
    * /etc/cron.hourly/koha-common -- cron job
    * /etc/cron.daily/koha-common -- cron job
    * /etc/cron.d/koha-common -- cron job
    * /usr/share/koha -- shared files (HTML templates, Perl code, etc)

Each Koha instance has files in the following places:

  • /etc/koha/sites/$name -- confguration files
    * /etc/apache2/sites-available/$name -- Apache config file
    * /var/lib/koha/$name -- Zebra databases
    * /var/log/koha/$name -- log files (Apache, Zebra)
    * /var/lock/koha/$name -- run-time lock files
    * /var/run/koha/$name -- run-time sockets etc
    * /var/spool/koha/$name -- database dumps

Koha 與 MySQLEdit

koha-common's postinst script sets up the /etc/mysql/koha-common.cnf,
and all scripts use that to access the MySQL database. By default, it
is a symlink pointing at debian.cnf, and only works on localhost.
If you wish, you can create a file /etc/mysql/koha-common.cnf instead
of the symlink, and point it at a remote server. There is currently
no tool to help you do that, but it should be fairly straightforward.

建立 Instance Edit

以輔仁大學圖書資訊學系為例,其名稱為 lins,

$ sudo koha-create --create-db lins


參考資源

2014/7/30 建立。

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.