/$ Cp server. xml server. xml. bak$ Cp web. xml web. xml. bak$ Vi server. xmlConnectionTimeout = "20000"RedirectPort = "8443"URIEncoding = "UTF-8"/>
(2) modify the tomcat2 port number$ Cd/usr/local/tomcat2/conf/$ Cp server. xml server. xml. bak$ Cp web. xml web. xml. bak$ Vi server. xmlConnectionTimeout = "20000"RedirectPort = "8443"URIEncoding = "UTF-8"/>
Tomcat default port remarks:8005: indicates the port used to stop Tomcat8080: indicates the HTTP
Cloud is now a popular technology, and Tomcat is a Web server that people who learn Java are generally exposed to, what if you use Tomcat in a cloud environment? Inevitably, multiple Tomcat will be installed, known as the Tomcat instance, and then managed by multiple Tomcat
Tomcat startup memory settings
The initial space (-XMS) is 1/64 of the physical memory, and the maximum space (-xmx) is 1/4 of the physical memory. You can use options such as-xmn-XMS-xmx provided by JVM.SetIii. Example:Java_opts = "-server-xms800m-xmx800m-XX: permsize = 64 m-XX: maxnewsize = 256 m-XX: maxpermsize = 128 M-djava. AWT. Headless = true"Java_opts = "-server-xms768m-xmx768m-XX: permsize = 128 m-XX: maxpermsize = 256 m-XX:Newsize = 192 m-
/ETC/RCX.D under the load. In addition, you need to/etc/init.d some startup scripts. Export the required environment variables first, for example: Java_home,jre_home, Catalina_home, Catalina_base, and then call $catalina_home/bin/directly. Startup.sh will be able to start successfully.The first step: we create a new file under/ETC/INIT.D Tomcat (need to operate under root privileges)1 sudo vi/etc/init.d/tomcatWrite down the following code,
. " theExit-1 - fi -Retval=$? -Catalina_home= "/usr/local/kencery/tomcat"#tomcat安装目录, what directory do you copy in the directory you are installing + Case"$"inch - start) + if[-F $CATALINA _home/bin/startup.sh]; A Then atecho $ "Starting Tomcat" -$CATALINA _home/bin/start
configuration file. bash_profile, there is a space after the equal sign "=" of the java_home and classpath variable values, which makes the path unrecognizable.
3. in the bin directory of Tomcat, Catalina. the Tomcat memory parameter configuration in the sh file is too large and exceeds the total available memory of the machine. modify it to the appropriate valu
CATALINA_HOME environment variable.And the bin directory has a catalina.bat file, so catalina_home point should be TomcatInstall the root directoryThe Tomcat root directory is then set to the CATALINA_HOME environment variable.At this point, you can start and close the Tomcat server in any directory via Startup.bat, Shutdown.bat.6. Continue reading the Startup.bat file and discover that the Catalina.bat fi
(Bootstrap. Java: 295)At org. Apache. Catalina. startup. Bootstrap. Main (Bootstrap. Java: 433)2009-7-12 15:40:35 org. Apache. Catalina. startup. Catalina startInformation: server startup in 9860 MSKey Information:Java.net. bindexception: address already in use: jvm_bind: 8080Error cause:Port 8080 is occupied by other applications!Solution:Step 1: run the comman
do I make the boot tomcat look like Windows? , the solution is as follows:/home/apache-tomcat-8.0.21/bin#./catalina.sh Run CTRL + C: Can end log printing, but does not affect normal application operation.TOP-C: Windows-like Task Manager.Viewing the Java process: Ps-ef |grep java 3. Setting environment variables I think of this, someone might ask, why set the environment variable. In general, running the T
configuration file
The monitored side tomcat also needs to change the configuration file
[[emailprotected]_Client_56 /]# vim /usr/local/tomcat/bin/catalina.sh #在catalina文件中添加以下内容,端口为12345,hostanme为tomcat被监控的IP地址CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.au
: This article mainly introduces how to precisely access tomcat when the tomcat port is not open to the outside when multiple tomcat servers are used for load balancing, if you are interested in the PHP Tutorial, refer.
Background:
Use Nginx and two Tomcat servers to achieve load balancing, disable
In a Linux system, after Tomcat starts, a lot of information is written to the Catalina.out file by default, and we can track tomcat and related applications running through the Tail-f catalina.out. Under Windows, when we started Tomcat with Startup.bat, we found that the Catalina log was very different from the conten
Generally after the deployment of Tomcat, run for a long time, the Catalina.out file will be more and more large, the stability of the system has caused a certain impact.
This section of the log information can be masked by modifying the Conf/logging.properties log profile.
1catalina.org.apache.juli.filehandler.level = WARNING
1catalina.org.apache.juli.filehandler.directory = ${catalina.base}/logs
1catalina.org.apache.juli.filehandler.prefix =
1 OverviewThis document describes how to optimize Tomcat performance. It can serve as a technical guide for the company's technical staff to optimize the customer's Tomcat System, or provide the customer's technical staff as a guide to their performance tuning.
2. tuning ClassificationBecause Tomcat runs on JVM, we describe T
Windows Server Tomcat console logs are saved to the log file, windowtomcat
In Linux, many messages are written to the catalina. out file by default after Tomcat is started. We can track Tomcat and related applications through tail-f catalina. out. In windows, we use startup.
Initialize the log4j system properly.Log4j:warn See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Logs folder, there are five more log files. Two have content: catalina.out , localhost . Catalina.out is the above words.LocalHost is the record of contextinitialized.When I renamed the log4j.properties above and started Tomcat, there was only one file in logs. The content is empty.Note that Log4j.properties still works.But
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.