Pages:
Author

Topic: [10 BTC reward *paid*] Guide to install DSpace on Amazon EC2 (Read 3781 times)

hero member
Activity: 588
Merit: 500
legendary
Activity: 2618
Merit: 1007
Perfect, ant is "anting" away now! Cheesy

Edit: Everything's working, thanks for your time and enjoy your coins (paid out via GLBSE, might take a bit of time if they have to approve it first)!
hero member
Activity: 588
Merit: 500
Hi, thanks for reviewing.

The error you mentioned is unimportant, try to do this once again:

as user ec2-user:

Quote
sudo su postgres
pg_ctl start -D /pgdata
(watch the output)

and after that:

Quote
sudo su - dspace
cd dspace-1.8.2-release/dspace/target/dspace-1.8.2-build/
/usr/local/bin/apache-ant-1.8.3/bin/ant fresh_install
legendary
Activity: 2618
Merit: 1007
at "pg_ctl start -D /pgdata" I get:
Quote
bash-4.1$ pg_ctl start -D /pgdata
could not change directory to "/home/ec2-user/archive"
server starting

Seems to work nevertheless though. Smiley

Another thing to keep in mind for anyone trying this out is that the maven assembly seems to take ages(!) sometimes, make sure your SSH connections don't time out.

directly after running ant I get the following error though:
Quote
Code:
test_database:
     [java] 2012-04-19 14:55:54,068 INFO  org.dspace.core.ConfigurationManager @ Loading system provided config property (-Ddspace.configuration): config/dspace.cfg
     [java] 2012-04-19 14:55:54,085 INFO  org.dspace.core.ConfigurationManager @ Using default log4j provided log configuration,if unintended, check your dspace.cfg for (log.init.config)
     [java]
     [java] Attempting to connect to database:
     [java]  - URL: jdbc:postgresql://localhost:5432/dspace
     [java]  - Driver: org.postgresql.Driver
     [java]  - Username: dspace
     [java]  - Password: dspace
     [java]  - Schema: null
     [java]
     [java] Testing connection...
     [java]
     [java] Error:
     [java]  - org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
     [java]
     [java] Please see the DSpace documentation for assistance.
     [java]

BUILD FAILED
I tried opening port 5432 in the security settings of the AMI, still no success though... Sad
hero member
Activity: 588
Merit: 500
Great news that you still needed it. It was about 1:00 when I finished Smiley
The guide can be optimized, with some steps eliminated, cause I started from using available guides and modified it to work. But as you need a working guide and you are not going to install it everyday I think this one will do. But if you want it polished please let me know.
legendary
Activity: 2618
Merit: 1007
Sounds and looks great, I'll check it out and as soon as I can confirm it, the money is yours (it's kinda late at night now at my place, so I'll do it tomorrow morning)!

Man, I'm so glad I can finally move on with that project, being stuck on _installation_ sucked big time!
hero member
Activity: 588
Merit: 500
After you setup the ec2 instance with Amazon Linux AMI and login into shell do the following commands:

Quote
sudo yum update
sudo yum install tomcat6 postgresql postgresql-server svn
mkdir archive
cd archive
wget http://apache.osuosl.org//maven/binaries/apache-maven-3.0.4-bin.zip
sudo unzip apache-maven-3.0.4-bin.zip -d /usr/local/bin
wget http://mirrors.axint.net/apache//ant/binaries/apache-ant-1.8.3-bin.zip
sudo unzip apache-ant-1.8.3-bin.zip -d /usr/local/bin
sudo mkdir /pgdata
sudo chown -R postgres:postgres /pgdata
sudo su postgres
pg_ctl init -D /pgdata
pg_ctl start -D /pgdata
createuser dspace -S -D -R
createdb dspace

sudo useradd -m dspace
sudo mkdir /dspace
sudo chown -R dspace:dspace /dspace/
sudo su - dspace
wget http://sourceforge.net/projects/dspace/files/DSpace%20Stable/1.8.2/dspace-1.8.2-release.zip/download
unzip dspace-1.8.2-release.zip
cd dspace-1.8.2-release/dspace
/usr/local/bin/apache-maven-3.0.4/bin/mvn package
cd target/dspace-1.8.2-build/
/usr/local/bin/apache-ant-1.8.3/bin/ant fresh_install

