一、前言
对于新装的centos系统,默认是没有tomcat的。我们可以使用 systemctl status tomcat 检测一下。

结果显示 没有找到tomcat服务,如何快速安装一个tomcat?
二、安装tomcat
1. yum install tomcat 或者 yum -y install tomcat ,安装tomcat

看到以上信息就是安装完成了。我们再使用 systemctl status tomcat 看下tomcat服务的状态。

可以看到,刚安装完默认是没有启动的
2. systemctl start tomcat 启动tomcat,然后再查看状态

3. 除以上基本命令外, 还有其他常用命令
systemctl stop tomcat 停止
systemctl restart tomcat 重启
网友评论