1. download tomcat from http://tomcat.apache.org/download-70.cgi , please download stable version.
2. uncompress the downloaded installation file to /usr.
3. go to the conf directory and modify the connector port in web.xml if necessary.
4. change tomcat-users.xml if want to access by browser
example:
<tomcat-users>
<user username="both" password="tomcat" roles="tomcat,role1,manager-gui"/>
</tomcat-users>
5. config the Environment Variable as follows:
a. vi /etc/profile
b. CATALINA_BASE = /usr/apache-tomcat-*.*.*
CATALINA_HOME = /usr/apache-tomcat-*.*.*
c. export CATALINA_BASE
export CATALINA_HOME
d. source /etc/profile
6. use ./startup.sh to run.
configure more than one tomcat on one server by following steps:
1. uncompress the installation file to a new directory, for example, /usr/tomcatServer2
2. add two new environment variables :
a. vi /etc/profile
b. CATALINA_BASE2 = /usr/tomcatServer2
CATALINA_HOME2 = /usr/tomcatServer2
c. export CATALINA_BASE2
export CATALINA_HOME2
d. source /etc/profile
3. edit tomcatServer2/bin/catalina.sh, change all CATALINA_BASE and CATALINA_HOME into CATALINA_BASE2 and CATALINA_HOME2 respectively
4. edit tomcatServer2/conf/server.xml, change all the port number from 8*** to 9***
example:
<Connector port="9080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="9443" URIEncoding='UTF-8'/>
=====================
<Connector port="9009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="9443" URIEncoding='UTF-8'/>
5. cd to /usr/tomcatServer2/bin, then use command "sh startup.sh" to run tomcat.
reference:
http://www.cnblogs.com/itolssy/archive/2008/08/27/1278041.html
问:子网掩码为255.255.224,求所能容纳的最大主机数目。分别是什么?
1.首先,255.255.255.224转换成二进制为11111111,11111111,11111111,11100000(5个可用位0)
那么它的网内最大主机数目就是2^5 = 32,但是,别忘了,网络地址可广播地址不可用故32-2=30(个)
那么他们的主机ip地址分别是什么呢?
首先,0~255可以分成几个网络段?255/30≈8
则8段分别为
126.65.13.0 126.65.13.1~ 126.65.13.30
126.65.13.32 126.65.13.33~ 126.65.13.62
126.65.13.64 126.65.13.65~ 126.65.13.94
126.65.13.96 126.65.13.97~ 126.65.13.126
126.65.13.128 126.65.13.129~ 126.65.13.158
126.65.13.160 126.65.13.161~ 126.65.13.190
126.65.13.192 126.65.13.193~ 126.65.13.222
126.65.13.224 126.65.13.225~ 126.65.13.254
各网段的广播地址:
126.65.13.31
126.65.13.63
126.65.13.95
126.65.13.127
126.65.13.159
126.65.13.191
126.65.13.223
126.65.13.255
如果得知其中一个ip为126.65.13.45
由此可知,主机地址分别为126.65.13.33~ 126.65.13.62
make编译时,总是提示:
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
make: Warning: File `mtrpcServer/real_pro.cpp' has modification time 41 s in the future
原因:系统时间和当前时间有差距
解决办法:更改系统时间为当前时间
[root@QAServer autoQAServer]# date -s 10:36
Fri May 10 10:36:00 HKT 2013