Tuesday, May 30, 2017

Dspace 6 Installation on Windows 7 - 64 bit

-   Should have basic knowledge with Windows 7 - 64 bit
 -  Be careful about name and space in each command 

1.      Prepare necessary files for installation by downloading from website as follow:

2.      Start to install by extracting all .zip file 
into drive c:\   the result  in c:\ directory will have
c:\apache-ant-1.8.0
c:\apache-maven-3.1.0
c:\apache-tomcat-7.0.69
c:\dspace-6.0-src-release



3. Then install java  'jdk-7u79-windows-x64.exe'  by right click on mouse and choose  'Run as administrator'




then click Next to install








After finished install click Close button




4. Then install database program by double click at filename   'postgresql-9.5.2-1-windows.exe'




Click Next to start the installation



Program will display the default installation Directory (use default) then click Next



Then display the Data Directory  (use default) and click Next



Then type password for database superuser (postgres), please remember or take note 
for your password and click Next



Then select port for connection to database (use default) port no. 5432 and click Next



Then choose Locale according to your country and click Next




Then click Next  to start installation



Wait for few seconds



Finally of PostgreSQL installation,   uncheck  'Stack Builder...' as the picture below and click Finish



5.      Next steps is setting  Environment Variables for program
by click at Windows Start button and right click on Computer -> Properties



click at Advanced system settings

















Click at Environment Variables.. button



At System variables panel click select Path  and click Edit... button




Type semicolon ( ; )   symbol  to separate the directory name for different program
as the picture below  for example:
;c:\apache-ant-1.8.0\bin



then following by next directory -> ;c:\apache-maven-3.1.0\bin



then following by  -->  ;c:\Program Files\Java\jdk1.7.0_79\bin




then following by  -->  ;c:\apache-tomcat-7.0.69\bin



then following by  -->  ;c:\Program Files (x86)\PostgreSQL\9.5\bin
and click OK to finish add Variable value: of directory name



At 'User variables for Administrator' panel click New... button



At Variable name: type 'JAVA_HOME' and
Variable value: type 'c:\Program Files\Java\jdk1.7.0_79'
and click OK



At Variable name: type 'ANT_HOME' and
Variable value: type 'c:\apache-ant-1.8.0'
and click OK



At Variable name: type 'CATALINA_HOME' and
Variable value: type 'c:\apache-tomcat-7.0.69'
and click OK



Finally, for setting 'Environment Variables' click OK



Then click OK again




6. After finished setting 'Environment Variables'  then run test command on 
windows command panel  or run 'cmd.exe'



type command ' java -version' , for correct setting it will show java version
then following by 'ant -version'




7. Next step, create database names and roles through pgAdmin III program
by opening it as the picture below



Right click at PostgreSQL 9.5 (x86) (localhost:5432) name and click Connect




Then type password for user postgres (as setting on the step of PostgreSQL installation)
then click OK




Right click at Login Roles (1) and click New Login Role...



at Role name type 'dspace'



 and  click at Definition tab and type password for dspace user (please remember!! your password)




Then click at Role privileges tab and select checkbox as the picture below
(Inherits rights from parent roles / Superuser / Can create databases / Can create roles)
and click OK to finish create New Login Role...



Next, create New Database.. name



At Properties tab, textbox Name type 'dspace'  and has Owner name is 'dspace'



click at Definition tab and Encoding click select UTF-8 and Tablespace click select pg_default
and click OK



Try to double click at Databases name 'dspace '



It'll show details as the picture below 



Next step, try to create pgcrypto extension
by right click at Extensions (2) -> New Extension..

























At Properties tab, Name type 'pgcrypto'



and Definition tab, at Scheme select public and Version select 1.2  then  click OK



It'll add new extensions name 'pgcrypto'




Go to next step, please do not close pgAdmin III program.

8. Create new folder name 'dspace' in  c:\  directory




9. Prepare to install dspace program by open windows command line 
and go to directory name

c:\dspace-6.0-src-release\dspace  





then  type command  mvn package





For this step, it might take a long time upon speed of your internet.
as showing an example, it took time about 28 minutes
program will continue to downloading file installation from the internet



After finish run command 'mvn package' ,  it'll show message 'BUILD SUCCESS' and Total time
of installation otherwise it might show 'BUILD FAILED'



Then change directory name to 
c:\dspace-6.0-src-release\dspace\target\dspace-installer  and then type command

ant fresh_install



Wait for few minutes (about 3-6 minutes), it'll show message 'BUILD SUCCESSFUL'

























10. After finished install dspace program, then create administrator user for dspace system

by changing directory name to  c:\dspace\bin  then type command
dspace create-administrator







11. Typing the information as showing below for dspace program which consist of:
E-mail address / First name / Last name / Password / 
when finished fill your informations  press y to confirm 



12. Try to start Tomcat service for Web Server running by using command line
and typing  %CATALINA_HOME%\bin\startup.bat  and  press Enter



At first time for running, windows firewall will open popup windows asking allow through firewall
click at Allow access to allow




Wait until the last line of popup windows show message ' Server startup in ... '



Then go to browser and type url 
http://localhost:8080/jspui

if you see error message below 'HTTP Status 404' ,it mean that your setting are wrong
please go to next step  for solving it.
(After this step, you might see many steps that found an error but I'd like you to see
some of them and how to solve it )

Then go to directory  c:\dspace\webaspps   and copy folder name 'jspui' to directory
c:\apache-tomcat-7.0.69\webapps\ROOT







