tomcat服务&&tomcat多实例部署

tomcat服务&&tomcat多实例部署

文章目录

  • tomcat服务&&tomcat多实例部署
    • 1.简介
    • 2.优缺点
      • 优点:
      • 缺点:
    • 3.工作原理
    • 4.工作流程
    • 5.tomcat服务部署
      • 5.1.java环境安装
      • 5.2.拉取tomcat软件包
      • 5.3.解压部署
      • 5.4.启动tomcat服务
      • 5.5.访问tomcat的web页面
      • 5.6.尝试访问webapps目录中其他项目
    • 6.tomcat多实例部署(在同一台主机上部署多个tomcat服务)
      • 环境说明:
      • 6.1.配置前准备工作
      • 6.3.安装java环境
      • 6.4.拉取tomcat软件包
      • 6.5.解压安装tomcat
      • 6.6.更改端口号
      • 6.7.开启服务
      • 6.8.配置多实例测试网页
      • 6.9.访问测试
    • 总结:

1.简介

Tomcat是一个开源的Java Servlet容器,可以作为Java Web应用程序的运行环境。它是Apache软件基金会的一个重要项目,具有高性能、稳定可靠以及跨平台等特点。它实现了Java Servlet和JavaServer Pages(JSP)规范,并提供了一个运行环境,使得Java代码可以在Web服务器上执行。

tomcat就是传说中的中间件之一,tomcat本身是一个容器,专门用来运行java程序,java语言开发的网页.jsp就应该运行于tomcat中。而tomcat本身的运行也依赖于jdk环境。

2.优缺点

优点:

  1. 开源免费:Tomcat是一个开源项目,可以免费使用,这使得它成为了一个广受欢迎的Java Web应用服务器。
  2. 跨平台:Tomcat可以在各种操作系统上运行,包括Windows、Linux、macOS等。
  3. 轻量级:相比于其他一些Java应用服务器(如WebLogic、WebSphere等),Tomcat相对轻量级,资源占用较少,启动速度也相对较快。
  4. 灵活性:Tomcat可以作为一个独立的Web服务器使用,也可以与其他Web服务器(如Apache)配合使用,形成一个强大的Web服务器架构。

缺点:

  • 功能相对有限:相对于一些商业的Java应用服务器,Tomcat在一些高级特性和功能方面可能有所欠缺,比如分布式事务、集群等方面的支持。
  • 管理界面相对简陋:Tomcat的管理界面相对简单,对于一些高级的管理需求可能不够满足。

3.工作原理

  1. omcat的工作原理基于Java Servlet和JavaServer Pages(JSP)规范,它充当了一个Java Web应用程序的运行环境和Web服务器。以下是Tomcat的工作原理的详细说明:

    1. 启动Tomcat:Tomcat作为一个独立的Java应用程序运行。通常,你会使用命令行或启动脚本来启动Tomcat。一旦Tomcat启动,它开始监听HTTP请求的到达。
    2. 连接器(Connectors):Tomcat通过连接器来监听HTTP请求。连接器是Tomcat的组件,负责处理网络连接和接收HTTP请求。常见的连接器包括HTTP连接器(用于处理HTTP请求)和AJP连接器(用于与其他Web服务器如Apache连接)。每个连接器通常监听一个特定的端口,比如HTTP连接器默认监听8080端口。
    3. 容器(Containers):Tomcat包含了两种主要的容器:引擎(Engine)和主机(Host)。引擎负责处理多个主机,每个主机代表一个独立的域名或虚拟主机。主机包含一个或多个上下文(Context),每个上下文对应一个Web应用程序。容器负责处理Servlet和JSP的生命周期管理、请求分发和响应收集。
    4. Servlet容器:当一个HTTP请求到达Tomcat后,Tomcat会根据请求的URL来确定将请求交给哪个Servlet进行处理。Servlet容器是Tomcat的一部分,它负责管理Servlet的生命周期,包括实例化、初始化、调用和销毁。Servlet容器还负责将请求传递给适当的Servlet,并将Servlet生成的响应返回给客户端。
    5. JSP引擎:Tomcat还包含了一个JSP引擎,用于处理JSP页面。当一个JSP页面被请求时,JSP引擎将JSP编译成Servlet,并交给Servlet容器来处理。生成的Servlet负责处理JSP页面的动态内容生成。
    6. 部署描述符(Deployment Descriptors):每个Web应用程序通常包括一个部署描述符(通常是一个web.xml文件),它包含了关于应用程序的配置信息,包括Servlet映射、过滤器配置、监听器配置等。Tomcat会读取这些描述符以了解如何处理请求。
    7. 请求处理流程
      • Tomcat接收到HTTP请求后,连接器将请求传递给适当的主机和上下文。
      • 主机和上下文确定哪个Servlet应该处理请求,并将请求传递给Servlet容器。
      • Servlet容器实例化和初始化Servlet,调用其service()方法来处理请求。
      • Servlet生成响应并将其返回给Servlet容器。
      • Servlet容器将响应返回给主机和连接器,最终发送给客户端。
    8. 关闭Tomcat:当不再需要Tomcat服务时,你可以通过命令行或脚本来关闭Tomcat。Tomcat会执行关闭过程,释放资源并停止监听HTTP请求。

    总之,Tomcat的工作原理涉及连接器、容器、Servlet容器、JSP引擎以及部署描述符等多个组件,它们协同工作来处理HTTP请求,将请求传递给适当的Servlet或JSP,生成响应并将其返回给客户端。这个过程使得Tomcat成为一个强大的Java Web应用服务器,用于部署和运行Java Web应用程序。

4.工作流程

tomcat的工作原理基于Java Servlet和JSP规范。它充当一个Web服务器,接收HTTP请求并将其传递给合适的Servlet或JSP进行处理。以下是Tomcat的基本工作流程:

  1. 接收请求:Tomcat作为一个Web服务器监听指定的端口(默认为80或8080)。当一个HTTP请求到达时,Tomcat会接收并解析它。
  2. 请求分发:根据URL和部署在Tomcat中的应用程序配置,Tomcat会决定将请求交给哪个Servlet或JSP进行处理。
  3. Servlet处理:如果请求是一个Servlet请求,Tomcat会将请求信息传递给相应的Servlet。Servlet会处理请求并生成响应,然后将其发送回Tomcat。
  4. JSP处理:如果请求是一个JSP请求,Tomcat会将JSP文件编译成一个Servlet,然后将请求信息传递给这个Servlet进行处理。Servlet再生成响应并将其返回给Tomcat。
  5. 响应传递:Tomcat接收到Servlet或JSP生成的响应后,将其传递回客户端。

5.tomcat服务部署

服务器 IP地址 系统版本 tomcat版本
tomcat 192.168.195.137 centos 8 apache-tomcat-9.0.80.tar.gz

首先关闭防火墙和selinux

[root@tomcat ~]# systemctl disable --now firewalld.service 
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@tomcat ~]# setenforce 0
[root@tomcat ~]# vim /etc/selinux/config 
[root@tomcat ~]# grep '^SELINUX=' /etc/selinux/config
SELINUX=disabled

5.1.java环境安装

JDK(Java Development Kit)和JRE(Java Runtime Environment)是Java开发和运行环境的两个重要组成部分,它们之间有以下区别:

JDK:

  1. 功能:JDK是Java开发工具包,提供了开发Java应用程序所需的工具和资源,包括编译器、调试器、开发文档、示例代码等。
  2. 面向开发者:JDK主要面向Java开发者,用于编写、编译和调试Java代码。
  3. 包含内容:JDK包含JRE的所有内容,并且还包含了用于开发Java应用程序的额外工具和库。

JRE:

  1. 功能:JRE是Java运行环境,提供了Java应用程序运行所需的运行时环境和必要的库文件。
  2. 面向用户:JRE主要面向普通用户,用于执行和运行Java应用程序。
  3. 包含内容:JRE包含Java虚拟机(JVM)和Java类库,可以执行Java程序,但不包含用于开发Java应用程序的工具和资源。

简而言之,JDK适用于开发者,提供了编译、调试和开发所需的工具和库。而JRE适用于用户,用于运行Java应用程序,不包含开发工具。如果你只是要运行Java程序,只需要安装JRE即可。如果你要进行Java应用程序的开发,需要安装JDK。

//安装jdk环境
[root@tomcat ~]# rm -rf /etc/yum.repos.d/*
[root@tomcat ~]# curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
[root@tomcat ~]# yum makecache
[root@tomcat ~]# yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel wget vim
省略 . . .

//查看安装的版本,能够查看到版本则说明安装成功
[root@tomcat ~]# java -version
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (build 25.312-b07, mixed mode)

5.2.拉取tomcat软件包

进入tomcat官网

Apache Tomcat® - Welcome!
tomcat服务&&tomcat多实例部署_第1张图片
tomcat服务&&tomcat多实例部署_第2张图片
tomcat服务&&tomcat多实例部署_第3张图片
tomcat服务&&tomcat多实例部署_第4张图片
tomcat服务&&tomcat多实例部署_第5张图片

//拉取tomcat软件包
[root@tomcat ~]# wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.80/bin/apache-tomcat-9.0.80.tar.gz
--2023-10-10 13:41:29--  https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.80/bin/apache-tomcat-9.0.80.tar.gz
Resolving archive.apache.org (archive.apache.org)... 65.108.204.189, 2a01:4f9:1a:a084::2
Connecting to archive.apache.org (archive.apache.org)|65.108.204.189|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11692853 (11M) [application/x-gzip]
Saving to: ‘apache-tomcat-9.0.80.tar.gz’

apache-tomcat-9.0.80.tar.gz   100%[===============================================>]  11.15M  25.2KB/s    in 5m 55s  

2023-10-10 13:47:25 (32.1 KB/s) - ‘apache-tomcat-9.0.80.tar.gz’ saved [11692853/11692853]

[root@tomcat ~]# ls
anaconda-ks.cfg  apache-tomcat-9.0.80.tar.gz

5.3.解压部署

//解压至指定目录
[root@tomcat ~]# tar xf apache-tomcat-9.0.80.tar.gz -C /usr/local/
[root@tomcat ~]# ls /usr/local/
apache-tomcat-9.0.80  bin  etc  games  include  lib  lib64  libexec  sbin  share  src

