ubuntu下使用apt-get安装tomcat8

时间:2024-10-15 12:58:59

1、直接使用apt-get命令下载tomcat8:sudo apt-get install tomcat8

ubuntu下使用apt-get安装tomcat8

2、需要一段时间让它自行下载,最后会看到两个done,下载完成。

ubuntu下使用apt-get安装tomcat8

3、查看下载后的tomcat8安装到了那里:whereis tomcat8可以看到它的配置文件在/etc/tomcat8下,启动文件在/usr/share/tomcat8下。

ubuntu下使用apt-get安装tomcat8

4、cd 到/etc/tomcat8下可以看到tomcat全局配置文件。

ubuntu下使用apt-get安装tomcat8

5、但是我们常见的webapps在哪里?其实它是在/var/lib/tomcat8下面,cd/var/lib/tomcat8后,我们可以看到熟悉的webapps文件夹。

ubuntu下使用apt-get安装tomcat8

6、tomcat8安装后默认就启动了。我们可以直接访问8080端口查看。如下图:看到It Works,说明tomcat8安装并启动成功。

ubuntu下使用apt-get安装tomcat8

7、另外,tomcat8安装后默认配置了服务。可以使用下面命令查看状态、启动、停止。sudo service tomcat8 status查看状态sudo service tomcat8 start启动sudo service tomcat8 stop停止

ubuntu下使用apt-get安装tomcat8
ubuntu下使用apt-get安装tomcat8
© 手抄报圈