我使用EJB和JSF创建了一个应用程序。
我想将我的应用程序部署到Web上,所以我从hostgator获得了一个专用服务器。在这台服务器上,我安装了CentOS 6.7,Java 7和JBoss AS 7.1。
除此之外,我还拥有自己的域名。
如何将我的应用程序部署到此服务器以及如何通过我的域名访问此应用程序?
答案 0 :(得分:1)
以下是来自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发行版。
A)添加新的压缩内容并进行部署:
cp target/example.war $AS/standalone/deployments/ (Manual mode only) touch $AS/standalone/deployments/example.war.dodeploy
B)添加新的解压缩内容并进行部署:
cp -r target/example.war/ $AS/standalone/deployments (Manual mode only) touch $AS/standalone/deployments/example.war.dodeploy
C)取消部署当前部署的内容:
rm $AS/standalone/deployments/example.war.deployed
D)仅限自动部署模式:取消部署当前部署的内容:
rm $AS/standalone/deployments/example.war
E)用新版本替换当前部署的压缩内容 部署它:
cp target/example.war/ $AS/standalone/deployments (Manual mode only) touch $AS/standalone/deployments/example.war.dodeploy
F)仅限手动模式:用当前部署的解压缩内容替换 一个新版本并部署它:
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)仅限自动部署模式:替换当前部署的解压缩内容 使用新版本并部署它:
touch $AS/standalone/deployments/example.war.skipdeploy cp -r target/example.war/ $AS/standalone/deployments rm $AS/standalone/deployments/example.war.skipdeploy
H)仅手动模式:实时替换当前部署的部分 未经重新部署的解压缩内容:
cp -r target/example.war/foo.html $AS/standalone/deployments/example.war
I)仅限自动部署模式:实时替换当前部署的部分 未经重新部署的解压缩内容:
touch $AS/standalone/deployments/example.war.skipdeploy cp -r target/example.war/foo.html $AS/standalone/deployments/example.war
J)手动或自动部署模式:重新部署当前部署的内容 (即在没有内容变化的情况下退回):
touch $AS/standalone/deployments/example.war.dodeploy
K)仅限自动部署模式:重新部署当前部署的内容(即 在没有内容更改的情况下退回):
touch $AS/standalone/deployments/example.war
在https://docs.jboss.org/author/display/AS71/Application+deployment?_sscc=t
了解详情