//设置tomcat软链接,方便后续如果更换tomcat版本后也能直接使用
[root@tomcat ~]# cd //usr/local/
[root@tomcat local]# ll
total 0
drwxr-xr-x  9 root root 220 Oct 10 13:49 apache-tomcat-9.0.80
drwxr-xr-x. 2 root root   6 Aug 12  2018 bin
drwxr-xr-x. 2 root root   6 Aug 12  2018 etc
drwxr-xr-x. 2 root root   6 Aug 12  2018 games
drwxr-xr-x. 2 root root   6 Aug 12  2018 include
drwxr-xr-x. 2 root root   6 Aug 12  2018 lib
drwxr-xr-x. 2 root root   6 Aug 12  2018 lib64
drwxr-xr-x. 2 root root   6 Aug 12  2018 libexec
drwxr-xr-x. 2 root root   6 Aug 12  2018 sbin
drwxr-xr-x. 5 root root  49 Jul 20 11:24 share
drwxr-xr-x. 2 root root   6 Aug 12  2018 src
[root@tomcat local]# ln -s apache-tomcat-9.0.80 tomcat
[root@tomcat local]# ll
total 0
drwxr-xr-x  9 root root 220 Oct 10 13:49 apache-tomcat-9.0.80
drwxr-xr-x. 2 root root   6 Aug 12  2018 bin
drwxr-xr-x. 2 root root   6 Aug 12  2018 etc
drwxr-xr-x. 2 root root   6 Aug 12  2018 games
drwxr-xr-x. 2 root root   6 Aug 12  2018 include
drwxr-xr-x. 2 root root   6 Aug 12  2018 lib
drwxr-xr-x. 2 root root   6 Aug 12  2018 lib64
drwxr-xr-x. 2 root root   6 Aug 12  2018 libexec
drwxr-xr-x. 2 root root   6 Aug 12  2018 sbin
drwxr-xr-x. 5 root root  49 Jul 20 11:24 share
drwxr-xr-x. 2 root root   6 Aug 12  2018 src
lrwxrwxrwx  1 root root  20 Oct 10 13:51 tomcat -> apache-tomcat-9.0.80
[root@tomcat local]# cd tomcat/
[root@tomcat tomcat]# pwd
//usr/local/tomcat
[root@tomcat tomcat]# ls
bin           conf             lib      logs    README.md      RUNNING.txt  webapps
BUILDING.txt  CONTRIBUTING.md  LICENSE  NOTICE  RELEASE-NOTES  temp         work
[root@tomcat tomcat]# ls bin/
bootstrap.jar       ciphers.sh                    daemon.sh     setclasspath.bat  startup.sh            version.bat
catalina.bat        commons-daemon.jar            digest.bat    setclasspath.sh   tomcat-juli.jar       version.sh
catalina.sh         commons-daemon-native.tar.gz  digest.sh     shutdown.bat      tomcat-native.tar.gz
catalina-tasks.xml  configtest.bat                makebase.bat  shutdown.sh       tool-wrapper.bat
ciphers.bat         configtest.sh                 makebase.sh   startup.bat       tool-wrapper.sh

上述的bin目录中我们能够用到的catalina.sh、shutdown.sh、version.sh、startup.sh、configtest.sh
这几个执行文件,用途分别是:
catalina.sh 能够关闭和开启服务(常用)
shutdown.sh 只能关闭服务(不是关闭主机)
startup.sh 只能开启服务
version.sh 查看tomcat版本
configtest.sh 测试配置文件是否存在错误,检查配置文件

//将tomcat的lib位置存放在/etc/ld.so.conf/d/下面,命名一个自身名字的文件,方便查找
[root@tomcat tomcat]# ls
bin           conf             lib      logs    README.md      RUNNING.txt  webapps
BUILDING.txt  CONTRIBUTING.md  LICENSE  NOTICE  RELEASE-NOTES  temp         work
[root@tomcat tomcat]# vim /etc/ld.so.conf.d/tomcat.conf
[root@tomcat tomcat]# cat /etc/ld.so.conf.d/tomcat.conf
/usr/local/tomcat/lib
[root@tomcat tomcat]# ldconfig -v
ldconfig: Can't stat /libx32: No such file or directory
ldconfig: Path `/usr/lib' given more than once
ldconfig: Path `/usr/lib64' given more than once
ldconfig: Can't stat /usr/libx32: No such file or directory
/usr/lib64//bind9-export:
	libisccfg-export.so.163 -> libisccfg-export.so.163.0.4
	libisc-export.so.1104 -> libisc-export.so.1104.0.0
	libirs-export.so.161 -> libirs-export.so.161.0.0
	libdns-export.so.1107 -> libdns-export.so.1107.1.0
/usr/local/tomcat/lib:
/lib:
/lib64:

5.4.启动tomcat服务

//使用绝对路径执行/usr/local/tomcat/bin/下面的脚本,tomcat不能写进环境变量,放置后续更改tomcat版本后环境变量仍是之前的tomcat版本
[root@tomcat tomcat]# pwd
//usr/local/tomcat
[root@tomcat tomcat]# cd bin
[root@tomcat bin]# pwd
//usr/local/tomcat/bin
[root@tomcat bin]# ./catalina.sh start
Using CATALINA_BASE:   //usr/local/tomcat
Using CATALINA_HOME:   //usr/local/tomcat
Using CATALINA_TMPDIR: //usr/local/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       //usr/local/tomcat/bin/bootstrap.jar://usr/local/tomcat/bin/tomcat-juli.jar
Using CATALINA_OPTS:   
Tomcat started.
[root@tomcat bin]# ss -antl
State          Recv-Q         Send-Q                      Local Address:Port                 Peer Address:Port        
LISTEN         0              128                               0.0.0.0:22                        0.0.0.0:*           
LISTEN         0              1                      [::ffff:127.0.0.1]:8005                            *:*           
LISTEN         0              100                                     *:8080                            *:*           
LISTEN         0              128                                  [::]:22                           [::]:*
[root@tomcat test]# ps -ef | grep tomcat       //查看tomcat进程
root        1585       1  0 14:02 pts/0    00:00:06 /usr/bin/java -Djava.util.logging.config.file=//usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath //usr/local/tomcat/bin/bootstrap.jar://usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=//usr/local/tomcat -Dcatalina.home=//usr/local/tomcat -Djava.io.tmpdir=//usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root        1640    1455  0 14:22 pts/0    00:00:00 grep --color=auto tomcat

服务启动成功

5.5.访问tomcat的web页面

tomcat服务&&tomcat多实例部署_第6张图片

在部署tomcat过程中,网页存放目录在/usr/local/tomcat/webapps中,里面可以存放我们的网页,也可以放置app软件,而我们上述所访问到的页面则来自webapp目录中的ROOT目录中的项目

[root@tomcat tomcat]# ls
bin           conf             lib      logs    README.md      RUNNING.txt  webapps
BUILDING.txt  CONTRIBUTING.md  LICENSE  NOTICE  RELEASE-NOTES  temp         work
[root@tomcat tomcat]# cd webapps/
[root@tomcat webapps]# ls
docs  examples  host-manager  manager  ROOT

我们新建一个项目目录进行测试

[root@tomcat webapps]# mkdir test && cd test
[root@tomcat test]# vim index.jsp
[root@tomcat test]# cat index.jsp 


        test page<<span class="token operator">/</span>title>
