[ec2-beta] Setting Up Snapshotting - Java
Micah Walter
micahwalter at me.com
Thu Apr 16 14:39:38 BST 2009
James,
Thanks so much for your help last night. After adding that line to
the /etc/apt/sources.list and running your script Java installed just
fine.
I then moved on to setting up the script to do the automatic snap-
shotting. To do this I created two scripts, one of which is eric
hammonds script which takes care of flushing the DB and all of that.
The second script basically exports all those environment variables
and then calls eric's script. If I run this as the ubuntu user it
works just fine. However when I set this up as a cron job using
crontab -e it only runs the first script.
So I am guessing I am not calling eric's script correctly or perhaps I
have a permissions issue or something. I did try doing a sudo crontab -
e instead, but got the same result...
any ideas? could this be a permissions issue?
-m
On Apr 15, 2009, at 8:34 PM, James Mayes wrote:
> On Apr 15, 2009, at 7:24 PM, Micah Walter wrote:
>
>> Hi,
>> I'm trying to set up automatic snapshotting on my ubuntu ec2
>> instance.
>> I have most of it set up correctly... I think..
>>
>> I installed the EC2 API tools in to a folder on my ubuntu account
>> called /home/ubuntu/ec2/api-tools
>>
>> I also copied the binaries to /usr/local/bin
>>
>> I did the export EC2_HOME, and other exports, but I appears I need to
>> install Java. I haven't been able to figure out how to do this
>> properly. Everything points to adding the "multiverse" to my /etc/
>> apt/
>> sources.list file, but I'm not sure what to add for this AMI...
>>
>> Once I do that I just need to add the export JAVA_HOME line and it
>> should work... I hope...
>>
>> anyway, any info on this would make my day!
>>
>> thanks,
>> Micah
>>
>> -- Ec2-beta mailing list
>> Ec2-beta at lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ec2-beta
>
>
> Hello Micah,
>
> Here is the script that I use. I obtained it from either this
> mailing list or the ec2ubuntu list. My apologies (and thanks!) to
> whomever created it. It is for unattended installation of the
> official Sun Java distribution (full SDK, not just the JRE). Note
> that you can perform this interactively by just issuing "apt-get
> install sun-java6-jdk" You can also install the OpenJDK (assuming
> everything that you need is implemented there as expected). Google
> around if interested.
>
> #!/bin/sh
> echo "# ==========="
> echo "# Sun Java 6"
> echo "# ==========="
> apt-get -y install debconf-utils
> echo 'sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
> sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true
> sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
> sun-java6-jre sun-java6-jre/stopthread boolean true
> sun-java6-jre sun-java6-jre/jcepolicy note
> sun-java6-bin shared/present-sun-dlj-v1-1 note
> sun-java6-jdk shared/present-sun-dlj-v1-1 note
> sun-java6-jre shared/present-sun-dlj-v1-1 note
> '|debconf-set-selections
> export DEBIAN_FRONTEND=noninteractive
> apt-get -y install sun-java6-jdk
>
>
>
More information about the Ec2-beta
mailing list