After finished copied then try to open website http://localhost:8080/jspui  again
but still found an error shown ' HTTP Status 500...'  , please go to next step





Next, try to move folder name 'jspui' out from ROOT folder



and rename the first ROOT directory to any name 
then rename 'jspui' folder to be ROOT instead



Then go back to web browser and open website again but still found problem
nothing appear, please go to next step




Go back to Windows command line panel and stop service of tomcat by typing command

%CATALINA_HOME%\bin\shutdown.bat



and start service again by typing command

%CATALINA_HOME%\bin\startup.bat


Then go back to web browser and open website again by just typing 
http://localhost:8080
 but still found problem as below by showing 'Internal System Error...'
 ,please go to next step








Go back to directory c:\dspace\webapps and copy all folder inside except 'jspui' folder



And paste all of them in folder name  c:\apache-tomcat-7.0.69\webapps




Next step, 
If you  launch command

%CATALINA_HOME%\bin\startup.bat 

and see this message -> .. java.lang.OutOfMemoryError ..
     or  
can't start web server after launch command

%CATALINA_HOME%\bin\startup.bat


You must create filename 'setenv.bat'

in directory of 'c:\apache-tomcat-7.0.69\bin'





Type the following message below inside setenv.bat (click here to download)
(For setting 'setenv.bat', please see more details at this reference site:
https://www.mkyong.com/tomcat/tomcat-javalangoutofmemoryerror-permgen-space/)


set JAVA_OPTS=-Dfile.encoding=UTF-8 -Xms128m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m




Then go back to Windows command line screen and restart catalina by going to directory name
c:\apache-tomcat-7.0.69\bin  

and  typing command     catalina.bat restart




Next try to start tomcat service again by typing command

%CATALINA_HOME%\bin\startup.bat




Wait until the last line of popup windows show message ' Server startup in ... '





Then go back to web browser and typing url 

http://localhost:8080

Now, the installation complete with success.





































Keyword: install dspace 6 on windows, install dspace 6 ,ติดตั้ง dspace, install dspace, institutional repository, ir, คลังข้อมูล, คลังสารสนเทศ, คลังสถาบัน, คลังเอกสาร, ติดตั้ง dspace 6, ติดตั้งดีเสปซ, dspace 6 on windows, การใช้งาน dspace เบื้องต้น, คู่มือการใช้ dspace, dspace คู่มือ, โปรแกรม dspace, การติดตั้ง dspace, การติดตั้ง dspace 6, dspace installation on windows, dspace installation on centosdspace installation step by step, dspace 6 installation, dspace 6.0 installation

8 comments:

  1. Thank you for above guidelines.. one more help please how to take backup and restore process? please send me guidelines about take backup and restore.

    ReplyDelete
    Replies
    1. how to restore backup in after new installation

      Delete
    2. There are many ways for backing up,
      Normally I separate between backing up of system and data,
      as I suggest you the above of installation,
      I test on Esxi server (Free Version)
      but there are free software that you can use to install your system
      since the first step like 'Virtual box'

      I suggest you separate the backing up into both of system and data
      so if you install your system on virtual box it will easier to backing up
      the whole system.

      For Backing up the data, I always backing up the necessary folder like
      c:\apache-ant-1.8.0
      c:\apache-maven-3.1.0
      c:\apache-tomcat-7.0.69
      c:\dspace-6.0-src-release

      and then set the task schedule for backing up the postgresql database
      I suggest the following urls to your question
      (but be careful about version of each command)
      -https://stackoverflow.com/questions/28048412/how-to-backup-restore-postgresql-database-in-windows7
      -https://www.a2hosting.com/kb/developer-corner/postgresql/import-and-export-a-postgresql-database
      -https://www.enterprisedb.com/resources/tutorials/how-use-pgdump-and-pgrestore-postgres-plus-tutorial-windows

      Delete
  2. please my ant fresh installer failed......
    pls what should i do

    ReplyDelete
  3. There were many problems could be caused your problem.
    As the above of my guideline installation
    Please try to check the following step by step
    1. Please be aware of your error message, it will show you
    the main cause of problem
    2. Be Aware of the Path of Directory (at No.9 step)
    -c:\dspace-6.0-src-release\dspace\target\dspace-installer
    -command "ant fresh_install"
    (please aware of spelling)
    3. Be Aware of configuration of your dspace database Password
    (at No.7 step)
    4. If the first step is correct,
    try to check your internet networking
    and try the first step again.
    5. In another way, try to clean your existing dspace database
    and creating it again then repeat the first step.
    6. Or else, Please try to get more information at
    https://stackoverflow.com/questions/37600944/ant-fresh-install-error-build-failed
    https://groups.google.com/forum/#!topic/dspace-tech/4lxUo4CUlrU
    https://groups.google.com/forum/#!topic/dspace-tech/baGqX7ITudQ
    https://groups.google.com/forum/#!topic/dspace-tech/lQ1NckHy7i4
    https://www.linuxquestions.org/questions/linux-software-2/error-in-building-dspace-need-help-712174/

    Hope this help you ^^
    Regards,

    ReplyDelete
  4. Dear How con we use Maven2 Theme xmlui
    Thankyou

    ReplyDelete
  5. Thanks for sharing this beautiful blog. I am really appreciate your effort and dedication keep sharing this information.
    If you facing with your epson printer just dial our Epson Printer Toll Free Number 1800-436-0509 and get free Tech Support For Epson Printer

    ReplyDelete
  6. In the beginning, my dear brother, thank you for this information.
    But I had trouble installing maven

    ReplyDelete