sudo cp -r /dspace/webapps/* /usr/share/tomcat6/webapps/
sudo /etc/init.d/tomcat6 start
sudo /dspace/bin/dspace create-administrator
set the AWS security for the host to have port 8080 open
navigate to the :8080/xmlui of the newly created DSpace!

My BTC purse is 1GNmnPf67wj72rTPF8GLz6jS7T354MVnbg
hero member
Activity: 588
Merit: 500
Installed and run the dspace, what a mess with those guides, thought it were easy money Smiley need few minutes to grab all the commands I put in and double check it on fresh install, hope you still need it.
hero member
Activity: 588
Merit: 500
I really hope it is not too late, I just restored access to my AWS account and is getting through installing DSpace already. I got past createuser issue you had, but thats not the only one missed from the guides Smiley
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
What distro have you decided using ? Installing all the needed parts to have a working environment depends mostly on the present OS.

See initial post:
[...] a fresh, naked + empty 32 or 64 bit Amazon Linux AMI[...]Amazon Linux is by the way generally quite similar to RedHat/CentOS, in case you're wondering.[...]

Hope this helps.

ok, got it, sorry you had to repeat yourself. I can help you with an 32 or 64 bit Lucid Lynx, the distro i have experience with.
legendary
Activity: 2618
Merit: 1007
What distro have you decided using ? Installing all the needed parts to have a working environment depends mostly on the present OS.

See initial post:
[...] a fresh, naked + empty 32 or 64 bit Amazon Linux AMI[...]Amazon Linux is by the way generally quite similar to RedHat/CentOS, in case you're wondering.[...]

Hope this helps.
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
edit: i have a question for you, what problems do you encounter when following the already existent install instructions ?

https://wiki.duraspace.org/display/DSDOC18/Installation#Installation-Installation
I had problems connecting to the database and setting it up mostly. Up to Maven it kinda worked but Ant afterwards complained quite quickly that the database connection failed.
Also I wasn't quite sure if I now still need a "dspace" user account or not after reading and trying to follow the wiki page from the GSOC (first link). Also "createuser -a ec2-user -U postgres" won't even work since "createuser" has no command line argument named "-a"...

So you had some problems dealing with postgres. Try issuing "createuser -U " and you should be able to create the "dspace" account interactively.


edit2: launch a free bitnami LAPPstack instance and start building your DSpace app from that. I can give you any kind of assistance if needed.
Here as well: I do not want to use Ubuntu as Server OS, also I'm not really comfortable with using 3rd party AMIs. Additionally I guess I'd still need to install Tomcat there but I won't need Apache httpd and PHP...


What distro have you decided using ? Installing all the needed parts to have a working environment depends mostly on the present OS.

legendary
Activity: 2618
Merit: 1007
edit: i have a question for you, what problems do you encounter when following the already existent install instructions ?

https://wiki.duraspace.org/display/DSDOC18/Installation#Installation-Installation
I had problems connecting to the database and setting it up mostly. Up to Maven it kinda worked but Ant afterwards complained quite quickly that the database connection failed.
Also I wasn't quite sure if I now still need a "dspace" user account or not after reading and trying to follow the wiki page from the GSOC (first link). Also "createuser -a ec2-user -U postgres" won't even work since "createuser" has no command line argument named "-a"...

edit2: launch a free bitnami LAPPstack instance and start building your DSpace app from that. I can give you any kind of assistance if needed.
Here as well: I do not want to use Ubuntu as Server OS, also I'm not really comfortable with using 3rd party AMIs. Additionally I guess I'd still need to install Tomcat there but I won't need Apache httpd and PHP...
legendary
Activity: 924
Merit: 1004
Firstbits: 1pirata
I will give it a try. Allow me a few hours.

edit: i have a question for you, what problems do you encounter when following the already existent install instructions ?

https://wiki.duraspace.org/display/DSDOC18/Installation#Installation-Installation

edit2: launch a free bitnami LAPPstack instance and start building your DSpace app from that. I can give you any kind of assistance if needed.
legendary
Activity: 2618
Merit: 1007
Andrey, yes I could use it on Monday or Tuesday too.I just didn't want to give a date 3 weeks away or so, as it is quite urgent to me. I also decided I want to have quality information fast, which is why I chose to hand out these ~45-50 USD for a task that might be simple for some people more familiar to AWS than me.

If someone can do it faster in good quality though I would prefer that of course! Smiley
hero member
Activity: 588
Merit: 500
I think on Monday or Tuesday I will have my account so will be able to do that, if still needed by that date.
hero member
Activity: 560
Merit: 500
Ad astra.
My bad, didn't read the fine print. If Andrey doesn't come up with anything for you by tomorrow, I'll put something together.

Probably I wont, I haven't used my AWS for some time and it is now blocked. Don't want to provide instructions which I don't check personally. So you have time. I contacted the support, but not sure when they do respond, so you probably go ahead, no need for delay in such a simple task.

Blech, didn't realize they required a credit card to sign up. (Don't want Amazon to have that) I could put something theoretical together, but I won't be able to test it...

Hopefully someone sees this who actually has an EC2 instance.
hero member
Activity: 588
Merit: 500
My bad, didn't read the fine print. If Andrey doesn't come up with anything for you by tomorrow, I'll put something together.

Probably I wont, I haven't used my AWS for some time and it is now blocked. Don't want to provide instructions which I don't check personally. So you have time. I contacted the support, but not sure when they do respond, so you probably go ahead, no need for delay in such a simple task.
hero member
Activity: 560
Merit: 500
Ad astra.
There's a prebuilt Amazon EC2 image here, would that suit your needs? If you're looking for easy, that's pretty much the paragon. (1Ly7emr4pYT5UjKZ4VWEjbym2s5F9oA7y8)
I'm sorry, but as far as I understand it, you have to pay Jumpbox additionally (60 USD/month, a multiple of what I estimate to pay to Amazon...) just to be able/allowed to use this image on EC2. Also it uses Ubuntu 10.04, not Amazon Linux. It might help people to figure out how to install DSpace though I guess. I knew already before about this service but decided against it. Nevertheless thanks for your time and your post! Smiley

I still need instructions @Andrey.

My bad, didn't read the fine print. If Andrey doesn't come up with anything for you by tomorrow, I'll put something together.
legendary
Activity: 2618
Merit: 1007
There's a prebuilt Amazon EC2 image here, would that suit your needs? If you're looking for easy, that's pretty much the paragon. (1Ly7emr4pYT5UjKZ4VWEjbym2s5F9oA7y8)
I'm sorry, but as far as I understand it, you have to pay Jumpbox additionally (60 USD/month, a multiple of what I estimate to pay to Amazon...) just to be able/allowed to use this image on EC2. Also it uses Ubuntu 10.04, not Amazon Linux. It might help people to figure out how to install DSpace though I guess. I knew already before about this service but decided against it. Nevertheless thanks for your time and your post! Smiley

I still need instructions @Andrey.
Pages:
Jump to: