DSpace CRIS (Installation)

Original Post // https://wiki.duraspace.org/display/DSPACECRIS/Installation


ขั้นตอนการติดตั้ง

  1. ติดตั้ง Git, Maven และ Ant
  2. ติดตั้ง PostgreSQL
    1. สร้าง Username และ Database
  3. Build DSpace CRIS
    1. โหลด Project จาก Git
    2. ตั้งค่า Config ไฟล์ เพื่อให้สามารถต่อกับ Database ได้
    3. Maven Package
    4. Ant Fresh Install
  4. ติดตั้ง Tomcat 7
    1. ตั้งค่า JAVA_OPTS

สิ่งที่จำเป็นต่อการติดตั้ง

  • Git, Maven และ Ant
$ sudo yum install git maven ant

ขั้นตอนการติดตั้ง

สร้างโฟล์เดอร์สำหรับเก็บไฟล์ที่จะดึงลงมาจาก GitHub แล้วทำการดึงไฟล์ลงมา

$ mkdir crisinstallation
$ cd crisinstallation
$ git clone https://github.com/4Science/DSpace.git --branch dspace-5_x_x-cris dspace-parent/

เตรียมฐานข้อมูล ดูที่ CentOS7 and PostgreSQL / DSpace CRIS

แก้ไขไฟล์ Configuration เกี่ยวกับที่อยู่ไฟล์ติดตั้ง และฐานข้อมูใน crisinstallation/dspace-parent/build.properties .

##########################
# SERVER CONFIGURATION #
##########################

# DSpace installation directory. This is the location where you want
# to install DSpace. NOTE: this value will be copied over to the
# "dspace.dir" setting in the final "dspace.cfg" file. It can be
# modified later on in your "dspace.cfg", if needed.
dspace.install.dir = /home/dspace

.
.
.

##########################
# DATABASE CONFIGURATION #
##########################

# Uncomment the appropriate block below for your database.
# postgres
db.name = postgres
db.driver = org.postgresql.Driver
db.url = jdbc:postgresql://localhost:5432/dspace
db.username = dspace
db.password = dspace

ติดตั้ง Package โดยใช้ Maven ก่อน

$ cd dspace-parent/
$ mvn package

ถ้าระหว่างที่ทำมี Error ให้ลองสั่ง mvn package อีกครั้ง

