从Windows 10 Bash Shell运行Tomcat [英] Running Tomcat from windows 10 bash shell

查看:63
本文介绍了从Windows 10 Bash Shell运行Tomcat的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows10 bash shell上安装了tomcat服务器.尽管它说apache正在运行..它没有在浏览器中打开管理面板.浏览器说无法建立连接"

I installed tomcat server on windows10 bash shell. Though it says apache is running.. its not opening admin panel in browser. Browser says 'Connection can't be reached'

以前有人尝试过吗?请分享您的输入.

Have someone tried this ever before? Please share your inputs.

谢谢

推荐答案

我假设您是指Windows 10上的Bash for Windows(Ubuntu).是的,可以从Windows的Bash安装并运行Tomcat服务器,而无需执行以下操作:在Windows环境中安装Tomcat.

I am assuming you are referring to Bash for Windows (Ubuntu) on Windows 10. Yes Tomcat server can be installed and run from Bash for Windows with no need to install Tomcat in the Windows environment.

首先,您可能要检查是否有任何本地服务器在Windows 10端口8080(Tomcat的默认端口)上运行,或者正在为Tomcat配置端口.

First, you may want to check if any local server is running on Windows 10 port 8080 - the default port for Tomcat, or whatever port you are configuring Tomcat for.

其次,打开Windows的BASH并安装Java.我使用了Oracle Java JDK 8(http://www.oracle.com/technetwork/java/javase/downloads/index.html)并下载了tar.gz文件.

Second, open BASH for Windows and install Java. I used Oracle Java JDK 8 (http://www.oracle.com/technetwork/java/javase/downloads/index.html) and downloaded the tar.gz file.

解压缩tar.gz并复制到/usr/local/java之类的标准目录或/opt/目录中,以方便访问.创建链接到您的java位置的JAVA_HOME和JRE_HOME环境变量.

Extract the tar.gz and copy to a standard directory like /usr/local/java or in the /opt/ directory for easy access. Create JAVA_HOME and JRE_HOME environment variables that link to your java location.

我还更新了映射java,javac和javaws的替代方法.您可以使用此链接来提供帮助(http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre)

I also updated the alternatives to map java, javac, and javaws. You can use this link to assist (http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre)

然后下载Tomcat的tar.gz.同样,我将Tomcat 8.5用于我的场景,并将文件提取到您选择的目录中.

Then download the tar.gz of Tomcat. Again, I used Tomcat 8.5 for my scenario and extract the files to your chosen directory.

最后,运行位于tomcat提取文件夹的bin文件夹中的启动脚本.您应该有一个可用的Tomcat版本.

Last, run the startup script located in the bin folder of the tomcat extracted folder. You should have a working Tomcat version.

使用curl命令进行验证-curl localhost:8080

Use the curl command to validate - curl localhost:8080

如果要更改管理员权限,请编辑提取的tomcat目录中conf文件夹中的tomcat-users.xml文件.

If you want to change the admin privileges, edit the tomcat-users.xml file located in the conf folder within the extracted tomcat directory.

也可以通过Windows系统而不是仅通过Bash for Windows CLI来访问tomcat服务器.

Access to the tomcat server can also be done through the Windows system and not just through the Bash for Windows CLI.

希望这会有所帮助!

这篇关于从Windows 10 Bash Shell运行Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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