1 編輯source
nano /etc/apt/sources.list
加入deb http://debian.koha-community.org/koha stable main
2 加入key
wget -O- http://debian.koha-community.org/koha/gpg.asc | apt-key add -
apt-get update
apt-get upgrade
3. 安裝koha相關套件
apt-get install koha-common
4. 編輯 /etc/koha/koha-sites.conf 設定koha網站設定
nano /etc/koha/koha-sites.conf(進入檔案)
DOMAIN=".myDNSname.org"
INTRAPORT="8080" 館員介面改成8080 port
INTRAPREFIX=""
INTRASUFFIX="-intra"
OPACPORT="80" OPac維持80port
OPACPREFIX=""
OPACSUFFIX=""
## Default data to be loaded
#
# DEFAULTSQL: filename
# Specify an SQL file with default data to load during instance creation
# default: (empty)
DEFAULTSQL=""
## Zebra global configuration variables
#
# ZEBRA_MARC_FORMAT: 'marc21' | 'normarc' | 'unimarc'
# Specifies the MARC records format for indexing
# default: 'marc21'
ZEBRA_MARC_FORMAT="marc21"
5. 安裝mysql 建立koha資料庫
apt-get install mysql-server
/etc/init.d/mysql start
mysql -u root -p
create database koha; 建立koha資料庫(mysql>會出現在前面)
grant all on *.* to 'koha'@'localhost' identified by '密碼'; 建立koha帳號
exit
6. apache相關模組
a2enmod rewrite
a2enmod cgi
service apache2 restart
7. 建立koha site
koha-create --create-db koha 網站名稱
8. 修改apache site
a2ensite koha.conf
a2dissite 000-default
nano /etc/apache2/ports.conf (進入檔案)
Listen 80
Listen 8080
apache2ctl restart
9. 修改 /etc/koha/sites/koha/koha-conf.xml 修改資料庫部分換成剛剛設定的koha帳號密碼
nano /etc/koha/sites/koha/koha-conf.xml(進入檔案)
<config>
<db_scheme>mysql</db_scheme>
<database>koha</database>
<hostname>localhost</hostname>
<port>3306</port>
<user>koha</user>注意密碼和帳號是否正確
<pass>123456</pass>
<biblioserver>biblios</biblioserver>
<biblioservershadow>1</biblioservershadow>
<authorityserver>authorities</authorityserver>
<authorityservershadow>1</authorityservershadow>
<pluginsdir>/var/lib/koha/koha/plugins</pluginsdir>
<enable_plugins>0</enable_plugins>
<upload_path>/var/lib/koha/koha/uploads</upload_path>
<intranetdir>/usr/share/koha/intranet/cgi-bin</intranetdir>
<opacdir>/usr/share/koha/opac/cgi-bin/opac</opacdir>
<opachtdocs>/usr/share/koha/opac/htdocs/opac-tmpl</opachtdocs>
<intrahtdocs>/usr/share/koha/intranet/htdocs/intranet-tmpl</intrahtdocs>
10.打上ip:8080
使用之前設的koha資料庫帳號密碼登入
11. 開始網頁安裝
按照步驟做
12 登入koha
Koha > About Koha 查看版本資訊
13 Koha > About Koha > Perl Modules 確認模組
14. 把舊版或未安裝的perl模組補上
apt-get install make g++
cpan Exception::Class HTTPD::Bench::ApacheBench Readonly::XS Test::WWW::Mechanize cpan Test::DBIx::Class WWW::YouTube::Download
錯誤bug
Readonly::XS已安裝 但在koha模組仍然顯示未安裝 相關maillist
cpan Readonly::XS
Reading '/root/.cpan/Metadata'
Database was generated on Wed, 27 Jul 2016 00:41:02 GMT
Readonly::XS is up to date (1.05).
15. 安裝中文語系
koha-translate --list --available 查看koha有的語系
koha-translate --install zh-Hans-CN
koha-translate --install zh-Hans-TW
administration->Global system preferences->I18N/L10N preferences->
language要得語言打勾
opaclanguages要得語言打勾
opaclanguagesdisplay allow
儲存後重新整理
16 修改zebra 能查詢中文 使用ICU
nano /etc/koha/zebradb/etc/default.idx(進入檔案)
# Zebra indexes as referred to from the *.abs-files.
# $Id: default.idx,v 1.10.2.1 2004/09/16 14:07:50 adam Exp $
#
# Traditional word index
# Used if completenss is 'incomplete field' (@attr 6=1) and
# structure is word/phrase/word-list/free-form-text/document-text
index w
completeness 0
position 1
alwaysmatches 1
firstinfield 1
#charmap word-phrase-utf.chr 註解這行
icuchain words-icu.xml 加上這行
# Phrase index
# Used if completeness is 'complete {sub}field' (@attr 6=2, @attr 6=1)
# and structure is word/phrase/word-list/free-form-text/document-text
index p
completeness 1
firstinfield 1
#charmap word-phrase-utf.chr 註解這行
icuchain words-icu.xml 加上這行
17 執行索引
koha-rebuild-zebra -v -f koha (koha是你的圖書館名稱)
18 設定排程(自動更新)
sudo crontab -e
*/20 * * * * /etc/cron.daily/koha-common
*/1 * * * * koha-rebuild-zebra -f -v --force koha