<<span class="token operator">/</span>head>
<body>
        <<span class="token operator">%</span>
            out<span class="token punctuation">.</span>println<span class="token punctuation">(</span><span class="token string">"Hellow World"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token operator">%</span>>
<<span class="token operator">/</span>body>
<<span class="token operator">/</span>html>
<span class="token namespace">[root@tomcat test]</span><span class="token comment"># </span>
</code></pre> 
  <p><strong>访问test项目</strong></p> 
  <p>访问那个项目就在端口后加哪个项目名,不加则默认是ROOT<br> <a href="http://img.e-com-net.com/image/info8/f97a5081b35d49eaa7b2a47def7aa02a.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/f97a5081b35d49eaa7b2a47def7aa02a.jpg" alt="tomcat服务&&tomcat多实例部署_第7张图片" width="650" height="176" style="border:1px solid black;"></a></p> 
  <h4>5.6.尝试访问webapps目录中其他项目</h4> 
  <p><a href="http://img.e-com-net.com/image/info8/badd6658493d466191edb5d1fb047107.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/badd6658493d466191edb5d1fb047107.jpg" alt="tomcat服务&&tomcat多实例部署_第8张图片" width="650" height="127" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/db39b89b5bd0453ba794c6055598a818.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/db39b89b5bd0453ba794c6055598a818.jpg" alt="在这里插入图片描述" width="650" height="100"></a></p> 
  <p><a href="http://img.e-com-net.com/image/info8/301d0139a58440fd829dfdab47b82adc.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/301d0139a58440fd829dfdab47b82adc.jpg" alt="tomcat服务&&tomcat多实例部署_第9张图片" width="650" height="351" style="border:1px solid black;"></a></p> 
  <p>解决方法:</p> 
  <pre><code class="prism language-powershell">进入tomcat的conf目录中修改tomcat-user<span class="token punctuation">.</span>xml文件
<span class="token namespace">[root@tomcat tomcat]</span><span class="token comment"># cd conf/</span>
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># ls</span>
Catalina         catalina<span class="token punctuation">.</span>properties  jaspic-providers<span class="token punctuation">.</span>xml  logging<span class="token punctuation">.</span>properties  tomcat-users<span class="token punctuation">.</span>xml  web<span class="token punctuation">.</span>xml
catalina<span class="token punctuation">.</span>policy  context<span class="token punctuation">.</span>xml          jaspic-providers<span class="token punctuation">.</span>xsd  server<span class="token punctuation">.</span>xml          tomcat-users<span class="token punctuation">.</span>xsd
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># vim tomcat-users.xml</span>
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># tail -3 tomcat-users.xml</span>
<role rolename=<span class="token string">"manager-gui"</span><span class="token operator">/</span>>              <span class="token operator">/</span><span class="token operator">/</span>设置角色
<user username=<span class="token string">"tomcat"</span> password=<span class="token string">"tomcat123"</span> roles=<span class="token string">"manager-gui"</span><span class="token operator">/</span>>  <span class="token operator">/</span><span class="token operator">/</span>设置用户,密码,并指定角色
<<span class="token operator">/</span>tomcat-users>

进入tomcat的项目文件(webapps)中任选一个项目
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># cd ../webapps/</span>
<span class="token namespace">[root@tomcat webapps]</span><span class="token comment"># ls</span>
docs  examples  host-manager  manager  ROOT  test
<span class="token namespace">[root@tomcat webapps]</span><span class="token comment"># cd manager/</span>
<span class="token namespace">[root@tomcat manager]</span><span class="token comment"># ls</span>
css  images  index<span class="token punctuation">.</span>jsp  META-INF  status<span class="token punctuation">.</span>xsd  WEB-INF  xform<span class="token punctuation">.</span>xsl
<span class="token namespace">[root@tomcat manager]</span><span class="token comment"># cd META-INF/</span>
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># ls</span>
context<span class="token punctuation">.</span>xml
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># vim context.xml   //在allow中加入本机的ip网段</span>
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># grep -A1 '<Valve className=' context.xml</span>
  <Valve className=<span class="token string">"org.apache.catalina.valves.RemoteAddrValve"</span>
         allow=<span class="token string">"192\.168\.195\.\d+|127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1"</span> <span class="token operator">/</span>>

<span class="token operator">/</span><span class="token operator">/</span>修改配置文件后重启服务
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># /usr/local/tomcat/bin/catalina.sh stop</span>
<span class="token keyword">Using</span> CATALINA_BASE:   <span class="token operator">/</span>usr/local/tomcat
<span class="token keyword">Using</span> CATALINA_HOME:   <span class="token operator">/</span>usr/local/tomcat
<span class="token keyword">Using</span> CATALINA_TMPDIR: <span class="token operator">/</span>usr/local/tomcat/temp
<span class="token keyword">Using</span> JRE_HOME:        <span class="token operator">/</span>usr
<span class="token keyword">Using</span> CLASSPATH:       <span class="token operator">/</span>usr/local/tomcat/bin/bootstrap<span class="token punctuation">.</span>jar:<span class="token operator">/</span>usr/local/tomcat/bin/tomcat-juli<span class="token punctuation">.</span>jar
<span class="token keyword">Using</span> CATALINA_OPTS:   
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># ss -antl</span>
State          Recv-Q         <span class="token function">Send-Q</span>                   Local Address:Port                   Peer Address:Port         
LISTEN         0              128                            0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:22                          0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:<span class="token operator">*</span>            
LISTEN         0              128                               <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:22                             <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:<span class="token operator">*</span>            
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># ps -ef | grep tomcat</span>
<span class="token function">ps</span> <span class="token operator">-</span>ef <span class="token punctuation">|</span> grep tomcat
root        1839    1455  0 15:06 pts/0    00:00:00 grep <span class="token operator">--</span>color=auto tomcat
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># /usr/local/tomcat/bin/catalina.sh start</span>
<span class="token keyword">Using</span> CATALINA_BASE:   <span class="token operator">/</span>usr/local/tomcat
<span class="token keyword">Using</span> CATALINA_HOME:   <span class="token operator">/</span>usr/local/tomcat
<span class="token keyword">Using</span> CATALINA_TMPDIR: <span class="token operator">/</span>usr/local/tomcat/temp
<span class="token keyword">Using</span> JRE_HOME:        <span class="token operator">/</span>usr
<span class="token keyword">Using</span> CLASSPATH:       <span class="token operator">/</span>usr/local/tomcat/bin/bootstrap<span class="token punctuation">.</span>jar:<span class="token operator">/</span>usr/local/tomcat/bin/tomcat-juli<span class="token punctuation">.</span>jar
<span class="token keyword">Using</span> CATALINA_OPTS:   
Tomcat started<span class="token punctuation">.</span>
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># ss -antl</span>
State          Recv-Q         <span class="token function">Send-Q</span>                      Local Address:Port                 Peer Address:Port        
LISTEN         0              128                               0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:22                        0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:<span class="token operator">*</span>           
LISTEN         0              1                      <span class="token punctuation">[</span>::ffff:127<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1<span class="token punctuation">]</span>:8005                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              100                                     <span class="token operator">*</span>:8080                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              128                                  <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:22                           <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:<span class="token operator">*</span>           
<span class="token namespace">[root@tomcat META-INF]</span><span class="token comment"># ps -ef | grep tomcat</span>
<span class="token function">ps</span> <span class="token operator">-</span>ef <span class="token punctuation">|</span> grep tomcat
root        1852       1 11 15:06 pts/0    00:00:01 <span class="token operator">/</span>usr/bin/java <span class="token operator">-</span>Djava<span class="token punctuation">.</span>util<span class="token punctuation">.</span>logging<span class="token punctuation">.</span>config<span class="token punctuation">.</span>file=<span class="token operator">/</span>usr/local/tomcat/conf/logging<span class="token punctuation">.</span>properties <span class="token operator">-</span>Djava<span class="token punctuation">.</span>util<span class="token punctuation">.</span>logging<span class="token punctuation">.</span>manager=org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>juli<span class="token punctuation">.</span>ClassLoaderLogManager <span class="token operator">-</span>Djdk<span class="token punctuation">.</span>tls<span class="token punctuation">.</span>ephemeralDHKeySize=2048 <span class="token operator">-</span>Djava<span class="token punctuation">.</span>protocol<span class="token punctuation">.</span>handler<span class="token punctuation">.</span>pkgs=org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>catalina<span class="token punctuation">.</span>webresources <span class="token operator">-</span>Dorg<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>catalina<span class="token punctuation">.</span>security<span class="token punctuation">.</span>SecurityListener<span class="token punctuation">.</span>UMASK=0027 <span class="token operator">-</span>Dignore<span class="token punctuation">.</span>endorsed<span class="token punctuation">.</span>dirs= <span class="token operator">-</span>classpath <span class="token operator">/</span>usr/local/tomcat/bin/bootstrap<span class="token punctuation">.</span>jar:<span class="token operator">/</span>usr/local/tomcat/bin/tomcat-juli<span class="token punctuation">.</span>jar <span class="token operator">-</span>Dcatalina<span class="token punctuation">.</span>base=<span class="token operator">/</span>usr/local/tomcat <span class="token operator">-</span>Dcatalina<span class="token punctuation">.</span>home=<span class="token operator">/</span>usr/local/tomcat <span class="token operator">-</span>Djava<span class="token punctuation">.</span>io<span class="token punctuation">.</span>tmpdir=<span class="token operator">/</span>usr/local/tomcat/temp org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>catalina<span class="token punctuation">.</span>startup<span class="token punctuation">.</span>Bootstrap <span class="token function">start</span>
root        1883    1455  0 15:06 pts/0    00:00:00 grep <span class="token operator">--</span>color=auto tomcat
</code></pre> 
  <p><strong>再次访问</strong><br> <a href="http://img.e-com-net.com/image/info8/20a955b5a4ea44abb9fe1792963fa25e.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/20a955b5a4ea44abb9fe1792963fa25e.jpg" alt="tomcat服务&&tomcat多实例部署_第10张图片" width="650" height="176" style="border:1px solid black;"></a></p> 
  <p><a href="http://img.e-com-net.com/image/info8/1ffd488e47f94570b0bdd0a0da6ce3ef.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/1ffd488e47f94570b0bdd0a0da6ce3ef.jpg" alt="tomcat服务&&tomcat多实例部署_第11张图片" width="650" height="341" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/ee35aec090bb4ad7831c369f2ea87eec.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/ee35aec090bb4ad7831c369f2ea87eec.jpg" alt="tomcat服务&&tomcat多实例部署_第12张图片" width="650" height="345" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/f0c87210ffda4d6899b46d19e75715c0.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/f0c87210ffda4d6899b46d19e75715c0.jpg" alt="tomcat服务&&tomcat多实例部署_第13张图片" width="650" height="101" style="border:1px solid black;"></a></p> 
  <p><strong>其他项目目录亦是如此,找到项目文件中的context.xml文件添加本机IP网段即可</strong><br> <a href="http://img.e-com-net.com/image/info8/3d1b80f42e8a48a4a6dd60dfb95a4536.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/3d1b80f42e8a48a4a6dd60dfb95a4536.jpg" alt="tomcat服务&&tomcat多实例部署_第14张图片" width="650" height="111" style="border:1px solid black;"></a><br> <a href="http://img.e-com-net.com/image/info8/59711be330ff4585b53736469ef0c215.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/59711be330ff4585b53736469ef0c215.jpg" alt="tomcat服务&&tomcat多实例部署_第15张图片" width="650" height="161" style="border:1px solid black;"></a></p> 
  <h3>6.tomcat多实例部署(在同一台主机上部署多个tomcat服务)</h3> 
  <h4>环境说明:</h4> 
  <table> 
   <thead> 
    <tr> 
     <th align="center">tomcat实例</th> 
     <th align="center">tomcat版本</th> 
     <th align="center">端口号</th> 
    </tr> 
   </thead> 
   <tbody> 
    <tr> 
     <td align="center">tomcat-1</td> 
     <td align="center">tomcat-9.0.80</td> 
     <td align="center">8005、8080、8443</td> 
    </tr> 
    <tr> 
     <td align="center">tomcat-2</td> 
     <td align="center">tomcat-9.0.80</td> 
     <td align="center">8006、8081、8444</td> 
    </tr> 
   </tbody> 
  </table> 
  <h4>6.1.配置前准备工作</h4> 
  <p><strong>关闭防火墙和seliunx</strong></p> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@tomcat ~]</span><span class="token comment"># systemctl disable --now firewalld.service </span>
Removed <span class="token operator">/</span>etc/systemd/system/multi-user<span class="token punctuation">.</span>target<span class="token punctuation">.</span>wants/firewalld<span class="token punctuation">.</span>service<span class="token punctuation">.</span>
Removed <span class="token operator">/</span>etc/systemd/system/dbus-org<span class="token punctuation">.</span>fedoraproject<span class="token punctuation">.</span>FirewallD1<span class="token punctuation">.</span>service<span class="token punctuation">.</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># setenforce 0</span>
</code></pre> 
  <p><strong>配置yum源,建议使用阿里云的centos8的源</strong></p> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@tomcat ~]</span><span class="token comment"># rm -rf /etc/yum.repos.d/*</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># yum clean all</span>
Updating Subscription Management repositories<span class="token punctuation">.</span>
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management<span class="token punctuation">.</span> You can use subscription-manager to register<span class="token punctuation">.</span>
12 files removed
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># yum makecache</span>
</code></pre> 
  <h4>6.3.安装java环境</h4> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@tomcat ~]</span><span class="token comment"># yum -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel wget vim</span>
</code></pre> 
  <h4>6.4.拉取tomcat软件包</h4> 
  <pre><code class="prism language-powershell"><span class="token namespace">[root@tomcat ~]</span><span class="token comment"># wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.80/bin/apache-tomcat-9.0.80.tar.gz</span>
