12.07.2015 Views

Install and Configure DSpace 1.6.2 on Ubuntu - School of ...

Install and Configure DSpace 1.6.2 on Ubuntu - School of ...

Install and Configure DSpace 1.6.2 on Ubuntu - School of ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Page 2 <strong>of</strong> 9Create a new virtual machine <str<strong>on</strong>g>and</str<strong>on</strong>g> install <strong>Ubuntu</strong> ServerReview the DigIn St<str<strong>on</strong>g>and</str<strong>on</strong>g>ard <str<strong>on</strong>g>Install</str<strong>on</strong>g>ati<strong>on</strong> document for details, noting the following excepti<strong>on</strong>s:During the installati<strong>on</strong> process, do not select LAMP. All database <str<strong>on</strong>g>and</str<strong>on</strong>g> web c<strong>on</strong>figurati<strong>on</strong> will be d<strong>on</strong>e manually.You should, however, select the Open SSH applicati<strong>on</strong> to provide secure FTP <str<strong>on</strong>g>and</str<strong>on</strong>g> SSH functi<strong>on</strong>ality.Once the base system <str<strong>on</strong>g>and</str<strong>on</strong>g> SSH are installed, boot the virtual machine <str<strong>on</strong>g>and</str<strong>on</strong>g> c<strong>on</strong>figure a fixed IP address. You manyc<strong>on</strong>figure the same address as you have used for other VMs as l<strong>on</strong>g as you d<strong>on</strong>’t try to run more than <strong>on</strong>e <strong>of</strong>them at a time.Then, open the <strong>Ubuntu</strong> Partner Repositories by editing the repository sources list:$ sudo nano /etc/apt/sources.listFind the following lines relating to the partner repository <str<strong>on</strong>g>and</str<strong>on</strong>g> remove the hash marks at the beginning <strong>of</strong> theline to uncomment them (note: “lucid” refers to the versi<strong>on</strong> <strong>of</strong> <strong>Ubuntu</strong> <str<strong>on</strong>g>and</str<strong>on</strong>g> may be different depending <strong>on</strong> theversi<strong>on</strong> <strong>of</strong> <strong>Ubuntu</strong> installed):# deb http://archive.can<strong>on</strong>ical.com/ubuntu lucid partner# deb-src http://archive.can<strong>on</strong>ical.com/ubuntu lucid partnerSave the file (ctrl-o <str<strong>on</strong>g>and</str<strong>on</strong>g> then ctrl-x) <str<strong>on</strong>g>and</str<strong>on</strong>g> then update the repositories list <str<strong>on</strong>g>and</str<strong>on</strong>g> install any available updates <str<strong>on</strong>g>and</str<strong>on</strong>g>security patches:$ sudo aptitude update$ sudo aptitude safe-upgradeIf the upgrade comm<str<strong>on</strong>g>and</str<strong>on</strong>g> fails (it usually takes several minutes), then c<strong>on</strong>firm <str<strong>on</strong>g>and</str<strong>on</strong>g> troubleshoot c<strong>on</strong>nectivitybefore proceeding. Refer to the c<strong>on</strong>nectivity troubleshooting guide if there are problems.Take a snapshot before proceeding with additi<strong>on</strong>al installati<strong>on</strong> steps.<str<strong>on</strong>g>Install</str<strong>on</strong>g> <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> rev 20100926


Page 3 <strong>of</strong> 9Download <str<strong>on</strong>g>and</str<strong>on</strong>g> install required applicati<strong>on</strong>s <str<strong>on</strong>g>and</str<strong>on</strong>g> dependencies.At the server comm<str<strong>on</strong>g>and</str<strong>on</strong>g> line, download <str<strong>on</strong>g>and</str<strong>on</strong>g> install each <strong>of</strong> the following comp<strong>on</strong>ents (some <strong>of</strong> these may takeseveral minutes or l<strong>on</strong>ger depending <strong>on</strong> your Internet c<strong>on</strong>necti<strong>on</strong> speed <str<strong>on</strong>g>and</str<strong>on</strong>g> how busy the site is):$ sudo aptitude install tomcat6$ sudo aptitude install sun-java6-jdk[accept the license when prompted – there will be two screens; use the tab key to highlight the neededresp<strong>on</strong>se <str<strong>on</strong>g>and</str<strong>on</strong>g> press enter to accept]Next (note the double hyphen before the word set in the last comm<str<strong>on</strong>g>and</str<strong>on</strong>g>):$ sudo aptitude install postgresql$ sudo aptitude install libpg-java$ sudo aptitude install ant-opti<strong>on</strong>al$ sudo aptitude install maven2$ sudo update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java[c<strong>on</strong>firm that the comm<str<strong>on</strong>g>and</str<strong>on</strong>g> resp<strong>on</strong>ds with:update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to provide /usr/bin/java (java) in manual mode.]Be sure to take another snapshot before c<strong>on</strong>tinuing <strong>on</strong> with the <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> installati<strong>on</strong>. If something goes wr<strong>on</strong>g, itwill be much faster to start from this point. Occasi<strong>on</strong>ally, <strong>on</strong>e or two <strong>of</strong> the comm<str<strong>on</strong>g>and</str<strong>on</strong>g>s that follow will <strong>on</strong>lypartially complete if there are c<strong>on</strong>nectivity or network problems, <str<strong>on</strong>g>and</str<strong>on</strong>g> it is difficult to clean up the directorieswithout starting over. If there are problems, starting from a snapshot at this point will be much faster thanstarting over.<str<strong>on</strong>g>Install</str<strong>on</strong>g> <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> rev 20100926


