[英]How to deploy a Java web application on raspberry pi
我已经使用netbeans 8创建了一个Java Web应用程序。该项目运行正常。
我需要帮助将我的项目放到raspberry pi上,因此当我在Web浏览器中键入IP地址时,它应该运行我的Java Web应用程序。
另外,我需要将树莓派作为Web服务器需要做些什么。
在我的树莓派中,我已经有Java 8,apache2,tomcat8。
步骤1按照Digital Ocean的说明进行操作并安装tomcat。
Step 2 After installing in netbeans, Go to Run->Clean and build.
Step 3 Goto Project folder and find the projectname.war file in dist folder.
Step 4 Rename the war to ROOT.war.
Step 5 Assuming you have followed all the procedure as mentioned in digital
ocean from step 1, goto http://localhost:8080/
Step 6. Click Manage App .
Step 7 At the bottom there will be a browse button under upload war. Click it
Step 8 After selecting ROOT.war . Click deploy.
妳去 现在,从本地网络中的任何浏览器输入http:// ip_of_pi:8080来查看您的站点。
进行端口转发以全局访问它。 (可选的)。
PS:-如果在步骤1指南中的curl -O行中发现错误,请通过从Tomcat官方网站手动下载tomcat.tar来替换该步骤。 Tomcat的官方站点到tmp文件夹。
希望对别人有帮助
从/ home / pi https://tomcat.apache.org/download-80.cgi#8.0.53下载Tomcat8
$ cd $ HOME
$ sudo nano tomcat-users.xml添加添加
$ cd $ HOME / tomcat8 / bin
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.