跳至主要內容

Koha 16.05安裝手冊

 1 編輯source

      nano /etc/apt/sourcesnano /etc/apt/sources.list .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-commapt-get install koha-commapt-get install koha-commonon on 

4. 編輯  /etc/koha/koha-sites.conf 設定koha網站設定

    nano /etc/koha/koha-sites.nano /etc/koha/koha-sites.confconf

    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資料庫

      grant all on *.* to 'koha'@'localhost' identified by '密碼';  建立koha帳號

      exit


6. apache相關模組 

http://manpages.ubuntu.com/manpages/trusty/man8/a2enmod.8.html


    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

http://manpages.ubuntu.com/manpages/trusty/man8/apache2ctl.8.html


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 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   圖書館名稱


18 設定排程


sudo crontab -e


*/20 * * * * /etc/cron.daily/koha-common

*/1 * * * * koha-rebuild-zebra -f -v --force koha 

留言

此網誌的熱門文章

意外的起頭

去年暑假開始 意~外的接觸了這個世界 意~外的開始了這個學習的旅程 意~外的開始總是說不清的XDDD 先謝謝一路教我的DC跟一起學習的MK 還有不厭其煩的被我問問題的H-很愛嗆我... 以及途中的SHS跟K及PH 還有很長的路要走 未來這一年挑戰多多啊~~ 歌,未央