Install tomcat 7.0.42 in ubuntu

frome http://askubuntu.com/questions/339169/how-to-install-tomcat-7-0-42-on-ubuntu-12-04-3-lts

Note: visit this question if you want to know why it‘s not in the repositories: Why don‘t the Ubuntu repositories have the latest versions of software?

Prerequisite: you need to have Java installed, and we need its path. Java is usually installed under /usr/lib/jvm. Once you have installed Java, you can run the command update-alternatives --config java to show you the exact path; look at the first entry (the one with a * next to it. You can hit Enter to exit this screen). We only need the directory after /jvm/. On my machine, the directory was /usr/lib/jvm/java-7-openjdk-i386/. This answer will assume that this is the Java directory, but you should change the commands accordingly.

  1. wget http://mirror.atlanticmetro.net/apache/tomcat/tomcat-7/v7.0.42/bin/apache-tomcat-7.0.42.tar.gz

    • This will download Tomcat 7.0.42 to your current directory.
  2. tar xzvf apache-tomcat-7.0.42.tar.gz
    • This will extract the files.
  3. sudo mv apache-tomcat-7.0.42 /usr/local
    • This moves Tomcat to /usr/local. You can choose any path you want. The remaining commands will assume you have used this path.
  4. nano ~/.bashrc - this will open up a text editor. Go to the end of the file (Alt+/) and add the following two lines:
    export CATALINA_HOME=/usr/local/apache-tomcat-7.0.42
    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386/
    

    Remember: this was the path to my Java. Change it to your installed Java.

  5. . ~/.bashrc
    • This will apply the changes we made.
  6. sudo $CATALINA_HOME/bin/startup.sh - you should see something like this:
    Using CATALINA_BASE:   /usr/local/apache-tomcat-7.0.42
    Using CATALINA_HOME:   /usr/local/apache-tomcat-7.0.42
    Using CATALINA_TMPDIR: /usr/local/apache-tomcat-7.0.42/temp
    Using JRE_HOME:        /usr
    Using CLASSPATH:       /usr/local/apache-tomcat-7.0.42/bin/bootstrap.jar:/usr/local/apache-tomcat-7.0.42/bin/tomcat-juli.jar
    

    And no errors.

You‘re done. Point your browser to http://localhost:8080 and you should see the Tomcat page:


shareimprove this answer
时间: 2024-08-24 07:21:13

Install tomcat 7.0.42 in ubuntu的相关文章

How to install Freemind 1.0.1 to Ubuntu 14

安装了Freemind0.9后发现不能打开windows的1.0.1保存的*.mm文件,便对版本开始升级. 1. 从http://freemind.sourceforge.net/wiki/index.php/Download找到ubuntu的对应版本下载http://www.getdeb.net/app/Freemind  (1.0.1) 2. 使用Ubuntu Software Center 安装这个deb文件的时候发现需要一些包但是这些依赖包不被信任.于是用apt-get install

How to install tomcat 6.0.43 on OEL 6u6 x86 64bit

1. 安装必要package 2. 解压tomcat pacakge并置于安装目录 3. 测试 1. 安装必要package [[email protected] bin]# java -version 2. 解压tomcat pacakge并置于安装目录 [[email protected] huchi]# tar zxvf apache-tomcat-6.0.43.tar.gz [[email protected] huchi]# cp -r apache-tomcat-6.0.43 /us

Install CUDA 6.0 on Ubuntu 14.04 LTS

Ubuntu 14.04 LTS is out, loads of new features have been added. Here are some procedures I followed to install CUDA 6.0 on my DELL Inspiron. First of all, Ubuntu need to be installed successfully, and the necessary libs are also need to installed: su

HowTo: Install the IBM Notes 9.0 client on Ubuntu

IBM Notes (formerly Lotus Notes) is a corporate email and database collaboration tool. It's still popular and widely used, and at the time of writing is now up to version 9.0. Unfortunately IBM have a bad habit of assuming no-one uses 64-bit operatin

Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at

最近装了一个Ubuntu系统 在配置tomcat的时候总是出现这样的问题 Could not load the Tomcat server configuration at /Servers/Tomcat v7.0 Server at localhost-config. The configuration may be corrupt or incomplete. 我首先配置的是tomcat-7.0.27,我以为这不行.后来换成tomcat6.0结果还是报同样的错误 最后导致2个都添加不进去了如

tomcat -6.0.35- 安装与配置

本文介绍tomcat 6.0.35的安装与配置,好了废话不多说,下面开始 运行环境:redhat-6.5-64bit 虚拟机:vbox 5.1 1.安装软件下载地址下载6.0.35版本: http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.35/bin/ 2.上传至服务器并解压 tar -xvf apache-tomcat-6.0.35.tar.gz 3.使用命令 java  -version 检查java版本.如果没有就通过yum安装一下 一

Tomcat 9.0安装配置

本文转自:http://blog.sina.com.cn/s/blog_15126e2170102w5o8.html 一.JDK的安装与配置 1.从官网下载jdk,注意是jdk不是jre.最好从官网下载,也可以直接度娘. 2.下载完毕后,安装jdk,?直接按照安装向导的提示安装即可,安装时可以自己选择安装路径,我的安装路径是C:\Program Files\Java\jdk1.8.0_31 3.配置环境变量:右击计算机—属性—高级系统设置—环境变量,如图 ?在“系统变量”中,设置3项属性,JAV

【转】install intel wireless 3165 driver for ubuntu 14.04.3

[转]install intel wireless 3165 driver for ubuntu 14.04.3 Ubuntu 14.04.3 with 3.19 kernel can’t drive the new Intel Wireless 3165 AC with firmware version 13.This is about how to install the driver mannually. Today I changed a new Dell vastro 5000 ser

centos7编译安装pure-ftpd-1.0.42

1.下载 wget https://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.42.tar.gz 2.安装 tar xvf pure-ftpd-1.0.42.tar.gz cd pure-ftpd-1.0.42 ./configure --prefix=/usr/local/pureftpd --with-everything --with-cookie --with-diraliases --with-extauth