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

Install Tomcat 6 on CentOS or RHEL --转载

发布时间:2021-01-25 19:19:11 所属栏目: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??

(编辑:ASP站长)

【免责声明】本站内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

相关内容
未处理完善
    无相关信息
未处理完善