You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Amazon Linux环境下Tomcat版本查询、服务启动及开机自启配置咨询

Tomcat 8.5 Management on Amazon Linux (Service Start, Auto-Start, Version Check)

Hey there! Let's walk through your Tomcat questions step by step, since you're used to the httpd service workflow:

1. Start Tomcat Using service Command (Like httpd)

When you install Tomcat 8.5 via amazon-linux-extras, the package sets up a system service automatically. You can use the same service syntax you know for httpd:

  • Start Tomcat: sudo service tomcat start
  • Stop Tomcat: sudo service tomcat stop
  • Restart Tomcat: sudo service tomcat restart
  • Check running status: sudo service tomcat status

If the tomcat service isn't found, double-check that your installation completed without errors. You can verify the service exists with this command:
systemctl list-unit-files | grep tomcat

2. Set Tomcat to Auto-Start on Instance Reboot (Like chkconfig httpd on)

Amazon Linux uses systemd by default now, but it still supports legacy chkconfig commands. Here are both options:

Use systemctl to enable auto-start for Tomcat:
sudo systemctl enable tomcat

Confirm the setting took effect with:
systemctl is-enabled tomcat

Option 2: Legacy chkconfig

If you prefer the chkconfig workflow you're used to, run:
sudo chkconfig tomcat on

Verify the auto-start status with:
chkconfig --list tomcat

3. Check Tomcat Version

The simplest way is to use Tomcat's built-in version script. By default, this lives in /usr/share/tomcat/bin:

  • Run the script directly: sudo /usr/share/tomcat/bin/version.sh
  • Or navigate to the bin folder first:
    cd /usr/share/tomcat/bin
    sudo ./version.sh
    

You'll get detailed output including the exact Tomcat version, your JVM version, and system environment info.


内容的提问来源于stack exchange,提问作者Subramanian Lakshmanan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.14 08:54:03