install tomcat

本文详细介绍了在Linux环境下安装和配置Apache Tomcat的过程,包括使用yum安装Tomcat,修改配置文件以优化Java运行参数,安装Tomcat webapps和admin-webapps组件,以及设置管理员用户。最后,指导如何启动Tomcat服务并实现开机自启。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1.install
  sudo yum install tomcat

  2.Change setting
  sudo vi /usr/share/tomcat/conf/tomcat.conf 
     add this to the last line:
      JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true -Xmx512m -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC"

  3.install tomcat-webapps
  sudo yum install tomcat-webapps tomcat-admin-webapps   
    these (ROOT,examples,sample ,manager)file will appear in tmocat/webapp ,this means the installation is completed!
      after that ,you should add user for webapps-tool ,
      sudo vi /usr/share/tomcat/conf/tomcat-users.xml
    add next line to tomcat-users.xml
    <user username="admin" password="password" roles="manager-gui,admin-gui"/>  

   4.start tomcat service  
  sudo systemctl start tomcat   |sudo systemctl restart tomcat 
  ps : if you wangto make it start automatically ,when restart your server
    sudo systemctl enable tomcat

 


转载于:https://www.cnblogs.com/nhz-M/p/8422594.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值