x64位系统安装Nginx+Tomcat(3)

11.开启nginx和tomcat

[root@Web-175 ~]# /opt/tomcat3/bin/startup.sh
Using CATALINA_BASE: /opt/tomcat3
Using CATALINA_HOME: /opt/tomcat3
Using CATALINA_TMPDIR: /opt/tomcat3/temp
Using JRE_HOME: /opt/jdk1.6.0_25
Using CLASSPATH: /opt/tomcat3/bin/bootstrap.jar:/opt/tomcat3/bin/tomcat-juli.jar
[root@Web-175 ~]# /opt/nginx6/sbin/nginx -t
the configuration file /opt/nginx6/conf/nginx.conf syntax is ok
configuration file /opt/nginx6/conf/nginx.conf test issuccessful
[root@Web-175 ~]# /opt/nginx6/sbin/nginx

12.查看下是否已经开启成功

[root@Web-175 ~]# ps -ef | grep Java
root 3684 1 68 15:51 pts/0 00:01:04/opt/jdk1.6.0_25/bin/java-Djava.util.logging.config.file=/opt/tomcat3/conf/logging.properties -server-Djava.awt.headless=true -Xms728m -Xmx1024m -XX:PermSize=128m-XX:MaxPermSize=256m -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager-Djava.endorsed.dirs=/opt/tomcat3/endorsed -classpath/opt/tomcat3/bin/bootstrap.jar:/opt/tomcat3/bin/tomcat-juli.jar-Dcatalina.base=/opt/tomcat3 -Dcatalina.home=/opt/tomcat3-Djava.io.tmpdir=/opt/tomcat3/temp org.apache.catalina.startup.Bootstrap start
root 3745 3427 015:52 pts/0 00:00:00 grep java
[root@Web-175 ~]# ps -ef | grep nginx
root 3711 1 015:51 ? 00:00:00 nginx: masterprocess /opt/nginx6/sbin/nginx
nobody 3712 3711 015:51 ? 00:00:00 nginx: worker process
nobody 3713 3711 015:51 ? 00:00:00 nginx: workerprocess
nobody 3714 3711 015:51 ? 00:00:00 nginx: workerprocess
nobody 3715 3711 015:51 ? 00:00:00 nginx: workerprocess
nobody 3716 3711 015:51 ? 00:00:00 nginx: cachemanager process
root 3747 3427 015:53 pts/0 00:00:00 grep nginx

查看下tomcat的日志,是否正常

[root@Web-175 ~]# tail -f /opt/tomcat3/logs/catalina.out
2013-10-16 15:51:48.636 -- LoopQuerierServiceJoinImpl: 0 个注册、评论事件,不需要处理。
2013-10-16 15:51:48.731 -- eventLog [130009] is handling byWeb-175#0
2013-10-16 15:51:48.918 -- eventLog [130008] is handling byWeb-175#0
2013-10-16 15:51:48.988 -- eventLog [130010] is handling byWeb-175#0
2013-10-16 15:51:49.056 -- 这 3 条记录由交线程Web-175#0 处理完
2013-10-16 15:51:51com.sun.xml.ws.transport.http.servlet.WSServletContextListenercontextInitialized
信息: WSSERVLET12: JAX-WS 上下文监听程序正在初始化
2013-10-16 15:51:52com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
信息: WSSERVLET14: JAX-WS servlet 正在初始化
2013-10-16 15:51:57.449 -- 有 0 条 订单加分 order 记录,不需要处理。
2013-10-16 15:52:21 org.apache.catalina.util.SessionIdGeneratorcreateSecureRandom
信息: Creation of SecureRandom instance for session ID generation using[SHA1PRNG] took [29,220] milliseconds.
2013-10-16 15:52:21de.javakaffee.web.msm.MemcachedSessionService startInternal
信息: MemcachedSessionService starts initialization... (configured nodesdefinition n1:192.168.8.170:11211,n2:192.168.8.169:11211, failover nodes null)
2013-10-16 15:52:21.724 INFOnet.spy.memcached.MemcachedConnection: Added {QA sa=/192.168.8.170:11211, #Rops=0, #Wops=0, #iq=0, topRop=null,topWop=null, toWrite=0, interested=0} to connect queue
2013-10-16 15:52:21.725 INFO net.spy.memcached.MemcachedConnection: Added {QA sa=/192.168.8.169:11211, #Rops=0,#Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0} to connectqueue
2013-10-16 15:52:21de.javakaffee.web.msm.RequestTrackingHostValve <init>
信息: Setting ignorePattern to .*\.(ico|png|gif|jpg|css|js)$
2013-10-16 15:52:21.735 INFOnet.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@1a6261c9
2013-10-16 15:52:21.736 INFOnet.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl@33e1830b
2013-10-16 15:52:21de.javakaffee.web.msm.MemcachedSessionService setLockingMode
信息: Setting lockingMode to NONE
2013-10-16 15:52:21de.javakaffee.web.msm.MemcachedSessionService createTranscoderFactory
信息: Creating transcoder factoryde.javakaffee.web.msm.JavaSerializationTranscoderFactory
2013-10-16 15:52:21de.javakaffee.web.msm.MemcachedSessionService startInternal
信息: MemcachedSessionService finished initialization, sticky false,operation timeout 1000, with node ids [n1, n2] and failover node ids []
2013-10-16 15:52:23 org.apache.catalina.startup.HostConfigdeployDirectory
信息: Deploying web application directory/opt/tomcat3/webapps/host-manager
2013-10-16 15:52:23 org.apache.tomcat.util.digester.DigesterendElement
警告: No rules found matching'Context/Context/Manager'.
2013-10-16 15:52:23 org.apache.tomcat.util.digester.DigesterendElement
警告: No rules found matching'Context/Context'.
2013-10-16 15:52:23 org.apache.catalina.startup.HostConfigdeployDirectory
信息: Deploying web application directory /opt/tomcat3/webapps/manager
2013-10-16 15:52:23 org.apache.tomcat.util.digester.DigesterendElement
警告: No rules found matching'Context/Context/Manager'.
2013-10-16 15:52:23 org.apache.tomcat.util.digester.DigesterendElement
警告: No rules found matching'Context/Context'.
2013-10-16 15:52:23 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-9080"]
2013-10-16 15:52:23 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
2013-10-16 15:52:23 org.apache.catalina.startup.Catalina start
信息: Server startup in 58531 ms
从tomcat的日志来看,是正常的,说明tomcat正常开启,而且运行正常。

到此为止,nginx+tomcat的环境,已经搭建完毕。

测试:

测试正常,说明nginx结合tomcat,安装成功了。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/ee454697541901fd4c3eceb0ef412aee.html