Installation and configuration method of Nginx+tomcatLVS cluster

Installation and configuration method of Nginx+tomcatLVS cluster

LVS cluster nginx+tomcat Project topology map: 1. Install nginx + tomcat The configurations on the 192.168.1.248 and 192.168.1.249 servers are as follows: 1. JDK installation Put the downloaded installer in the /soft directory cd /soft chmod a+x jdk-6u23-linux-i586.bin ./jdk-6u23-linux-i586.bin mkdir -p /data/conf mv jdk1.6.0_23/ /data/conf/jdk Delete the old version from the system rm -rf /usr/bin/java rm -rf /usr/bin/javac Create a link, set a new version ln -s /data/conf/jdk/bin/java /usr/bin/java ln -s /data/conf/jdk/bin/javac /usr/bin/javac View new version information java-version javac-version Check whether the jdk version is 1.6. At this point, the JDK has been installed 2. Tomcat installation Unzip the compressed file cd /soft tar xzvf apache-tomcat-6.0.32.tar.gz mv apache-tomcat-6.0.32 /data/conf/tomcat cd /data/conf/tomcat/bin/ Add user useradd webuser -s /sbin/nologin chown -R webuser:webuser /data/ tomcat optimization options (1) Add tomcat administrator # vi /usr/local/www/tomcat/conf/tomcat-users.xml Add in the middle of Where username=”tomcat” is the username and password=”li147258369″ is the password (2) Modify the JVM JAVA_OPTS=”-Xms1024m -Xmx1024m -Xmn256m -Djava.awt.headless=true” (3) server.xml parameter modification <Connector port="8080" protocol="HTTP/1.1"  maxHttpHeaderSize=”8192″ useBodyEncodingForURI=”true” maxThreads=”600″ Maximum number of connections redirectPort=”8443″ enableLookups=”false” disable DNS lookups compression=”on” compressiOnMinSize=”2048″ compression, compression size compressableMimeType=”text/html,text/xml,text/Javascript,text/css,text/plain”  cOnconnectionTimeout=”20000″ disableUploadTimeout=”true” /> Set the environment directory vi /etc/profile TOMCAT_HOME=/data/conf/tomcat JAVA_HOME=/data/conf/jdk JRE_HOME=/data/conf/jdk/jre export JAVA_HOME JRE_HOME TOMCAT_HOME Backup tomcat configuration file cd…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索