如何将战争文件部署到Glassfish? [英] how to deploy war file to Glassfish?
问题描述
我在netbeans中开发了一个 RESTful
web服务,并为我制作了一个 .war
文件。现在我想使用 glassfish
将它部署到我的主机。
网络上有很多关于部署的教程战争档案玻璃鱼(例如),但他们都描述如何部署到本地计算机(本地主机),但正如我所说我想部署到我的网站主机。如何做到这一点?
您应该可以使用管理控制台执行此操作。这是一个旧的文档链接,但它仍然有效:
http://docs.oracle.com/cd/E19798-01/821-1757/ghgjn/index.html
它会告诉你去 http:// localhost:4848
,但你显然需要确保你可以访问管理控制台远程(即用您的主机名替换 localhost
)。
如果不是,您将需要使用命令行 asadmin
命令 change-admin-password
(如果管理员密码未设置 - 它默认为空)通过 enable-secure-admin
来允许远程访问。远程访问控制台只能通过https访问,因此在使用前两个步骤是必需的。
您需要SSH访问您正在使用的服务器启用它 - 但如果您已经拥有SSH访问权限,那么您始终可以使用SCP或FTP将您的WAR传输到服务器,然后按照链接指南中的步骤操作。
I've developed a RESTful
web service in netbeans and it made a .war
file for me. now i want to deploy it to my host using glassfish
.
there are lots of tutorials on the net about deploying war file to glass fish(for example) but they all describe how to deploy to local machine(localhost), but as i mentioned i want to deploy to my website host. how to do that?
You should be able to do that using the admin console. This is an old documentation link, but it is still valid:
http://docs.oracle.com/cd/E19798-01/821-1757/ghgjn/index.html
It tells you to go to http://localhost:4848
but you will obviously need to make sure that you can access the admin console remotely (i.e. replacing localhost
with your hostname).
If not, you will need to use the command-line asadmin
commands change-admin-password
(if the admin password hasn't been set - it defaults to nothing) follwed by enable-secure-admin
to allow remote access. Remote access to the console is only allowed over https, so these two steps are necessary before you can use it.
You will need SSH access to the server you are using to enable that - but if you already have SSH access then you can always use SCP or FTP to transfer your WAR to the server and then follow the steps in the guide you linked to.
这篇关于如何将战争文件部署到Glassfish?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!