Java Tomcat Script

Source: Internet
Author: User

Thread-Private Memory area:

Java Virtual machine stacks and program counters


JDK monitoring and fault handling tools:

JPS:JVM process Status Tool: Displays a list of all hostspot virtual machine processes within a specified system

JSTAT:JVM Statistics monitoring Tool: Mobile and display hostsport virtual machine All aspects of running data

Jinfo: displaying virtual machine information

Jmap: Generating a memory snapshot of a hostspot virtual machine



Visualization tools:

JVISUALVM:

Jconsole:java Monitoring and Management console


Tomcat Init script

Java_home=/usr/local/java

Catalina_home=/data/tomcat

Export Java_home Catalina_home

EXEC $CATAlINA _home/bin/catalina.sh $*


Chkconfig--add Tomcat

Chkconfig--list Tomcat


Want to write a system initialization script, Ah, do not know how to write, write a few pen.

#!/bin/bash# Close iptables firewall function stop_iptables  ()  {    iptables -f     /etc/init.d/iptables save >> /dev/null     Chkconfig  iptables off} #关闭selinux防火墙function  stop_selinux  ()  {     setenforce 0 > /dev/null 2>&1    sed -i   '/^selinux=/s/=.*/=disabled/'  /etc/selinux/config} #修改系统打开文件数和最大连接数function  command_max_file   ()  {    sed -i  ' $a  \*            soft   nofile        65535 '  /etc/security/limits.conf    sed -i  ' $a  \*            hard   nofile         65535 '  /etc/security/limits.conf    sed -i  ' $a  \*            soft   noproc        20480 '  /etc /security/limits.conf    sed -i  ' $a  \*            hard   noproc         65535 '  /etc/security/limits.conf}function create_user  ()  {    read  -p  "Enter the user you want to create:"  command_user    /usr/sbin/useradd  $command _user  -g  $command _user    read -p  "Do you give $command_user sudo permission: (y/n)"   chose    if [  "$chose"  =  "y"  ];then         /bin/sed -i  '/^root/a\ $command _user    all= (All)     nopasswd: all ' &Nbsp;/etc/sudoers    fi    stop_iptables    stop_ Selinux    command_max_file}create_user



This article is from the "Ant" Blog, please be sure to keep this source http://215687833.blog.51cto.com/6724358/1907653

Java Tomcat Script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.