(加入kohasource   

 1. sudo gedit /etc/apt/sources.list

 2. 跳出gedit的編輯器

3. 最後一行貼上deb http://debian.koha-community.org/koha stable main

存儲並關掉編輯器

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

 

5. sudo apt-get update

 

(下載koha)

6.sudo wget http://download.koha-community.org/koha- 3.22.05.tar.gz

解壓縮

7.sudo tar zxvf koha-3.22.05.tar.gz

 

(安裝koha套件)

8.(安裝sqlsudo apt-get install mysql-server (問你是否,選是)

9.設定mysql密碼

10.sudo apt-get install g++ (問你是否,選是)

11.sudo apt-get install make

12.sudo apt-get install koha-common(跳出的框框一直按Enter

(出現錯誤Errors were encountered while processing:
        libapache2-mpm-itk
        apache2-mpm-itk
                   koha-common

)

13.貼上 sudo a2dismod mpm_event

貼上 sudo apt-get install -f

14.sudo echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf

15.sudo ln -s /etc/apache2/conf-available/fqdn.conf /etc/apache2/conf-enabled/fqdn.conf

16.sudo a2dismod mpm_event
17.sudo a2enmod mpm_prefork
18.sudo service apache2 restart

19.sudo apt-get install –f

 

20. (切換到koha資料夾)

cd koha-3.22.05

 

21. (檢查perl套件)

sudo perl koha_perl_deps.pl -m -u | awk -F ' ' {'print $1'} 

(發現缺少

HTTPD::Bench::ApacheBenchTest::DBIx::ClassException::ClassTest::WWW::Mechanize

cpan HTTPD::Bench::ApacheBench

cpan Test::DBIx::Class

cpan  Exception::Class

cpan Test::WWW::Mechanize

裝到perl koha_perl_deps.pl -m -u | awk -F ' ' {'print $1'}沒有套件為止

 

22.(新增koha資料庫及使用者)

貼上sudo mysql -u root -p    輸入ROOT密碼

進入MYSQL後依序貼上

1create database koha;

2grant all on *.* to 'koha'@'localhost' identified by '設定自己的密碼';

3exit;

 

23.sudo gedit /etc/perl/XML/SAX/ParserDetails.ini 打開編輯器

把這段貼到最後一行

[XML::LibXML::SAX::Parser]

http://xml.org/sax/features/namespaces = 1

 

24.執行sudo misc/sax_parser_print.pl

結果須為

Koha wants something like:

   XML::LibXML::SAX::Parser=HASH(0x81fe220)

You have:

   XML::LibXML::SAX::Parser=HASH(0x801740)

Looks good.

 

25.(執行安裝)

sudo perl Makefile.PL

選擇[standard]         

Installation mode (dev, single, standard) [standard]

Base installation directory [/usr/share/koha]

User account [koha]

Group [koha]

DBMS to use (Pg, mysql) [mysql]

Database server [localhost]

DMBS [3306]

Please specify the name of the database to be used by Koha [koha]

Please specify the user that owns the database to be used by Koha [kohaadmin] koha

Please specify the password of the user that owns the database to be used by Koha [katikoan]  koha的密碼

MARC format for Zebra indexing (marc21, normarc, unimarc) [marc21]

Primary language for Zebra indexing (en, es, fr, gr, nb, ru, uk) [en]

Bibliographic indexing mode (dom, grs1) [dom]

Authorities indexing mode (dom, grs1) [dom]

characters. (chr, icu) [chr] icu (選擇icu)

Please specify Zebra database user [kohauser]

Please specify the Zebra database password [zebrastripes]

Install the SRU configuration files? (no, yes) [yes]

SRU Database host? [localhost]

SRU port for bibliographic data? [9998]

SRU port for authority data? [9999]

Install the PazPar2 configuration files? [no]

You will need a Memcached server running. (no, yes) [no]

Path to DejaVu fonts? [/usr/share/fonts/truetype/ttf-dejavu]

Would you like to run the database-dependent test suite? (no, yes) [no]

完成初步安裝

執行

sudo make  

sudo make install

 

26.(新增koha設定檔)

sudo koha-create --use-db koha

跳出sudo a2enmod rewrite 複製並貼上執行

跳出service apache2 restart複製並貼上執行sudo service apache2 restart

再重新執行sudo koha-create --use-db koha

跳出 sudo a2enmod cgi複製並貼上執行

跳出service apache2 restart複製並貼上執行sudo service apache2 restart

 

27.修改sudo gedit /etc/apache2/sites-available/koha.conf

Intranet改成

<VirtualHost *:8080

SetEnv KOHA_CONF後路徑改成 /etc/koha/koha-conf.xml (IntranetOPAC都要)

存儲並關掉編輯器

 

28.sudo gedit  /etc/apache2/ports.conf

新增 Listen 8080 存儲並關掉編輯器

sudo a2ensite koha.conf

sudo a2dissite 000-default

sudo apache2ctl restart

 

29.(環境變數)

1sudo gedit ~/.profile  最後加上

export KOHA_CONF="/etc/koha/koha-conf.xml"

 

export PERL5LIB="/usr/share/koha/lib"

 

2sudo gedit  /home/koha/.profile 最後加上

export KOHA_CONF="/etc/koha/koha-conf.xml"

 

export PERL5LIB="/usr/share/koha/lib"

 

30.(完成安裝)

http://ip位置:8080/

  

依據自身需求設定

 

31.(安裝語系zh-Hans-TW -> 繁體中文)

sudo koha-translate --install zh-Hans-TW

進入館員介面administration->Global system preferences->I18N/L10N preferences->

language要得語言打勾

opaclanguages要得語言打勾

opaclanguagesdisplay allow

儲存後重新整理

32.(開機啟動zebra

cd /etc/init.d

sudo ln -s /usr/share/koha/bin/koha-zebra-ctl.sh koha-zebra

sudo update-rc.d koha-zebra defaults

sudo /etc/init.d/koha-zebra start

 

33.(排程設定)

(將檔案權限修改為koha)  su koha

cd /var/lock/koha/

sudo chown -R koha:koha zebradb

 

34.執行索引

切換至koha帳號

su koha

/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -a -b -v -r --run-as-root (重建索引)

/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -a -b -v -z --run-as-root (更新變動部分)

35.加入排程(還在koha帳號下)

crontab –e


*/1 * * * * export KOHA_CONF=/etc/koha/koha-conf.xml;export PERL5LIB=/usr/share/koha/lib;/usr/share/koha/bin/migration_tools/rebuild_zebra.pl -a -b -v -z --run-as-root

 

arrow
arrow
    全站熱搜

    吳沂芸 發表在 痞客邦 留言(0) 人氣()