Page 5 <strong>of</strong> 9Create a database.The following comm<str<strong>on</strong>g>and</str<strong>on</strong>g> creates a database named dspace owned by the dspace user dspace:$ sudo –u dspace createdb -U dspace -E UNICODE dspaceChange ownership <strong>of</strong> the tomcat directories to the dspace user:$ sudo chown -R dspace /var/cache/tomcat6$ sudo chown -R dspace /var/lib/tomcat6$ sudo chown -R dspace /var/log/tomcat6$ sudo chown -R dspace /etc/tomcat6<str<strong>on</strong>g>Install</str<strong>on</strong>g> <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> rev 20100926


Page 7 <strong>of</strong> 9dspace.Url = ${dspace.baseURL}/xmluiThis line may end in xmlui or jspui. We will be using the jspui interface, so if necessary, edit the last porti<strong>on</strong> <strong>of</strong>the line to reflect that. It should read:dspace.Url = ${dspace.baseURL}/jspuiFind (a few lines further down):dspace.name = <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> at My UniversityChange it to:dspace.name = DigIn <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> Demo[or another name <strong>of</strong> your choosing]You should review carefully the <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> manual for informati<strong>on</strong> <strong>on</strong> other c<strong>on</strong>figurati<strong>on</strong> parameters. Inproducti<strong>on</strong> settings, there are quite a few things you would need to set as n<strong>on</strong>-default values such as hostname,live URL, usernames <str<strong>on</strong>g>and</str<strong>on</strong>g> passwords for the database <str<strong>on</strong>g>and</str<strong>on</strong>g> mail servers, <str<strong>on</strong>g>and</str<strong>on</strong>g> a number <strong>of</strong> parameters relating tothe user interface. Browse through the file <str<strong>on</strong>g>and</str<strong>on</strong>g> peruse the secti<strong>on</strong>s <str<strong>on</strong>g>and</str<strong>on</strong>g> settings, but d<strong>on</strong>’t change anything elseat this time. When you are d<strong>on</strong>e, save the file with ctrl-o then ctrl-x.Before proceeding with the next step, take a snapshot. If maven or ant fails, it will be much easier to try it againfrom a snapshot than to try to clean it up, or start from an earlier point.Change to the source directory <str<strong>on</strong>g>and</str<strong>on</strong>g> package the installati<strong>on</strong> (the first time you run maven, it will download anumber <strong>of</strong> files <str<strong>on</strong>g>and</str<strong>on</strong>g> may take several minutes or l<strong>on</strong>ger):$ cd dspace-<str<strong>on</strong>g>1.6.2</str<strong>on</strong>g>-release/dspace$ mvn packageNote that the “unable to find resource” messages as the build progresses are informati<strong>on</strong>al <str<strong>on</strong>g>and</str<strong>on</strong>g> do not meanthere is a problem with the installati<strong>on</strong>.Check for the final BUILD SUCCESSFUL message when the process completes.<str<strong>on</strong>g>Install</str<strong>on</strong>g> <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> rev 20100926


Page 8 <strong>of</strong> 9Next, initialize the database <str<strong>on</strong>g>and</str<strong>on</strong>g> prepare a fresh install:$ cd target/dspace-<str<strong>on</strong>g>1.6.2</str<strong>on</strong>g>-build.dir$ ant fresh_installMake sure you see the BUILD SUCCESSFUL message when the process completesCreate a <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> administrator:$ /dspace/bin/create-administratorYou’ll be prompted to enter an email address. For this virtual machine demo system, email is not c<strong>on</strong>figured.You may enter your own email address (easy to remember) or something made up, such asadmin@localhost.net, but be sure to make a note <strong>of</strong> it because the email address is the administrator’s loginID.When prompted, enter a first <str<strong>on</strong>g>and</str<strong>on</strong>g> last name (your own will be easy to remember) <str<strong>on</strong>g>and</str<strong>on</strong>g> a password (I suggestpassword). C<strong>on</strong>firm all the informati<strong>on</strong> by entering y when prompted or n to re-enter the informati<strong>on</strong>.Log back in as your primary user <str<strong>on</strong>g>and</str<strong>on</strong>g> open the file /etc/default/tomcat6 for editing:$ su user1 *substitute your primary user’s login if different+$ cd$ sudo nano /etc/default/tomcat6Add the following lines to the end <strong>of</strong> that file, <str<strong>on</strong>g>and</str<strong>on</strong>g> save the file (be sure to press enter after the sec<strong>on</strong>d line):TOMCAT6_USER=dspaceTOMCAT6_SECURITY=noOpen /etc/tomcat6/server.xml for editing:$ sudo nano /etc/tomcat6/server.xml<str<strong>on</strong>g>Install</str<strong>on</strong>g> <str<strong>on</strong>g>DSpace</str<strong>on</strong>g> rev 20100926


Page 9 <strong>of</strong> 9Find (using ctrl-w):

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!