加入收藏 | 设为首页 | 会员中心 | 我要投稿 威海站长网 (https://www.0631zz.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Install Tomcat 6 on CentOS or RHEL --转载

发布时间:2021-01-25 16:22:44 所属栏目:Linux 来源:网络整理
导读:p class="entryContent"? p class="entryContent"source:http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos p class="entryContent"This post will cover installation and configuration of Tomcat 6 on CentOS 5. We will also show how

Stop Tomcat:


<div class="dp-highlighter">
<div class="bar">
<div class="tools">
<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;?

  1. Using?CATALINA_BASE:???/usr/share/apache-tomcat-6.0.32??
  2. Using?CATALINA_TMPDIR:?/usr/share/apache-tomcat-6.0.32/temp??
  3. Using?CLASSPATH:???????/usr/share/apache-tomcat-6.0.32/bin/bootstrap.jar??

Restarting Tomcat (Must be started first):


<div class="dp-highlighter">
<div class="bar">
<div class="tools">
<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;?

  1. Using?CATALINA_BASE:???/usr/share/apache-tomcat-6.0.32??
  2. Using?CATALINA_TMPDIR:?/usr/share/apache-tomcat-6.0.32/temp??
  3. Using?CLASSPATH:???????/usr/share/apache-tomcat-6.0.32/bin/bootstrap.jar??
  4. Using?CATALINA_HOME:???/usr/share/apache-tomcat-6.0.32??
  5. Using?JRE_HOME:????????/usr/java/jdk1.6.0_24??

We should review the Catalina.out log located at /usr/share/apache-tomcat-6.0.32/logs/catalina.out and check for any errors.


<div class="dp-highlighter">
<div class="bar">
<div class="tools">
<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;?

We can now access the Tomcat Manager page at:

http://yourdomain.com:8080 or http://yourIPaddress:8080 and we should see the Tomcat home page.


<div style="color: #990000; text-align: center;">?
<div style="color: #990000; text-align: center;">
Step 5 (Optional): How to Run Tomcat using Minimally Privileged (non-root) User.

In our Tomcat configuration above,we are running Tomcat as Root.

For security reasons,it is always best to run services with the only those privileges that are necessary.

There are some who make a strong case that this is not required,but it's always best to err on the side of caution.

To run Tomcat as non-root user,we need to do the following:

  1. Create the group 'tomcat':


    <div class="dp-highlighter">
    <div class="bar">
    <div class="tools">
    <a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;view plain<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;copy to clipboard<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;print<a href="http://www.davidghedini.com/pg/entry/install_tomcat_6_on_centos"&gt;?
  1. [root@blanche?~]#?useradd?-s?/bin/bash?-g?tomcat?tomcat??

(编辑:威海站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

热点阅读