Tomcat configuration JMX in centos 6.5 environment

Summary

Tomcat configuration JMX and related instructions in centos 6.5 environment

Regardless of whether it is the Windows version or the Linux version of Tomcat's personalized parameter configuration (including JMX), the official Tomcat recommended way is to create a new setenv.sh (Linux) or setenv.bat (Windows) script in the Tomcat installation directory/bin to configure. Instead of configuring in tomcat's own script.

Configuration parameters and instructions####

vi setenv.sh
#! /bin/sh
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=10099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=true -Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password -Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access"

Parameter Description:

#! /bin/sh
# Author by itunic
#
# Enable Tomcat JMX connection.
CATALINA_OPTS=-Dcom.sun.management.jmxremote
#
# Set the JMX URL host name or IP address.
 - Djava.rmi.server.hostname=172.16.8.62
#
# Set JMX listening port
 - Dcom.sun.management.jmxremote.port=8849
#
# Set SSL authorization, the value is true or false;-Dcom.sun.management.jmxremote.ssl=false
# 
# Set password for login, the value is true or false;If authorization is required, add the following configuration
# - Dcom.sun.management.jmxremote.authenticate=false
#
# Edit in$CATALINA_BASE / conf / jmxremote.access:-Dcom.sun.management.jmxremote.password.file=../conf/jmxremote.password
#
# Edit password file$ CATALINA_BASE / conf / jmxremote.password:-Dcom.sun.management.jmxremote.access.file=../conf/jmxremote.access

Then create a new jmxremote.password and jmxremote.access file under Tomcat installation/conf, the file name must be named like this.

vi jmxremote.access
# Set user name and permissions
# readonly
# readwrite
# Note: There are only these two permissions, the others do not take effect
monitorRole readonly
controlRole readwrite
vi jmxremote.password
# Set the user name and password, the user name and password must be consistent with the access file
monitorRole tomcat
controlRole tomcat

Set the permissions of the jmxremote.password file

  1. chmod 600  jmxremote.password

Set the operating system hosts mapping, and add the corresponding relationship between the ip to be accessed and the machine name.

# View operating system name
hostname
# View operating system ip
ifconfig
# Set the host correspondence
vi /etc/hosts
192.168.1.2 hostname

test

Use jdk's own jmx monitoring tool jConsole to test whether the configuration is correct

Connection method:

  1. service:jmx:rmi:///jndi/rmi://ip:port/jmxrmi

Recommended Posts

Tomcat configuration JMX in centos 6.5 environment
Centos7.5 configuration java environment installation tomcat explanation
Environment configuration of JDK, mysql and tomcat under Centos7
CentOS configuration git server in VirtualBox
CentOS 7 Tomcat service installation and configuration
Tomcat installation and configuration under CentOS 7 (Tomcat startup)
CentOS7.0 network configuration
CentOS 7.0 network configuration
Centos6.5 install Tomcat
CentOS7 basic configuration
Centos MySQL8 configuration
Installation and configuration of JDK in CentOS 7 system
Build Discuz Forum in LNMP Environment under CentOS7
Build Dedecms website in LNMP environment under CentOS7
Installation and configuration of CentOS 7 in VMware Workstation
Xfs configuration on centos7
CentOS6.7 build LNMP environment
Install MySQL5.7 in centos7
Hadoop environment construction (centos7)
Ubuntu configuration development environment
Centos kernel compilation configuration
lamp (centos7) installation lamp environment
Ubuntu development environment configuration
Centos6.9 install npm environment
Mysql8.0.15 installation configuration (centos7)
CentOS7 install JDK8, tomcat8
Install redis5.0 in CentOS7
Build Hadoop in CentOS
Centos7 configure nodejs environment
KVM virtualization in centos
Rapid deployment of Kubernetes (k8s) cluster in CentOS7 environment
CentOS 7 build LNMP environment
The problem of MySQL import file failure in CentOS environment
[CentOS environment deployment] Java7/Java8 deployment under CentOS
Build docker environment under Centos6.5
Build zabbix monitoring zabbix4.2 in CentOS7.6
Centos mysql installation and configuration
Centos7.4 deployment configuration Elasticsearch5.6 cluster
CentOS 7 install JAVA environment (JDK 1.8)
Centos7.6 method to install Tomcat-8.5.39
SkyWalking study notes (CentOS environment)
Centos7 installation and configuration prometheus
Build zabbix monitoring zabbix4.2 in CentOS7.6
Centos7 set up GitBook environment
CentOS 7.2 deploy Node.js development environment
CentOS install nginx+tomcat+java+mysql operating environment
CentOS6.5 install Java 8 and Tomcat8
CentOS 7 installation and configuration PPTP
CentOS installation and configuration cmake
CentOS 7 user account configuration original
Centos7.5 installation and configuration MongoDB4.0.4
CentOS 7 installation and configuration PPTP
CentOS mysql configuration master-slave replication
Debug Kernel Panic in Centos
CentOS6.5 install Java 8 and Tomcat8
CentOS6.5 install Java 8 and Tomcat8
Centos6 set up GitBook environment
Implementation of CentOS8.0 Network Configuration
CentOS 7 Redis 5.0.8 sentinel mode configuration
CentOS environment installation of Docker
CentOS8 network card configuration file