开发者

Amazon EC2: How install glassfish in EC2?

i'm trying to deploy my JSF site in EC2 instances, i'm new with cloud computing.

How do i install the GassFish 3 OpenSource in my EC2 instance ?

Update: To download use 'curl' command :

curl http://www.java.net/download/jdk6/6u27/promoted/b03/binaries/jdk-6u27-ea-bin-b03-linux-i586-27_may_2011-rpm.bin > java-rpm.bin 

or using wget:

wget http://开发者_运维技巧www.java.net/download/jdk6/6u27/promoted/b03/binaries/jdk-6u27-ea-bin-b03-linux-i586-27_may_2011-rpm.bin


Here is what you need to do:

  1. Get an AMI instance launched. Follow this tutorial to install. (Unfortunately, Glassfish installation tutorials are given as YouTube video on their official website!)

    The Simplest is to start with an existing EBS backed instance. This is how I started.

  2. Now, if you want to kill the instance, it's same as throwing machine out of window. If you want to reuse it later or probably want to make a blue print for many instances that you will be launching in future. You need to bundle it up and register as an image.

    If you have EBS backed instance, creating an image out of it is easier than sending an email. All you need to do is to login to your AWS Web Console, select the instance that you wanted to create an AMI of, select Instance Actions > Create Image from menu. Done!

    If you have instance storage based AMI. You need to bundle up, and store in your S3 bucket, and register the AMI using, ec2-api-tools and ec2-ami-tools. So, have them installed in your instance and create the image as very neatly explained here.

Now, as far as cost is concerned, refer this. As far as I understand (my clients pay, so I don't really know how much) your running instance is going to cost you some money, even if there is no activity. However, if you make an AMI and store in S3 or in a EBS volume, you will be paying for storage cost.

Hope this explains what you wanted.


First you need to install jdk and then set environment variable JAVA_HOME. Then follow below commands (Applicable on Amazon Linux EC2 ):

Directory used here is : usr/server

wget http://download.oracle.com/glassfish/4.1.2/release/glassfish-4.1.2.zip

unzip glassfish-4.1.2.zip

mv glassfish4 ../server/

groupadd glassfish-group

useradd -s /bin/bash -g glassfish-group glassfish-user

cd usr/server

chown -Rf glassfish-user.glassfish-group glassfish4

ls -l | grep glassfish

cd glassfish4

cd glassfish/domains

cd glassfish/bin

pwd

cd /etc/init.d/

wget https://geekstarts.info/scripts/glassfish.sh

mv glassfish.sh glassfish

chmod 755 glassfish

ls -l | grep glassfish

cd ~ glassfish/

su vector-user

whoami

pwd

cd glassfish4/bin

ls -l

whoami

./asadmin

change-master-password --savemasterpassword // default is chageit

change-admin-password // default is blank

start-domain

enable-secure-admin

restart-domain

stop-domain

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