[INFO] Reactor Summary:
[INFO]
[INFO] DSpace Parent Project .............................. SUCCESS [  2.002 s]
[INFO] DSpace Services Framework :: API and Implementation  SUCCESS [  4.861 s]
[INFO] DSpace Kernel :: API and Implementation ............ SUCCESS [ 21.116 s]
[INFO] Article Metrics :: Modules ......................... SUCCESS [  0.089 s]
[INFO] Article Metrics :: All ............................. SUCCESS [  0.111 s]
[INFO] Article Metrics :: All :: Retrieve API ............. SUCCESS [  1.145 s]
[INFO] DSpace JSP-UI ...................................... SUCCESS [ 23.078 s]
[INFO] DSpace CRIS ........................................ SUCCESS [  0.057 s]
[INFO] DSpace CRIS :: API ................................. SUCCESS [  4.062 s]
[INFO] Article Metrics :: All :: Lookup API ............... SUCCESS [  0.926 s]
[INFO] Article Metrics :: PubMed :: Lookup JSP Web ........ SUCCESS [  0.269 s]
[INFO] DSpace Addon Modules ............................... SUCCESS [  0.040 s]
[INFO] DSpace Kernel :: Additions and Local Customizations  SUCCESS [  0.433 s]
[INFO] DSpace XML-UI (Manakin) ............................ SUCCESS [ 25.725 s]
[INFO] DSpace CRIS :: Web Application Resources ........... SUCCESS [  4.680 s]
[INFO] DSpace CRIS :: JSPUI API ........................... SUCCESS [  2.668 s]
[INFO] DSpace CRIS :: API ................................. SUCCESS [  0.049 s]
[INFO] CRIS :: WS API ..................................... SUCCESS [  0.925 s]
[INFO] CRIS Webservices Webapp ............................ SUCCESS [  7.013 s]
[INFO] DSpace XML-UI (Manakin) :: Local Customizations .... SUCCESS [ 26.817 s]
[INFO] DSpace JSP-UI :: Local Customizations .............. SUCCESS [ 29.536 s]
[INFO] DSpace RDF ......................................... SUCCESS [  9.272 s]
[INFO] DSpace RDF :: Local Customizations ................. SUCCESS [ 14.403 s]
[INFO] DSpace REST :: API and Implementation .............. SUCCESS [ 13.462 s]
[INFO] DSpace REST :: Local Customizations ................ SUCCESS [ 16.839 s]
[INFO] DSpace SWORD ....................................... SUCCESS [ 20.902 s]
[INFO] DSpace SWORD :: Local Customizations ............... SUCCESS [ 11.823 s]
[INFO] DSpace SWORD v2 .................................... SUCCESS [ 11.019 s]
[INFO] DSpace SWORD v2 :: Local Customizations ............ SUCCESS [ 11.139 s]
[INFO] Apache Solr Webapp ................................. SUCCESS [ 19.772 s]
[INFO] DSpace SOLR :: Local Customizations ................ SUCCESS [ 12.307 s]
[INFO] DSpace OAI-PMH ..................................... SUCCESS [ 10.873 s]
[INFO] DSpace OAI-PMH :: Local Customizations ............. SUCCESS [ 13.926 s]
[INFO] DSpace Assembly and Configuration .................. SUCCESS [02:51 min]
[INFO] DSpace XML-UI Mirage2 Theme ........................ SUCCESS [ 11.565 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 08:26 min
[INFO] Finished at: 2016-01-19T12:09:38+01:00
[INFO] Final Memory: 140M/618M
[INFO] ------------------------------------------------------------------------
-----------------------------------------

จากนั้นให้เข้าไปที่ dspace-parent/dspace/target/dspace-install แล้วสั่งให้ Ant ทำการสร้างไฟล์ และฐานข้อมูล ครั้งนี้เราจะได้ไฟล์ไปอยู่ในโฟล์เดอร์ dspace ที่สร้างไว้และกำหนดสิทธิ์ไว้แล้ว

cd dspace-parent/dspace/target/dspace-install
ant fresh_install

ถ้าพบ Error ให้ลองดูการตั้งค่าการเชื่อมต่อ Database

-----------------------
BUILD SUCCESSFUL
Total time: 49 seconds
-----------------------

เสร็จแล้วเราจะได้ไฟล์ในโฟล์เดอร์ dspace ให้เราสั่งเปิดสิทธิ์อีกครั้งด้วยคำสั่ง chown -R tomcat:tomcat dspace แล้วเข้าไปก็อปไฟล์ไปว่างไว้ที่ /usr/share/tomcat/webapps ของเราโดยจะต้องมี jspui และ solr เสมอ

ก่อนจะทำการสั่ง Tomcat ให้ทำงานให้เข้าไปเพิ่ม Parameter ก่อนในไฟล์ /usr/share/tomcat/conf/tomcat.conf .

JAVA_OPTS="-Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true"

จากนั้นก็สั่งให้ Tomcat ทำงาน

สร้างโฟล์เดอร์สำหรับติดตั้ง และกำหนดสิทธิ์การเข้าถึงโฟล์เดอร์

mkdir dspace
chown -R tomcat:tomcat dspace

Administrator Account

เข้าไปที่โฟล์เดอร์ dspace ที่ได้หลังจากคำสั่งของ Ant /dspace/bin/ แล้วพิมพ์ dspace create-administrator แล้วทำตามขั้นตอนของระบบ

results matching ""

    No results matching ""