Amazon EC2:如何在 EC2 中安装 glassfish?

发布于 2024-11-28 16:01:12 字数 440 浏览 1 评论 0原文

我正在尝试在 EC2 实例中部署我的 JSF 站点,我是云计算新手。

如何在我的 EC2 实例中安装 GassFish 3 OpenSource?

更新: 要下载,请使用“curl”命令:

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 

或使用 wget:

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

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无妨# 2024-12-05 16:01:12

以下是您需要执行的操作:

  1. 获取 AMI 实例已启动。按照本教程进行安装。 (不幸的是,Glassfish 安装教程在其官方网站上以 YouTube 视频形式提供!)

    最简单的方法是从现有的 EBS 支持的实例开始。这就是我开始的方式。

  2. 现在,如果你想杀死实例,就相当于把机器扔出窗外。如果您想稍后重用它,或者可能想为将来要启动的许多实例制定蓝图。您需要将其捆绑并注册为图像。

    如果您有 EBS 支持的实例,则用它创建映像比发送电子邮件更容易。您所需要做的就是登录 AWS Web 控制台,选择您想要为其创建 AMI 的实例,然后选择“实例操作”>“实例操作”。从菜单创建图像。完成!

    如果您有基于实例存储的 AMI。您需要捆绑并存储在 S3 存储桶中,并使用 ec2-api-tools< 注册 AMI /a> 和 ec2-ami-tools。因此,将它们安装在您的实例中并非常整齐地创建图像 这里解释了

现在,就成本而言,参考此。据我了解(我的客户付费,所以我真的不知道多少钱),即使没有任何活动,您运行的实例也会花费您一些钱。但是,如果您制作 AMI 并存储在 S3 或 EBS 卷中,您将需要支付存储成本。

希望这能解释你想要什么。

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.

じее 2024-12-05 16:01:12

首先需要安装jdk,然后设置环境变量JAVA_HOME。
然后按照以下命令(适用于 Amazon Linux EC2 ):

这里使用的目录是:usr/server

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

解压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 -我| 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 // 默认为 chageit

change-admin-password // 默认为空白

start-domain

enable -secure-admin

restart-domain

停止域

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文