<span class="token operator">--</span>2023-10-11 10:29:26-<span class="token operator">-</span>  https:<span class="token operator">/</span><span class="token operator">/</span>archive<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>org/dist/tomcat/tomcat-9/v9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80/bin/apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz
Resolving archive<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>org <span class="token punctuation">(</span>archive<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>org<span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> 65<span class="token punctuation">.</span>108<span class="token punctuation">.</span>204<span class="token punctuation">.</span>189<span class="token punctuation">,</span> 2a01:4f9:1a:a084::2
Connecting to archive<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>org <span class="token punctuation">(</span>archive<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>org<span class="token punctuation">)</span><span class="token punctuation">|</span>65<span class="token punctuation">.</span>108<span class="token punctuation">.</span>204<span class="token punctuation">.</span>189<span class="token punctuation">|</span>:443<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> connected<span class="token punctuation">.</span>
HTTP request sent<span class="token punctuation">,</span> awaiting response<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span> 200 OK
Length: 11692853 <span class="token punctuation">(</span>11M<span class="token punctuation">)</span> <span class="token namespace">[application/x-gzip]</span>
Saving to: ‘apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz’

apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz   100%<span class="token punctuation">[</span>===============================================><span class="token punctuation">]</span>  11<span class="token punctuation">.</span>15M   358KB/s    in 57s     

2023-10-11 10:30:25 <span class="token punctuation">(</span>199 KB/s<span class="token punctuation">)</span> <span class="token operator">-</span> ‘apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz’ saved <span class="token punctuation">[</span>11692853/11692853<span class="token punctuation">]</span>

<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ls</span>
anaconda-ks<span class="token punctuation">.</span>cfg  apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz
</code></pre> 
  <h4>6.5.解压安装tomcat</h4> 
  <pre><code class="prism language-powershell"><span class="token operator">/</span><span class="token operator">/</span>安装tomcat-1
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ls</span>
anaconda-ks<span class="token punctuation">.</span>cfg  apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># tar xf apache-tomcat-9.0.80.tar.gz</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># mv apache-tomcat-9.0.80 /usr/local/tomcat-1</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ll -d /usr/local/tomcat-1</span>
drwxr-xr-x<span class="token punctuation">.</span> 9 root root 220 Oct 11 10:32 <span class="token operator">/</span>usr/local/tomcat-1

<span class="token operator">/</span><span class="token operator">/</span>安装tomcat-2
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ls</span>
anaconda-ks<span class="token punctuation">.</span>cfg  apache-tomcat-9<span class="token punctuation">.</span>0<span class="token punctuation">.</span>80<span class="token punctuation">.</span>tar<span class="token punctuation">.</span>gz
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># tar xf apache-tomcat-9.0.80.tar.gz</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># mv apache-tomcat-9.0.80 /usr/local/tomcat-2</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ll -d /usr/local/tomcat-2</span>
drwxr-xr-x<span class="token punctuation">.</span> 9 root root 220 Oct 11 10:33 <span class="token operator">/</span>usr/local/tomcat-2
</code></pre> 
  <h4>6.6.更改端口号</h4> 
  <p><strong>修改tomcat-2的端口,防止与tomcat-1的端口冲突,tomcat-1保持默认</strong></p> 
  <pre><code class="prism language-powershell"><span class="token operator">/</span><span class="token operator">/</span>默认的tomcat关闭端口为8005,访问端口为8080,下列命令中我们只用将tomcat-2的关闭端口和访问端口更改为其他空闲端口即可

<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># cd /usr/local/tomcat-2/conf/</span>
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># ls</span>
catalina<span class="token punctuation">.</span>policy      context<span class="token punctuation">.</span>xml           jaspic-providers<span class="token punctuation">.</span>xsd  server<span class="token punctuation">.</span>xml        tomcat-users<span class="token punctuation">.</span>xsd
catalina<span class="token punctuation">.</span>properties  jaspic-providers<span class="token punctuation">.</span>xml  logging<span class="token punctuation">.</span>properties    tomcat-users<span class="token punctuation">.</span>xml  web<span class="token punctuation">.</span>xml
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># vim server.xml </span>
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># grep -A3 'Server port=' server.xml</span>
<Server port=<span class="token string">"8006"</span> shutdown=<span class="token string">"SHUTDOWN"</span>>
  <Listener className=<span class="token string">"org.apache.catalina.startup.VersionLoggerListener"</span> <span class="token operator">/</span>>
  <<span class="token operator">!</span><span class="token operator">--</span> Security listener<span class="token punctuation">.</span> Documentation at <span class="token operator">/</span>docs/config/listeners<span class="token punctuation">.</span>html
  <Listener className=<span class="token string">"org.apache.catalina.security.SecurityListener"</span> <span class="token operator">/</span>>
<span class="token namespace">[root@tomcat conf]</span><span class="token comment"># grep -A3 '<Connector port=' server.xml</span>
    <Connector port=<span class="token string">"8081"</span> protocol=<span class="token string">"HTTP/1.1"</span>
               connectionTimeout=<span class="token string">"20000"</span>
               redirectPort=<span class="token string">"8444"</span>
               maxParameterCount=<span class="token string">"1000"</span>
</code></pre> 
  <h4>6.7.开启服务</h4> 
  <pre><code class="prism language-powershell"><span class="token operator">/</span><span class="token operator">/</span>开启tomcat-1服务
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># /usr/local/tomcat-1/bin/catalina.sh start</span>
<span class="token keyword">Using</span> CATALINA_BASE:   <span class="token operator">/</span>usr/local/tomcat-1
<span class="token keyword">Using</span> CATALINA_HOME:   <span class="token operator">/</span>usr/local/tomcat-1
<span class="token keyword">Using</span> CATALINA_TMPDIR: <span class="token operator">/</span>usr/local/tomcat-1/temp
<span class="token keyword">Using</span> JRE_HOME:        <span class="token operator">/</span>usr
<span class="token keyword">Using</span> CLASSPATH:       <span class="token operator">/</span>usr/local/tomcat-1/bin/bootstrap<span class="token punctuation">.</span>jar:<span class="token operator">/</span>usr/local/tomcat-1/bin/tomcat-juli<span class="token punctuation">.</span>jar
<span class="token keyword">Using</span> CATALINA_OPTS:   
Tomcat started<span class="token punctuation">.</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ss -antl</span>
State          Recv-Q         <span class="token function">Send-Q</span>                      Local Address:Port                 Peer Address:Port        
LISTEN         0              128                               0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:22                        0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:<span class="token operator">*</span>           
LISTEN         0              1                      <span class="token punctuation">[</span>::ffff:127<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1<span class="token punctuation">]</span>:8005                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              100                                     <span class="token operator">*</span>:8080                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              128                                  <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:22                           <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:<span class="token operator">*</span>

<span class="token operator">/</span><span class="token operator">/</span>开启tomcat-2服务
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># /usr/local/tomcat-2/bin/catalina.sh start</span>
<span class="token keyword">Using</span> CATALINA_BASE:   <span class="token operator">/</span>usr/local/tomcat-2
<span class="token keyword">Using</span> CATALINA_HOME:   <span class="token operator">/</span>usr/local/tomcat-2
<span class="token keyword">Using</span> CATALINA_TMPDIR: <span class="token operator">/</span>usr/local/tomcat-2/temp
<span class="token keyword">Using</span> JRE_HOME:        <span class="token operator">/</span>usr
<span class="token keyword">Using</span> CLASSPATH:       <span class="token operator">/</span>usr/local/tomcat-2/bin/bootstrap<span class="token punctuation">.</span>jar:<span class="token operator">/</span>usr/local/tomcat-2/bin/tomcat-juli<span class="token punctuation">.</span>jar
<span class="token keyword">Using</span> CATALINA_OPTS:   
Tomcat started<span class="token punctuation">.</span>
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># ss -antl</span>
State          Recv-Q         <span class="token function">Send-Q</span>                      Local Address:Port                 Peer Address:Port        
LISTEN         0              128                               0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:22                        0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0:<span class="token operator">*</span>           
LISTEN         0              1                      <span class="token punctuation">[</span>::ffff:127<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1<span class="token punctuation">]</span>:8005                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              1                      <span class="token punctuation">[</span>::ffff:127<span class="token punctuation">.</span>0<span class="token punctuation">.</span>0<span class="token punctuation">.</span>1<span class="token punctuation">]</span>:8006                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              100                                     <span class="token operator">*</span>:8080                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              100                                     <span class="token operator">*</span>:8081                            <span class="token operator">*</span>:<span class="token operator">*</span>           
LISTEN         0              128                                  <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:22                           <span class="token punctuation">[</span>::<span class="token punctuation">]</span>:<span class="token operator">*</span>
</code></pre> 
  <h4>6.8.配置多实例测试网页</h4> 
  <pre><code class="prism language-powershell"><span class="token operator">/</span><span class="token operator">/</span>配置tomcat-1的测试网页index<span class="token punctuation">.</span>jsp
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># cd /usr/local/tomcat-1/webapps/</span>
<span class="token namespace">[root@tomcat webapps]</span><span class="token comment"># mkdir test && cd test</span>
<span class="token namespace">[root@tomcat test]</span><span class="token comment"># vim index.jsp</span>
<span class="token namespace">[root@tomcat test]</span><span class="token comment"># cat index.jsp</span>
<html>
<head>
     <title>test page<<span class="token operator">/</span>title>
<<span class="token operator">/</span>head>
<body>
     <<span class="token operator">%</span>
        out<span class="token punctuation">.</span>println<span class="token punctuation">(</span><span class="token string">"my name is tomcat-1"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
     <span class="token operator">%</span>>
<<span class="token operator">/</span>body>
<<span class="token operator">/</span>html>

<span class="token operator">/</span><span class="token operator">/</span>配置tomcat-2的测试页面
<span class="token namespace">[root@tomcat ~]</span><span class="token comment"># cd /usr/local/tomcat-2/webapps/</span>
<span class="token namespace">[root@tomcat webapps]</span><span class="token comment"># mkdir test && cd test</span>
<span class="token namespace">[root@tomcat test]</span><span class="token comment"># vim index.jsp</span>
<span class="token namespace">[root@tomcat test]</span><span class="token comment"># cat index.jsp</span>
<html>
<head>
     <title>test page<<span class="token operator">/</span>title>
<<span class="token operator">/</span>head>
<body>
     <<span class="token operator">%</span>
        out<span class="token punctuation">.</span>println<span class="token punctuation">(</span><span class="token string">"my name is tomcat-2"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
     <span class="token operator">%</span>>
<<span class="token operator">/</span>body>
<<span class="token operator">/</span>html>
</code></pre> 
  <h4>6.9.访问测试</h4> 
  <p>访问tomcat-1的8080端口<br> <a href="http://img.e-com-net.com/image/info8/8f12e14b7d2c4d94a41f5d814d968c57.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/8f12e14b7d2c4d94a41f5d814d968c57.jpg" alt="tomcat服务&&tomcat多实例部署_第16张图片" width="650" height="348" style="border:1px solid black;"></a></p> 
  <p>访问tomcat-2的8081端口<br> <a href="http://img.e-com-net.com/image/info8/70b1100f70f54caca73da64ecdfec16b.jpg" target="_blank"><img src="http://img.e-com-net.com/image/info8/70b1100f70f54caca73da64ecdfec16b.jpg" alt="tomcat服务&&tomcat多实例部署_第17张图片" width="650" height="344" style="border:1px solid black;"></a></p> 
  <h3>总结:</h3> 
  <p>Tomcat是一个可靠、轻量级、跨平台的Java We关闭b应用服务器,适用于许多中小型应用程序。它的工作原理基于Java Servlet和JSP规范,通过将请求分发给相应的Servlet或JSP来处理HTTP请求。虽然Tomcat在一些高级功能方面可能相对有限,但它作为一个开源项目,提供了一个可靠的基础,使得Java Web应用程序可以在其中运行。</p> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1712614259835351040"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(tomcat,java,运维,linux)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1835513699826233344.htm"
                           title="android系统selinux中添加新属性property" target="_blank">android系统selinux中添加新属性property</a>
                        <span class="text-muted">辉色投像</span>

                        <div>1.定位/android/system/sepolicy/private/property_contexts声明属性开头:persist.charge声明属性类型:u:object_r:system_prop:s0图12.定位到android/system/sepolicy/public/domain.te删除neverallow{domain-init}default_prop:property</div>
                    </li>
                    <li><a href="/article/1835509897106649088.htm"
                           title="Long类型前后端数据不一致" target="_blank">Long类型前后端数据不一致</a>
                        <span class="text-muted">igotyback</span>
<a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a>
                        <div>响应给前端的数据浏览器控制台中response中看到的Long类型的数据是正常的到前端数据不一致前后端数据类型不匹配是一个常见问题,尤其是当后端使用Java的Long类型(64位)与前端JavaScript的Number类型(最大安全整数为2^53-1,即16位)进行数据交互时,很容易出现精度丢失的问题。这是因为JavaScript中的Number类型无法安全地表示超过16位的整数。为了解决这个问</div>
                    </li>
                    <li><a href="/article/1835509769822105600.htm"
                           title="LocalDateTime 转 String" target="_blank">LocalDateTime 转 String</a>
                        <span class="text-muted">igotyback</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>importjava.time.LocalDateTime;importjava.time.format.DateTimeFormatter;publicclassMain{publicstaticvoidmain(String[]args){//获取当前时间LocalDateTimenow=LocalDateTime.now();//定义日期格式化器DateTimeFormatterformat</div>
                    </li>
                    <li><a href="/article/1835509391361667072.htm"
                           title="Linux下QT开发的动态库界面弹出操作(SDL2)" target="_blank">Linux下QT开发的动态库界面弹出操作(SDL2)</a>
                        <span class="text-muted">13jjyao</span>
<a class="tag" taget="_blank" href="/search/QT%E7%B1%BB/1.htm">QT类</a><a class="tag" taget="_blank" href="/search/qt/1.htm">qt</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/sdl2/1.htm">sdl2</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>需求:操作系统为linux,开发框架为qt,做成需带界面的qt动态库,调用方为java等非qt程序难点:调用方为java等非qt程序,也就是说调用方肯定不带QApplication::exec(),缺少了这个,QTimer等事件和QT创建的窗口将不能弹出(包括opencv也是不能弹出);这与qt调用本身qt库是有本质的区别的思路:1.调用方缺QApplication::exec(),那么我们在接口</div>
                    </li>
                    <li><a href="/article/1835504596898902016.htm"
                           title="linux sdl windows.h,Windows下的SDL安装" target="_blank">linux sdl windows.h,Windows下的SDL安装</a>
                        <span class="text-muted">奔跑吧linux内核</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/sdl/1.htm">sdl</a><a class="tag" taget="_blank" href="/search/windows.h/1.htm">windows.h</a>
                        <div>首先你要下载并安装SDL开发包。如果装在C盘下,路径为C:\SDL1.2.5如果在WINDOWS下。你可以按以下步骤:1.打开VC++,点击"Tools",Options2,点击directories选项3.选择"Includefiles"增加一个新的路径。"C:\SDL1.2.5\include"4,现在选择"Libaryfiles“增加"C:\SDL1.2.5\lib"现在你可以开始编写你的第</div>
                    </li>
                    <li><a href="/article/1835503712899002368.htm"
                           title="linux中sdl的使用教程,sdl使用入门" target="_blank">linux中sdl的使用教程,sdl使用入门</a>
                        <span class="text-muted">Melissa Corvinus</span>
<a class="tag" taget="_blank" href="/search/linux%E4%B8%ADsdl%E7%9A%84%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/1.htm">linux中sdl的使用教程</a>
                        <div>本文通过一个简单示例讲解SDL的基本使用流程。示例中展示一个窗口,窗口里面有个随机颜色快随机移动。当我们鼠标点击关闭按钮时间窗口关闭。基本步骤如下:1.初始化SDL并创建一个窗口。SDL_Init()初始化SDL_CreateWindow()创建窗口2.纹理渲染存储RGB和存储纹理的区别:比如一个从左到右由红色渐变到蓝色的矩形,用存储RGB的话就需要把矩形中每个点的具体颜色值存储下来;而纹理只是一</div>
                    </li>
                    <li><a href="/article/1835502578050363392.htm"
                           title="PHP环境搭建详细教程" target="_blank">PHP环境搭建详细教程</a>
                        <span class="text-muted">好看资源平台</span>
<a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/php/1.htm">php</a>
                        <div>PHP是一个流行的服务器端脚本语言,广泛用于Web开发。为了使PHP能够在本地或服务器上运行,我们需要搭建一个合适的PHP环境。本教程将结合最新资料,介绍在不同操作系统上搭建PHP开发环境的多种方法,包括Windows、macOS和Linux系统的安装步骤,以及本地和Docker环境的配置。1.PHP环境搭建概述PHP环境的搭建主要分为以下几类:集成开发环境:例如XAMPP、WAMP、MAMP,这</div>
                    </li>
                    <li><a href="/article/1835501948011376640.htm"
                           title="使用 FinalShell 进行远程连接(ssh 远程连接 Linux 服务器)" target="_blank">使用 FinalShell 进行远程连接(ssh 远程连接 Linux 服务器)</a>
                        <span class="text-muted">编程经验分享</span>
<a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7/1.htm">开发工具</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a><a class="tag" taget="_blank" href="/search/ssh/1.htm">ssh</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>目录前言基本使用教程新建远程连接连接主机自定义命令路由追踪前言后端开发,必然需要和服务器打交道,部署应用,排查问题,查看运行日志等等。一般服务器都是集中部署在机房中,也有一些直接是云服务器,总而言之,程序员不可能直接和服务器直接操作,一般都是通过ssh连接来登录服务器。刚接触远程连接时,使用的是XSHELL来远程连接服务器,连接上就能够操作远程服务器了,但是仅用XSHELL并没有上传下载文件的功能</div>
                    </li>
                    <li><a href="/article/1835498925755297792.htm"
                           title="DIV+CSS+JavaScript技术制作网页(旅游主题网页设计与制作)云南大理" target="_blank">DIV+CSS+JavaScript技术制作网页(旅游主题网页设计与制作)云南大理</a>
                        <span class="text-muted">STU学生网页设计</span>
<a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1/1.htm">网页设计</a><a class="tag" taget="_blank" href="/search/%E6%9C%9F%E6%9C%AB%E7%BD%91%E9%A1%B5%E4%BD%9C%E4%B8%9A/1.htm">期末网页作业</a><a class="tag" taget="_blank" href="/search/html%E9%9D%99%E6%80%81%E7%BD%91%E9%A1%B5/1.htm">html静态网页</a><a class="tag" taget="_blank" href="/search/html5%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">html5期末大作业</a><a class="tag" taget="_blank" href="/search/%E7%BD%91%E9%A1%B5%E8%AE%BE%E8%AE%A1/1.htm">网页设计</a><a class="tag" taget="_blank" href="/search/web%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web大作业</a>
                        <div>️精彩专栏推荐作者主页:【进入主页—获取更多源码】web前端期末大作业:【HTML5网页期末作业(1000套)】程序员有趣的告白方式:【HTML七夕情人节表白网页制作(110套)】文章目录二、网站介绍三、网站效果▶️1.视频演示2.图片演示四、网站代码HTML结构代码CSS样式代码五、更多源码二、网站介绍网站布局方面:计划采用目前主流的、能兼容各大主流浏览器、显示效果稳定的浮动网页布局结构。网站程</div>
                    </li>
                    <li><a href="/article/1835498547785592832.htm"
                           title="【华为OD机试真题2023B卷 JAVA&JS】We Are A Team" target="_blank">【华为OD机试真题2023B卷 JAVA&JS】We Are A Team</a>
                        <span class="text-muted">若博豆</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BA/1.htm">华为</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a>
                        <div>华为OD2023(B卷)机试题库全覆盖,刷题指南点这里WeAreATeam时间限制:1秒|内存限制:32768K|语言限制:不限题目描述:总共有n个人在机房,每个人有一个标号(1<=标号<=n),他们分成了多个团队,需要你根据收到的m条消息判定指定的两个人是否在一个团队中,具体的:1、消息构成为:abc,整数a、b分别代</div>
                    </li>
                    <li><a href="/article/1835496149843275776.htm"
                           title="关于城市旅游的HTML网页设计——(旅游风景云南 5页)HTML+CSS+JavaScript" target="_blank">关于城市旅游的HTML网页设计——(旅游风景云南 5页)HTML+CSS+JavaScript</a>
                        <span class="text-muted">二挡起步</span>
<a class="tag" taget="_blank" href="/search/web%E5%89%8D%E7%AB%AF%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web前端期末大作业</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E6%97%85%E6%B8%B8/1.htm">旅游</a><a class="tag" taget="_blank" href="/search/%E9%A3%8E%E6%99%AF/1.htm">风景</a>
                        <div>⛵源码获取文末联系✈Web前端开发技术描述网页设计题材,DIV+CSS布局制作,HTML+CSS网页设计期末课程大作业|游景点介绍|旅游风景区|家乡介绍|等网站的设计与制作|HTML期末大学生网页设计作业,Web大学生网页HTML:结构CSS:样式在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识JavaScrip</div>
                    </li>
                    <li><a href="/article/1835496148601761792.htm"
                           title="HTML网页设计制作大作业(div+css) 云南我的家乡旅游景点 带文字滚动" target="_blank">HTML网页设计制作大作业(div+css) 云南我的家乡旅游景点 带文字滚动</a>
                        <span class="text-muted">二挡起步</span>
<a class="tag" taget="_blank" href="/search/web%E5%89%8D%E7%AB%AF%E6%9C%9F%E6%9C%AB%E5%A4%A7%E4%BD%9C%E4%B8%9A/1.htm">web前端期末大作业</a><a class="tag" taget="_blank" href="/search/web%E8%AE%BE%E8%AE%A1%E7%BD%91%E9%A1%B5%E8%A7%84%E5%88%92%E4%B8%8E%E8%AE%BE%E8%AE%A1/1.htm">web设计网页规划与设计</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/dreamweaver/1.htm">dreamweaver</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a>
                        <div>Web前端开发技术描述网页设计题材,DIV+CSS布局制作,HTML+CSS网页设计期末课程大作业游景点介绍|旅游风景区|家乡介绍|等网站的设计与制作HTML期末大学生网页设计作业HTML:结构CSS:样式在操作方面上运用了html5和css3,采用了div+css结构、表单、超链接、浮动、绝对定位、相对定位、字体样式、引用视频等基础知识JavaScript:做与用户的交互行为文章目录前端学习路线</div>
                    </li>
                    <li><a href="/article/1835493373906087936.htm"
                           title="libyuv之linux编译" target="_blank">libyuv之linux编译</a>
                        <span class="text-muted">jaronho</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>文章目录一、下载源码二、编译源码三、注意事项1、银河麒麟系统(aarch64)(1)解决armv8-a+dotprod+i8mm指令集支持问题(2)解决armv9-a+sve2指令集支持问题一、下载源码到GitHub网站下载https://github.com/lemenkov/libyuv源码,或者用直接用git克隆到本地,如:gitclonehttps://github.com/lemenko</div>
                    </li>
                    <li><a href="/article/1835492740536823808.htm"
                           title="node.js学习" target="_blank">node.js学习</a>
                        <span class="text-muted">小猿L</span>
<a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a><a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/vim/1.htm">vim</a>
                        <div>node.js学习实操及笔记温故node.js,node.js学习实操过程及笔记~node.js学习视频node.js官网node.js中文网实操笔记githubcsdn笔记为什么学node.js可以让别人访问我们编写的网页为后续的框架学习打下基础,三大框架vuereactangular离不开node.jsnode.js是什么官网:node.js是一个开源的、跨平台的运行JavaScript的运行</div>
                    </li>
                    <li><a href="/article/1835489588169240576.htm"
                           title="ARM驱动学习之5 LEDS驱动" target="_blank">ARM驱动学习之5 LEDS驱动</a>
                        <span class="text-muted">JT灬新一</span>
<a class="tag" taget="_blank" href="/search/%E5%B5%8C%E5%85%A5%E5%BC%8F/1.htm">嵌入式</a><a class="tag" taget="_blank" href="/search/C/1.htm">C</a><a class="tag" taget="_blank" href="/search/%E5%BA%95%E5%B1%82/1.htm">底层</a><a class="tag" taget="_blank" href="/search/arm%E5%BC%80%E5%8F%91/1.htm">arm开发</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/%E5%8D%95%E7%89%87%E6%9C%BA/1.htm">单片机</a>
                        <div>ARM驱动学习之5LEDS驱动知识点:•linuxGPIO申请函数和赋值函数–gpio_request–gpio_set_value•三星平台配置GPIO函数–s3c_gpio_cfgpin•GPIO配置输出模式的宏变量–S3C_GPIO_OUTPUT注意点:DRIVER_NAME和DEVICE_NAME匹配。实现步骤:1.加入需要的头文件://Linux平台的gpio头文件#include//三</div>
                    </li>
                    <li><a href="/article/1835485681187647488.htm"
                           title="【华为OD技术面试真题精选 - 非技术题】 -HR面,综合面_华为od hr面" target="_blank">【华为OD技术面试真题精选 - 非技术题】 -HR面,综合面_华为od hr面</a>
                        <span class="text-muted">一个射手座的程序媛</span>
<a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E5%91%98/1.htm">程序员</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BAod/1.htm">华为od</a><a class="tag" taget="_blank" href="/search/%E9%9D%A2%E8%AF%95/1.htm">面试</a><a class="tag" taget="_blank" href="/search/%E8%81%8C%E5%9C%BA%E5%92%8C%E5%8F%91%E5%B1%95/1.htm">职场和发展</a>
                        <div>最后的话最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!资料预览给大家整理的视频资料:给大家整理的电子书资料:如果本文对你有帮助,欢迎点赞、收藏、转发给朋友,让我有持续创作的动力!网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。需要这份系统化的资料的朋友,可以点击这里获</div>
                    </li>
                    <li><a href="/article/1835482277870661632.htm"
                           title="简介Shell、zsh、bash" target="_blank">简介Shell、zsh、bash</a>
                        <span class="text-muted">zhaosuningsn</span>
<a class="tag" taget="_blank" href="/search/Shell/1.htm">Shell</a><a class="tag" taget="_blank" href="/search/zsh/1.htm">zsh</a><a class="tag" taget="_blank" href="/search/bash/1.htm">bash</a><a class="tag" taget="_blank" href="/search/shell/1.htm">shell</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/bash/1.htm">bash</a>
                        <div>Shell是Linux和Unix的外壳,类似衣服,负责外界与Linux和Unix内核的交互联系。例如接收终端用户及各种应用程序的命令,把接收的命令翻译成内核能理解的语言,传递给内核,并把内核处理接收的命令的结果返回给外界,即Shell是外界和内核沟通的桥梁或大门。Linux和Unix提供了多种Shell,其中有种bash,当然还有其他好多种。Mac电脑中不但有bash,还有一个zsh,预装的,据说</div>
                    </li>
                    <li><a href="/article/1835479000600899584.htm"
                           title="Linux MariaDB使用OpenSSL安装SSL证书" target="_blank">Linux MariaDB使用OpenSSL安装SSL证书</a>
                        <span class="text-muted">Meta39</span>
<a class="tag" taget="_blank" href="/search/MySQL/1.htm">MySQL</a><a class="tag" taget="_blank" href="/search/Oracle/1.htm">Oracle</a><a class="tag" taget="_blank" href="/search/MariaDB/1.htm">MariaDB</a><a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/Windows/1.htm">Windows</a><a class="tag" taget="_blank" href="/search/ssl/1.htm">ssl</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/mariadb/1.htm">mariadb</a>
                        <div>进入到证书存放目录,批量删除.pem证书警告:确保已经进入到证书存放目录find.-typef-iname\*.pem-delete查看是否安装OpenSSLopensslversion没有则安装yuminstallopensslopenssl-devel开启SSL编辑/etc/my.cnf文件(没有的话就创建,但是要注意,在/etc/my.cnf.d/server.cnf配置了datadir的,</div>
                    </li>
                    <li><a href="/article/1835476093189058560.htm"
                           title="Java 重写(Override)与重载(Overload)" target="_blank">Java 重写(Override)与重载(Overload)</a>
                        <span class="text-muted">叨唧唧的</span>

                        <div>Java重写(Override)与重载(Overload)重写(Override)重写是子类对父类的允许访问的方法的实现过程进行重新编写,返回值和形参都不能改变。即外壳不变,核心重写!重写的好处在于子类可以根据需要,定义特定于自己的行为。也就是说子类能够根据需要实现父类的方法。重写方法不能抛出新的检查异常或者比被重写方法申明更加宽泛的异常。例如:父类的一个方法申明了一个检查异常IOExceptio</div>
                    </li>
                    <li><a href="/article/1835473830873755648.htm"
                           title="简单了解 JVM" target="_blank">简单了解 JVM</a>
                        <span class="text-muted">记得开心一点啊</span>
<a class="tag" taget="_blank" href="/search/jvm/1.htm">jvm</a>
                        <div>目录♫什么是JVM♫JVM的运行流程♫JVM运行时数据区♪虚拟机栈♪本地方法栈♪堆♪程序计数器♪方法区/元数据区♫类加载的过程♫双亲委派模型♫垃圾回收机制♫什么是JVMJVM是JavaVirtualMachine的简称,意为Java虚拟机。虚拟机是指通过软件模拟的具有完整硬件功能的、运行在一个完全隔离的环境中的完整计算机系统(如:JVM、VMwave、VirtualBox)。JVM和其他两个虚拟机</div>
                    </li>
                    <li><a href="/article/1835471058648526848.htm"
                           title="1分钟解决 -bash: mvn: command not found,在Centos 7中安装Maven" target="_blank">1分钟解决 -bash: mvn: command not found,在Centos 7中安装Maven</a>
                        <span class="text-muted">Energet!c</span>
<a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>1分钟解决-bash:mvn:commandnotfound,在Centos7中安装Maven检查Java环境1下载Maven2解压Maven3配置环境变量4验证安装5常见问题与注意事项6总结检查Java环境Maven依赖Java环境,请确保系统已经安装了Java并配置了环境变量。可以通过以下命令检查:java-version如果未安装,请先安装Java。1下载Maven从官网下载:前往Apach</div>
                    </li>
                    <li><a href="/article/1835469672334585856.htm"
                           title="Java企业面试题3" target="_blank">Java企业面试题3</a>
                        <span class="text-muted">马龙强_</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                        <div>1.break和continue的作用(智*图)break:用于完全退出一个循环(如for,while)或一个switch语句。当在循环体内遇到break语句时,程序会立即跳出当前循环体,继续执行循环之后的代码。continue:用于跳过当前循环体中剩余的部分,并开始下一次循环。如果是在for循环中使用continue,则会直接进行条件判断以决定是否执行下一轮循环。2.if分支语句和switch分</div>
                    </li>
                    <li><a href="/article/1835469294436184064.htm"
                           title="【从浅识到熟知Linux】Linux发展史" target="_blank">【从浅识到熟知Linux】Linux发展史</a>
                        <span class="text-muted">Jammingpro</span>
<a class="tag" taget="_blank" href="/search/%E4%BB%8E%E6%B5%85%E5%AD%A6%E5%88%B0%E7%86%9F%E7%9F%A5Linux/1.htm">从浅学到熟知Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a><a class="tag" taget="_blank" href="/search/%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">服务器</a>
                        <div>归属专栏:从浅学到熟知Linux个人主页:Jammingpro每日努力一点点,技术变化看得见文章前言:本篇文章记录Linux发展的历史,因在介绍Linux过程中涉及的其他操作系统及人物,本文对相关内容也有所介绍。文章目录Unix发展史Linux发展史开源Linux官网企业应用情况发行版本在学习Linux前,我们可能都会问Linux从哪里来?它是如何发展的。但在介绍Linux之前,需要先介绍一下Un</div>
                    </li>
                    <li><a href="/article/1835468916290318336.htm"
                           title="JVM、JRE和 JDK:理解Java开发的三大核心组件" target="_blank">JVM、JRE和 JDK:理解Java开发的三大核心组件</a>
                        <span class="text-muted">Y雨何时停T</span>
<a class="tag" taget="_blank" href="/search/Java/1.htm">Java</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                        <div>Java是一门跨平台的编程语言,它的成功离不开背后强大的运行环境与开发工具的支持。在Java的生态中,JVM(Java虚拟机)、JRE(Java运行时环境)和JDK(Java开发工具包)是三个至关重要的核心组件。本文将探讨JVM、JDK和JRE的区别,帮助你更好地理解Java的运行机制。1.JVM:Java虚拟机(JavaVirtualMachine)什么是JVM?JVM,即Java虚拟机,是Ja</div>
                    </li>
                    <li><a href="/article/1835467782687387648.htm"
                           title="linux 发展史" target="_blank">linux 发展史</a>
                        <span class="text-muted">种树的猴子</span>
<a class="tag" taget="_blank" href="/search/%E5%86%85%E6%A0%B8/1.htm">内核</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F/1.htm">操作系统</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/%E5%A4%A7%E6%95%B0%E6%8D%AE/1.htm">大数据</a>
                        <div>linux发展史说明此前对linux认识模糊一知半解,近期通过学习将自己对于linux的发展总结一下方便大家日后的学习。那Linux是目前一款非常火热的开源操作系统,可是linux是什么时候出现的,又是因为什么样的原因被开发出来的呢。以下将对linux的发展历程进行详细的讲解。目录一、Linux发展背景二、UINIX的诞生三、UNIX的重要分支-BSD的诞生四、Minix的诞生五、GNU与Free</div>
                    </li>
                    <li><a href="/article/1835466523163062272.htm"
                           title="Linux sh命令" target="_blank">Linux sh命令</a>
                        <span class="text-muted">fengyehongWorld</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>目录一.基本语法二.选项2.1-c字符串中读取内容,并执行2.1.1基本用法2.1.2获取当前目录下失效的超链接2.2-x每个命令执行之前,将其打印出来2.3结合Here文档使用一.基本语法⏹Linux和Unix系统中用于执行shell脚本或运行命令的命令。sh[选项][脚本文件][参数...]⏹选项-c:从字符串中读取内容,并执行。-x:在每个命令执行之前,将其打印出来。-s:从标准流中读取内容</div>
                    </li>
                    <li><a href="/article/1835466270955368448.htm"
                           title="Linux vi常用命令" target="_blank">Linux vi常用命令</a>
                        <span class="text-muted">fengyehongWorld</span>
<a class="tag" taget="_blank" href="/search/Linux/1.htm">Linux</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                        <div>参考资料viコマンド(vimコマンド)リファレンス目录一.保存系命令二.删除系命令三.移动系命令四.复制粘贴系命令一.保存系命令⏹保存并退出:wq⏹强制保存并退出:wq!⏹退出(文件未编辑):q⏹强制退出(忽略已编辑内容):q!⏹另存为:w新文件名二.删除系命令⏹删除当前行dd⏹清空整个文档gg:移动到文档顶部dG:删除到最后一行ggdG三.移动系命令⏹移动到文档顶部gg⏹移动到文档底部#方式1G</div>
                    </li>
                    <li><a href="/article/1835464504918503424.htm"
                           title="Java面试题精选:消息队列(二)" target="_blank">Java面试题精选:消息队列(二)</a>
                        <span class="text-muted">芒果不是芒</span>
<a class="tag" taget="_blank" href="/search/Java%E9%9D%A2%E8%AF%95%E9%A2%98%E7%B2%BE%E9%80%89/1.htm">Java面试题精选</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/kafka/1.htm">kafka</a>
                        <div>一、Kafka的特性1.消息持久化:消息存储在磁盘,所以消息不会丢失2.高吞吐量:可以轻松实现单机百万级别的并发3.扩展性:扩展性强,还是动态扩展4.多客户端支持:支持多种语言(Java、C、C++、GO、)5.KafkaStreams(一个天生的流处理):在双十一或者销售大屏就会用到这种流处理。使用KafkaStreams可以快速的把销售额统计出来6.安全机制:Kafka进行生产或者消费的时候会</div>
                    </li>
                    <li><a href="/article/1835462485629562880.htm"
                           title="白骑士的Java教学基础篇 2.5 控制流语句" target="_blank">白骑士的Java教学基础篇 2.5 控制流语句</a>
                        <span class="text-muted">白骑士所长</span>
<a class="tag" taget="_blank" href="/search/Java/1.htm">Java</a><a class="tag" taget="_blank" href="/search/%E6%95%99%E5%AD%A6/1.htm">教学</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>欢迎继续学习Java编程的基础篇!在前面的章节中,我们了解了Java的变量、数据类型和运算符。接下来,我们将探讨Java中的控制流语句。控制流语句用于控制程序的执行顺序,使我们能够根据特定条件执行不同的代码块,或重复执行某段代码。这是编写复杂程序的基础。通过学习这一节内容,你将掌握如何使用条件语句和循环语句来编写更加灵活和高效的代码。条件语句条件语句用于根据条件的真假来执行不同的代码块。if语句‘</div>
                    </li>
                    <li><a href="/article/1835462232612368384.htm"
                           title="python语法——三目运算符" target="_blank">python语法——三目运算符</a>
                        <span class="text-muted">HappyRocking</span>
<a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E4%B8%89%E7%9B%AE%E8%BF%90%E7%AE%97%E7%AC%A6/1.htm">三目运算符</a>
                        <div>在java中,有三目运算符,如:intc=(a>b)?a:b表示c取两者中的较大值。但是在python,不能直接这样使用,估计是因为冒号在python有分行的关键作用。那么在python中,如何实现类似功能呢?可以使用ifelse语句,也是一行可以完成,格式为:aifbelsec表示如果b为True,则表达式等于a,否则等于c。如:c=(aif(a>b)elseb)同样是完成了取最大值的功能。</div>
                    </li>
                                <li><a href="/article/74.htm"
                                       title="sql统计相同项个数并按名次显示" target="_blank">sql统计相同项个数并按名次显示</a>
                                    <span class="text-muted">朱辉辉33</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a>
                                    <div>现在有如下这样一个表: 
A表 
ID Name time 
------------------------------ 
0001 aaa 2006-11-18 
0002 ccc 2006-11-18 
0003 eee 2006-11-18 
0004 aaa 2006-11-18 
0005 eee 2006-11-18 
0004 aaa 2006-11-18 
0002 ccc 20</div>
                                </li>
                                <li><a href="/article/201.htm"
                                       title="Android+Jquery Mobile学习系列-目录" target="_blank">Android+Jquery Mobile学习系列-目录</a>
                                    <span class="text-muted">白糖_</span>
<a class="tag" taget="_blank" href="/search/JQuery+Mobile/1.htm">JQuery Mobile</a>
                                    <div>最近在研究学习基于Android的移动应用开发,准备给家里人做一个应用程序用用。向公司手机移动团队咨询了下,觉得使用Android的WebView上手最快,因为WebView等于是一个内置浏览器,可以基于html页面开发,不用去学习Android自带的七七八八的控件。然后加上Jquery mobile的样式渲染和事件等,就能非常方便的做动态应用了。 
  
从现在起,往后一段时间,我打算</div>
                                </li>
                                <li><a href="/article/328.htm"
                                       title="如何给线程池命名" target="_blank">如何给线程池命名</a>
                                    <span class="text-muted">daysinsun</span>
<a class="tag" taget="_blank" href="/search/%E7%BA%BF%E7%A8%8B%E6%B1%A0/1.htm">线程池</a>
                                    <div>        在系统运行后,在线程快照里总是看到线程池的名字为pool-xx,这样导致很不好定位,怎么给线程池一个有意义的名字呢。参照ThreadPoolExecutor类的ThreadFactory,自己实现ThreadFactory接口,重写newThread方法即可。参考代码如下: 
    
public class Named</div>
                                </li>
                                <li><a href="/article/455.htm"
                                       title="IE 中"HTML Parsing Error:Unable to modify the parent container element before the" target="_blank">IE 中"HTML Parsing Error:Unable to modify the parent container element before the</a>
                                    <span class="text-muted">周凡杨</span>
<a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/%E8%A7%A3%E6%9E%90/1.htm">解析</a><a class="tag" taget="_blank" href="/search/error/1.htm">error</a><a class="tag" taget="_blank" href="/search/readyState/1.htm">readyState</a>
                                    <div>  
错误:  IE   中"HTML Parsing Error:Unable to modify the parent container element before the child element is closed"      
  
  
现象:  同事之间几个IE 测试情况下,有的报这个错,有的不报。经查询资料后,可归纳以下原因。</div>
                                </li>
                                <li><a href="/article/582.htm"
                                       title="java上传" target="_blank">java上传</a>
                                    <span class="text-muted">g21121</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>我们在做web项目中通常会遇到上传文件的情况,用struts等框架的会直接用的自带的标签和组件,今天说的是利用servlet来完成上传。 
我们这里利用到commons-fileupload组件,相关jar包可以取apache官网下载:http://commons.apache.org/ 
下面是servlet的代码: 
//定义一个磁盘文件工厂
DiskFileItemFactory fact</div>
                                </li>
                                <li><a href="/article/709.htm"
                                       title="SpringMVC配置学习" target="_blank">SpringMVC配置学习</a>
                                    <span class="text-muted">510888780</span>
<a class="tag" taget="_blank" href="/search/spring/1.htm">spring</a><a class="tag" taget="_blank" href="/search/mvc/1.htm">mvc</a>
                                    <div>spring MVC配置详解 
现在主流的Web MVC框架除了Struts这个主力 外,其次就是Spring MVC了,因此这也是作为一名程序员需要掌握的主流框架,框架选择多了,应对多变的需求和业务时,可实行的方案自然就多了。不过要想灵活运用Spring MVC来应对大多数的Web开发,就必须要掌握它的配置及原理。 
 
  一、Spring MVC环境搭建:(Spring 2.5.6 + Hi</div>
                                </li>
                                <li><a href="/article/836.htm"
                                       title="spring mvc-jfreeChart 柱图(1)" target="_blank">spring mvc-jfreeChart 柱图(1)</a>
                                    <span class="text-muted">布衣凌宇</span>
<a class="tag" taget="_blank" href="/search/jfreechart/1.htm">jfreechart</a>
                                    <div>第一步:下载jfreeChart包,注意是jfreeChart文件lib目录下的,jcommon-1.0.23.jar和jfreechart-1.0.19.jar两个包即可; 
第二步:配置web.xml; 
web.xml代码如下 
<servlet> 
    <servlet-name>jfreechart</servlet-nam</div>
                                </li>
                                <li><a href="/article/963.htm"
                                       title="我的spring学习笔记13-容器扩展点之PropertyPlaceholderConfigurer" target="_blank">我的spring学习笔记13-容器扩展点之PropertyPlaceholderConfigurer</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/Spring3/1.htm">Spring3</a>
                                    <div>PropertyPlaceholderConfigurer是个bean工厂后置处理器的实现,也就是BeanFactoryPostProcessor接口的一个实现。关于BeanFactoryPostProcessor和BeanPostProcessor类似。我会在其他地方介绍。PropertyPlaceholderConfigurer可以将上下文(配置文件)中的属性值放在另一个单独的标准java P</div>
                                </li>
                                <li><a href="/article/1090.htm"
                                       title="java 线程池使用 Runnable&Callable&Future" target="_blank">java 线程池使用 Runnable&Callable&Future</a>
                                    <span class="text-muted">antlove</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/thread/1.htm">thread</a><a class="tag" taget="_blank" href="/search/Runnable/1.htm">Runnable</a><a class="tag" taget="_blank" href="/search/callable/1.htm">callable</a><a class="tag" taget="_blank" href="/search/future/1.htm">future</a>
                                    <div>1. 创建线程池 
ExecutorService executorService = Executors.newCachedThreadPool(); 
  
2. 执行一次线程,调用Runnable接口实现 
Future<?> future = executorService.submit(new DefaultRunnable());
System.out.prin</div>
                                </li>
                                <li><a href="/article/1217.htm"
                                       title="XML语法元素结构的总结" target="_blank">XML语法元素结构的总结</a>
                                    <span class="text-muted">百合不是茶</span>
<a class="tag" taget="_blank" href="/search/xml/1.htm">xml</a><a class="tag" taget="_blank" href="/search/%E6%A0%91%E7%BB%93%E6%9E%84/1.htm">树结构</a>
                                    <div>1.XML介绍1969年   gml (主要目的是要在不同的机器进行通信的数据规范)1985年   sgml  standard generralized markup language1993年   html(www网)1998年  xml   extensible markup language</div>
                                </li>
                                <li><a href="/article/1344.htm"
                                       title="改变eclipse编码格式" target="_blank">改变eclipse编码格式</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/eclipse/1.htm">eclipse</a><a class="tag" taget="_blank" href="/search/%E7%BC%96%E7%A0%81%E6%A0%BC%E5%BC%8F/1.htm">编码格式</a>
                                    <div>1.改变整个工作空间的编码格式 
        改变整个工作空间的编码格式,这样以后新建的文件也是新设置的编码格式。 
        Eclipse->window->preferences->General->workspace-</div>
                                </li>
                                <li><a href="/article/1471.htm"
                                       title="javascript中return的设计缺陷" target="_blank">javascript中return的设计缺陷</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/AngularJS/1.htm">AngularJS</a>
                                    <div>代码1: 
<script>
var gisService = (function(window) 
{ 

    return
    {
        name:function ()
        {
            alert(1);
        }
    };

})(this);

gisService.name();
&l</div>
                                </li>
                                <li><a href="/article/1598.htm"
                                       title="【持久化框架MyBatis3八】Spring集成MyBatis3" target="_blank">【持久化框架MyBatis3八】Spring集成MyBatis3</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/Mybatis3/1.htm">Mybatis3</a>
                                    <div>pom.xml配置 
Maven的pom中主要包括: 
 
 MyBatis 
 MyBatis-Spring 
 Spring 
 MySQL-Connector-Java 
 Druid 
 applicationContext.xml配置     
<?xml version="1.0" encoding="UTF-8"?>
&</div>
                                </li>
                                <li><a href="/article/1725.htm"
                                       title="java web项目启动时自动加载自定义properties文件" target="_blank">java web项目启动时自动加载自定义properties文件</a>
                                    <span class="text-muted">bitray</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/%E7%9B%91%E5%90%AC%E5%99%A8/1.htm">监听器</a><a class="tag" taget="_blank" href="/search/%E7%9B%B8%E5%AF%B9%E8%B7%AF%E5%BE%84/1.htm">相对路径</a>
                                    <div>创建一个类 
public class ContextInitListener implements ServletContextListener 
使得该类成为一个监听器。用于监听整个容器生命周期的,主要是初始化和销毁的。 
 
类创建后要在web.xml配置文件中增加一个简单的监听器配置,即刚才我们定义的类。 
 

    <listener>
        <des</div>
                                </li>
                                <li><a href="/article/1852.htm"
                                       title="用nginx区分文件大小做出不同响应" target="_blank">用nginx区分文件大小做出不同响应</a>
                                    <span class="text-muted">ronin47</span>

                                    <div>昨晚和前21v的同事聊天,说到我离职后一些技术上的更新。其中有个给某大客户(游戏下载类)的特殊需求设计,因为文件大小差距很大——估计是大版本和补丁的区别——又走的是同一个域名,而squid在响应比较大的文件时,尤其是初次下载的时候,性能比较差,所以拆成两组服务器,squid服务于较小的文件,通过pull方式从peer层获取,nginx服务于较大的文件,通过push方式由peer层分发同步。外部发布</div>
                                </li>
                                <li><a href="/article/1979.htm"
                                       title="java-67-扑克牌的顺子.从扑克牌中随机抽5张牌,判断是不是一个顺子,即这5张牌是不是连续的.2-10为数字本身,A为1,J为11,Q为12,K为13,而大" target="_blank">java-67-扑克牌的顺子.从扑克牌中随机抽5张牌,判断是不是一个顺子,即这5张牌是不是连续的.2-10为数字本身,A为1,J为11,Q为12,K为13,而大</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a>
                                    <div>package com.ljn.base;

import java.util.Arrays;
import java.util.Random;

public class ContinuousPoker {

    /**
     * Q67 扑克牌的顺子 从扑克牌中随机抽5张牌,判断是不是一个顺子,即这5张牌是不是连续的。
     * 2-10为数字本身,A为1,J为1</div>
                                </li>
                                <li><a href="/article/2106.htm"
                                       title="翟鸿燊老师语录" target="_blank">翟鸿燊老师语录</a>
                                    <span class="text-muted">ccii</span>
<a class="tag" taget="_blank" href="/search/%E7%BF%9F%E9%B8%BF%E7%87%8A/1.htm">翟鸿燊</a>
                                    <div>一、国学应用智慧TAT之亮剑精神A 
1. 角色就是人格 
    就像你一回家的时候,你一进屋里面,你已经是儿子,是姑娘啦,给老爸老妈倒怀水吧,你还觉得你是老总呢?还拿派呢?就像今天一样,你们往这儿一坐,你们之间是什么,同学,是朋友。 
    还有下属最忌讳的就是领导向他询问情况的时候,什么我不知道,我不清楚,该你知道的你凭什么不知道</div>
                                </li>
                                <li><a href="/article/2233.htm"
                                       title="[光速与宇宙]进行光速飞行的一些问题" target="_blank">[光速与宇宙]进行光速飞行的一些问题</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/%E9%97%AE%E9%A2%98/1.htm">问题</a>
                                    <div> 
 
     在人类整体进入宇宙时代,即将开展深空宇宙探索之前,我有几个猜想想告诉大家 
    仅仅是猜想。。。未经官方证实 
 
 
     1:要在宇宙中进行光速飞行,必须首先获得宇宙中的航行通行证,而这个航行通行证并不是我们平常认为的那种带钢印的证书,是什么呢? 下面我来告诉</div>
                                </li>
                                <li><a href="/article/2360.htm"
                                       title="oracle undo解析" target="_blank">oracle undo解析</a>
                                    <span class="text-muted">cwqcwqmax9</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a>
                                    <div>oracle undo解析2012-09-24 09:02:01     我来说两句       作者:虫师收藏    我要投稿 
 
Undo是干嘛用的?         &nb</div>
                                </li>
                                <li><a href="/article/2487.htm"
                                       title="java中各种集合的详细介绍" target="_blank">java中各种集合的详细介绍</a>
                                    <span class="text-muted">dashuaifu</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E9%9B%86%E5%90%88/1.htm">集合</a>
                                    <div>一,java中各种集合的关系图 Collection       接口的接口     对象的集合  ├ List           子接口   &n</div>
                                </li>
                                <li><a href="/article/2614.htm"
                                       title="卸载windows服务的方法" target="_blank">卸载windows服务的方法</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/windows/1.htm">windows</a><a class="tag" taget="_blank" href="/search/service/1.htm">service</a>
                                    <div>卸载Windows服务的方法 
在Windows中,有一类程序称为服务,在操作系统内核加载完成后就开始加载。这里程序往往运行在操作系统的底层,因此资源占用比较大、执行效率比较高,比较有代表性的就是杀毒软件。但是一旦因为特殊原因不能正确卸载这些程序了,其加载在Windows内的服务就不容易删除了。即便是删除注册表中的相 应项目,虽然不启动了,但是系统中仍然存在此项服务,只是没有加载而已。如果安装其他</div>
                                </li>
                                <li><a href="/article/2741.htm"
                                       title="Warning: The Copy Bundle Resources build phase contains this target's Info.plist" target="_blank">Warning: The Copy Bundle Resources build phase contains this target's Info.plist</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/ios/1.htm">ios</a><a class="tag" taget="_blank" href="/search/xcode/1.htm">xcode</a>
                                    <div>       
      
http://developer.apple.com/iphone/library/qa/qa2009/qa1649.html 
Excerpt: 
 
 You are getting this warning because you probably added your Info.plist file to your Copy Bundle </div>
                                </li>
                                <li><a href="/article/2868.htm"
                                       title="2014之C++学习笔记(一)" target="_blank">2014之C++学习笔记(一)</a>
                                    <span class="text-muted">Etwo</span>
<a class="tag" taget="_blank" href="/search/C%2B%2B/1.htm">C++</a><a class="tag" taget="_blank" href="/search/Etwo/1.htm">Etwo</a><a class="tag" taget="_blank" href="/search/Etwo/1.htm">Etwo</a><a class="tag" taget="_blank" href="/search/iterator/1.htm">iterator</a><a class="tag" taget="_blank" href="/search/%E8%BF%AD%E4%BB%A3%E5%99%A8/1.htm">迭代器</a>
                                    <div>        已经有很长一段时间没有写博客了,可能大家已经淡忘了Etwo这个人的存在,这一年多以来,本人从事了AS的相关开发工作,但最近一段时间,AS在天朝的没落,相信有很多码农也都清楚,现在的页游基本上达到饱和,手机上的游戏基本被unity3D与cocos占据,AS基本没有容身之处。so。。。最近我并不打算直接转型</div>
                                </li>
                                <li><a href="/article/2995.htm"
                                       title="js跨越获取数据问题记录" target="_blank">js跨越获取数据问题记录</a>
                                    <span class="text-muted">haifengwuch</span>
<a class="tag" taget="_blank" href="/search/jsonp/1.htm">jsonp</a><a class="tag" taget="_blank" href="/search/json/1.htm">json</a><a class="tag" taget="_blank" href="/search/Ajax/1.htm">Ajax</a>
                                    <div>js的跨越问题,普通的ajax无法获取服务器返回的值。 
 
  第一种解决方案,通过getson,后台配合方式,实现。 
Java后台代码: 
protected void doPost(HttpServletRequest req, HttpServletResponse resp) 
throws ServletException, IOException { 
String ca</div>
                                </li>
                                <li><a href="/article/3122.htm"
                                       title="蓝色jQuery导航条" target="_blank">蓝色jQuery导航条</a>
                                    <span class="text-muted">ini</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a><a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/jquery/1.htm">jquery</a><a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/html5/1.htm">html5</a>
                                    <div>效果体验:http://keleyi.com/keleyi/phtml/jqtexiao/39.htmHTML文件代码: 
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>jQuery鼠标悬停上下滑动导航条 - 柯乐义<</div>
                                </li>
                                <li><a href="/article/3249.htm"
                                       title="linux部署jdk,tomcat,mysql" target="_blank">linux部署jdk,tomcat,mysql</a>
                                    <span class="text-muted">kerryg</span>
<a class="tag" taget="_blank" href="/search/jdk/1.htm">jdk</a><a class="tag" taget="_blank" href="/search/tomcat/1.htm">tomcat</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a>
                                    <div>1、安装java环境jdk: 
    一般系统都会默认自带的JDK,但是不太好用,都会卸载了,然后重新安装。 
   1.1)、卸载: 
     (rpm -qa :查询已经安装哪些软件包; 
       rmp -q 软件包:查询指定包是否已</div>
                                </li>
                                <li><a href="/article/3376.htm"
                                       title="DOMContentLoaded VS onload VS onreadystatechange" target="_blank">DOMContentLoaded VS onload VS onreadystatechange</a>
                                    <span class="text-muted">mutongwu</span>
<a class="tag" taget="_blank" href="/search/jquery/1.htm">jquery</a><a class="tag" taget="_blank" href="/search/js/1.htm">js</a>
                                    <div>1. DOMContentLoaded 在页面html、script、style加载完毕即可触发,无需等待所有资源(image/iframe)加载完毕。(IE9+) 
 
2. onload是最早支持的事件,要求所有资源加载完毕触发。 
 
3. onreadystatechange 开始在IE引入,后来其它浏览器也有一定的实现。涉及以下 document , applet, embed, fra</div>
                                </li>
                                <li><a href="/article/3503.htm"
                                       title="sql批量插入数据" target="_blank">sql批量插入数据</a>
                                    <span class="text-muted">qifeifei</span>
<a class="tag" taget="_blank" href="/search/%E6%89%B9%E9%87%8F%E6%8F%92%E5%85%A5/1.htm">批量插入</a>
                                    <div>hi, 
  自己在做工程的时候,遇到批量插入数据的数据修复场景。我的思路是在插入前准备一个临时表,临时表的整理就看当时的选择条件了,临时表就是要插入的数据集,最后再批量插入到数据库中。 
   
WITH tempT AS (
SELECT
item_id AS combo_id,
item_id,
now() AS create_date
FROM
a</div>
                                </li>
                                <li><a href="/article/3630.htm"
                                       title="log4j打印日志文件 如何实现相对路径到 项目工程下" target="_blank">log4j打印日志文件 如何实现相对路径到 项目工程下</a>
                                    <span class="text-muted">thinkfreer</span>
<a class="tag" taget="_blank" href="/search/Web/1.htm">Web</a><a class="tag" taget="_blank" href="/search/log4j/1.htm">log4j</a><a class="tag" taget="_blank" href="/search/%E5%BA%94%E7%94%A8%E6%9C%8D%E5%8A%A1%E5%99%A8/1.htm">应用服务器</a><a class="tag" taget="_blank" href="/search/%E6%97%A5%E5%BF%97/1.htm">日志</a>
                                    <div>最近为了实现统计一个网站的访问量,记录用户的登录信息,以方便站长实时了解自己网站的访问情况,选择了Apache 的log4j,但是在选择相对路径那块 卡主了,X度了好多方法(其实大多都是一样的内用,还一个字都不差的),都没有能解决问题,无奈搞了2天终于解决了,与大家分享一下 
 
 
需求: 
用户登录该网站时,把用户的登录名,ip,时间。统计到一个txt文档里,以方便其他系统调用此txt。项目名</div>
                                </li>
                                <li><a href="/article/3757.htm"
                                       title="linux下mysql-5.6.23.tar.gz安装与配置" target="_blank">linux下mysql-5.6.23.tar.gz安装与配置</a>
                                    <span class="text-muted">笑我痴狂</span>
<a class="tag" taget="_blank" href="/search/mysql/1.htm">mysql</a><a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a><a class="tag" taget="_blank" href="/search/unix/1.htm">unix</a>
                                    <div>1.卸载系统默认的mysql 
 
[root@localhost ~]# rpm -qa | grep mysql 
mysql-libs-5.1.66-2.el6_3.x86_64
mysql-devel-5.1.66-2.el6_3.x86_64
mysql-5.1.66-2.el6_3.x86_64
[root@localhost ~]# rpm -e mysql-libs-5.1</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html>