ubuntu下使用apt-get安装tomcat8

 时间:2026-02-12 10:11:43

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

  • Linux下apache开启日志记录,记录自定义web日志
  • 使用SecureCRT链接linux、ubuntu系统
  • Windows server 2008不显示最后登录的用户名
  • Ubuntu18.04安装中文输入法
  • Ubuntu 中ssh安装和配置
  • 热门搜索
    鸡丝面的做法 手抓饼的做法视频 鱼丸子的家常做法 肉皮冻的家庭简单做法 萝卜咸菜的做法大全 萝卜丝饼的做法 烤箱烤鱼的做法大全 臊子肉的做法 蔬菜沙拉做法 鸽子汤的家常做法