How to check the Apache Tomcat and Apache Httpd version in Linux

Tomcat versions can be obtained by version.sh in bin directory of TOMCAT_HOME. HTTPD component version can be viewed using httpd -V command in sbin directory of HTTPD_HOME.

# [TOMCAT_HOME]/bin/version.sh
# [HTTPD_HOME]/sbin/httpd -V

For example:

Apache Tomcat

$ /opt/jws3/tomcat8/bin/version.sh
Using CATALINA_BASE:   /opt/jws3/tomcat8
Using CATALINA_HOME:   /opt/jws3/tomcat8
Using CATALINA_TMPDIR: /opt/jws3/tomcat8/temp
Using JRE_HOME:        /home/rhel7/jdk8
Using CLASSPATH:       /opt/jws3/tomcat8/bin/bootstrap.jar:/opt/jws3/tomcat8/bin/tomcat-juli.jar
Server version: Apache Tomcat/8.0.18
Server built:   Aug 11 2015 14:53:16 UTC
Server number:  8.0.18-25_patch_00.ep7.el7.-patch-00
OS Name:        Linux
OS Version:     3.10.0-514.10.2.el7.x86_64
Architecture:   amd64
JVM Version:    1.8.0_73-b02
JVM Vendor:     Oracle Corporation

Apache Httpd

$ ./httpd -v
Server version: Apache/2.4.23 (Red Hat)
Server built:   Nov  6 2017 12:47:49