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

被折叠的 条评论
为什么被折叠?



