如何在CentOS上运行Java EE应用程序 [英] How to run Java EE application on CentOS

查看:243
本文介绍了如何在CentOS上运行Java EE应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用EJB和JSF创建了一个应用程序。

I created an application with EJB and JSF.

我想将我的应用程序部署到网络上,所以我从hostgator获得了一个专用服务器。在这台服务器上,我安装了CentOS 6.7,Java 7和JBoss AS 7.1。

I'd like to deploy my application to the web, so I got a dedicated server from hostgator. On this server I installed CentOS 6.7, Java 7 and JBoss AS 7.1.

除此之外我还拥有自己的域名。

I addition to that I have my own domain name.

如何将我的应用程序部署到此服务器以及如何通过我的域名使该应用程序可以访问?

How can I deploy my application to this server and how I can make this application reachable via my domain name?

推荐答案

以下是来自JBoss的信息:

Here is information directly from JBoss:

[standalone@localhost:9999 /] deploy ~/Desktop/test-application.war
'test-application.war' deployed successfully.

[standalone@localhost:9999 /] undeploy test-application.war
Successfully undeployed test-application.war.

您也可以手动部署:


基本工作流程:所有示例都假设变量$ AS指向JBoss AS 7发行版的根

Basic workflows: All examples assume variable $AS points to the root of the JBoss AS 7 distribution.

A)添加新的压缩内容并进行部署:

A) Add new zipped content and deploy it:

cp target/example.war $AS/standalone/deployments/
(Manual mode only) touch $AS/standalone/deployments/example.war.dodeploy

B)添加新的解压缩内容并部署它:

B) Add new unzipped content and deploy it:

cp -r target/example.war/ $AS/standalone/deployments
(Manual mode only) touch $AS/standalone/deployments/example.war.dodeploy

C)取消部署当前部署的内容:

C) Undeploy currently deployed content:

rm $AS/standalone/deployments/example.war.deployed

D)仅限自动部署模式:取消部署当前部署的内容:

D) Auto-deploy mode only: Undeploy currently deployed content:

rm $AS/standalone/deployments/example.war

E)用新版本替换当前部署的压缩内容,并用
部署它:

E) Replace currently deployed zipped content with a new version and deploy it:

cp target/example.war/ $AS/standalone/deployments
(Manual mode only) touch $AS/standalone/deployments/example.war.dodeploy

F)仅手动模式:用
a新版本替换当前部署的解压缩内容并部署它:

F) Manual mode only: Replace currently deployed unzipped content with a new version and deploy it:

rm $AS/standalone/deployments/example.war.deployed
wait for $AS/standalone/deployments/example.war.undeployed file to appear
cp -r target/example.war/ $AS/standalone/deployments
touch $AS/standalone/deployments/example.war.dodeploy

G)仅限自动部署模式:用新版本替换当前部署的解压缩内容
并部署它:

G) Auto-deploy mode only: Replace currently deployed unzipped content with a new version and deploy it:

touch $AS/standalone/deployments/example.war.skipdeploy
cp -r target/example.war/ $AS/standalone/deployments
rm $AS/standalone/deployments/example.war.skipdeploy

H)仅限手动模式:实时替换当前部署的部分
解压缩内容而不重新部署:

H) Manual mode only: Live replace portions of currently deployed unzipped content without redeploying:

cp -r target/example.war/foo.html $AS/standalone/deployments/example.war

I)仅限自动部署模式:实时替换部分当前部署的
解压缩内容而不重新部署:

I) Auto-deploy mode only: Live replace portions of currently deployed unzipped content without redeploying:

touch $AS/standalone/deployments/example.war.skipdeploy
cp -r target/example.war/foo.html $AS/standalone/deployments/example.war

J )手动或自动部署模式:重新部署当前部署的内容
(即在没有内容更改的情况下退回):

J) Manual or auto-deploy mode: Redeploy currently deployed content (i.e. bounce it with no content change):

touch $AS/standalone/deployments/example.war.dodeploy

K)仅限自动部署模式:重新部署当前部署的内容(即
退回它而不更改内容):

K) Auto-deploy mode only: Redeploy currently deployed content (i.e. bounce it with no content change):

touch $AS/standalone/deployments/example.war


https://docs.jboss.org/author/display/AS71/Application+deployment?_sscc=t

这篇关于如何在CentOS上运行Java EE应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