2016年4月24日 星期日

koha 3.22.055安裝手冊

環境確認:ubuntu14.04
開始安裝
1.建立帳號:新增使用者koha
指令: adduser koha( sudo

2.新增root密碼:避免安裝到後來又出現又出現root不一致的問題
指令: passwd root 打上密碼(sudo

root差別 ,使用者要用sudo指令去取得權限;而root是最高權限不用最高權限不用sudo
3.切換到root權限
指令:su root ,終端機顯示root@ubuntu:(才代表有切換

4.加入koha來源
指令: gedit /etc/apt/sources.list
加入來源:deb http://debian.koha-community.org/koha stable main(加在最後

5.加入koha來源的key和更新
指令:wget -O- http://debian.koha-community.org/koha/gpg.asc | apt-key add -
  apt-get update
(Wget砍站,-O將記錄訊息寫入<檔案>中)

6.下載koha3.22.5
指令:wget http://download.koha-community.org/koha-3.22.05.tar.gz

解壓縮
tar zxvf koha-3.22.05.tar.gz

7.安裝koha套件
指令:apt-get install mysql-server g++ make koha-common
(也可選擇逐一安裝
(1)安裝sql
apt-get install mysql-server
(2)設定密碼
apt-get install g++
apt-get install make
apt-get install koha-common→輸入mysql密碼)

*如果出現以下錯誤訊息
處理時發生錯誤: libapache2-mpm-itk apache2-mpm-itk koha-common E: Sub-process /usr/bin/dpkg returned an error code (1) rain@rain-HP-Z230-Tower-Workstation:~$

貼上下列指令,即可排除 a2dismod mpm_event a2enmod mpm_prefork echo "ServerName localhost" | tee /etc/apache2/conf-available/fqdn.conf ln -s /etc/apache2/conf-available/fqdn.conf /etc/apache2/conf-enabled/fqdn.conf service apache2 restart apt-get install –f

8.進入koha資料夾及檢查 perl模組
指令:cd koha-3.22.05(進到資料夾
perl koha_perl_deps.pl -m -u | awk -F ' ' {'print $1'}(檢查模組

9.安裝缺少的perl模組
指令:cpan XXXX(這裡直接複製貼上上面缺少的套件

例如缺少HTTPD::Bench::ApacheBench 則指令為  cpan HTTPD::Bench::ApacheBench

10.跑完再執行一次 
指令:perl koha_perl_deps.pl -m -u | awk -F ' ' {'print $1'}
檢查是否有缺少

11.gedit /etc/perl/XML/SAX/ParserDetails.ini 改成像下圖



12.新增koha資料庫及使用者

登入資料庫       mysql -u root -p
建立koha資料庫  create database koha;
koha userc和密碼  grant all on *.* to 'koha'@'localhost' identified by '你的密碼';
離開             exit;

13.安裝koha
安裝koha (確認中括弧中的值如下↓) 指令:perl Makefile 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] make make install

14.新增koha設定檔 指令:koha-create --use-db koha 貼上下列指令再執行一次koha-create --use-db koha a2enmod rewrite a2enmod cgi

15.修改koha.conf 指令:gedit /etc/apache2/sites-available/koha.conf


將Intranet的地方改成 <VirtualHost *:8080 SetEnv KOHA_CONF後面的路徑改成 /etc/koha/koha-conf.xml (Intranet和OPAC兩邊的都要改)

16.開啟8080 port
指令:gedit /etc/apache2/ports.conf

17.apache使用koha設定
指令:a2ensite koha.conf
a2dissite 000-default
apache2ctl restart

18.環境變數
指令:gedit ˜/.profile
source ˜/.profile
gedit /home/koha/.profile
source /home/koha/.profile

19.在網頁上操作
網址輸入localhost到自己架設的伺服器上
按自己需求安裝
記得選marc21

20.安裝中文語系(回到終端機)
 cd/usr/share/koha/misc/translator
./translate install zh-Hans-CN(zh-Hans-CN -> 簡體中文)
./translate install zh-Hans-TW(zh-Hans-TW -> 繁體中文)

21.館員介面設定
設定語系步驟路徑為:
administration→Global system preferences→I18N/L10N preferences→
language欄中勾選要的語言
opaclanguages欄中勾選要的語言
opaclanguagesdisplay的選項選擇[allow]
儲存後完成

22.開機啟動zebra
指令:cd /etc/init.d
ln -s /usr/share/koha/bin/koha-zebra-ctl.sh koha-zebra
update-rc.d koha-zebra defaults
/etc/init.d/koha-zebra start

23.執行索引
先切換至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 →更新變動部分

24.加入排程(仍在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

機讀格式比較



比較之下
得知雖然每個機讀著錄項目不同,但可以知道必備的欄位有
1.定長資料
2.ISBN
3.編目來源
4.題名、著者敘述
5.版本項
6.出版項
7.稽核項
8.附註段
9.附加標目-個人名稱
等以上九個
其他項目就比較有差異性,但也有次之的如:語言代碼、集叢項等等
再之後再做分析

_____________________
以下為資料來源