Linux下Tomcat安装与启动
2011-06-28 22:27
411 查看
从官网 www.apache.org
下载Tomcat 的相应Linux下的版本,本文以tomcat-5.5.33为例。
1) 解压成文件夹,视具体的文件格式而定。
2)
$ vi /etc/profile
#用vi编辑器打开该文件进行编辑(添加环境变量)
然后在文件的最尾部加入以下代码:
CATALINA_HOME=/tools/apache-tomcat-5.5.33
#(tomcat版本视自己的安装版本而定 )
export
CATALINA
_HOME
保存退出.
3) 现在在终端运行命令:
$ /tools/tomcat*/bin/startup.sh
#开启TOMCAT服务器
然后打开浏览器,输入http://localhost:8080或者 http://127.0.0.1:8080
如果你看到那只可爱的小猫了,就证明安装成功了!
备注:安装过程中遇到几个问题
问题1
:
can't find the file 'setclasspath.sh'
在网络上找到如下解释,意思就是需要再设置
Then all you need to do is to include the complete
paths for the BASEDIR and CATALINA_HOME variables in the files
setclasspath.sh and catalina.sh respectively.
This
should be done even if CATALINA_HOME has been defined and exported
previously on the command line and/or in /etc/profile as well.
Moreover, this error message persists even though the file
setclasspath.sh is present in Tomcat's bin directory.
下载Tomcat 的相应Linux下的版本,本文以tomcat-5.5.33为例。
1) 解压成文件夹,视具体的文件格式而定。
2)
$ vi /etc/profile
#用vi编辑器打开该文件进行编辑(添加环境变量)
然后在文件的最尾部加入以下代码:
CATALINA_HOME=/tools/apache-tomcat-5.5.33
#(tomcat版本视自己的安装版本而定 )
export
CATALINA
_HOME
保存退出.
3) 现在在终端运行命令:
$ /tools/tomcat*/bin/startup.sh
#开启TOMCAT服务器
然后打开浏览器,输入http://localhost:8080或者 http://127.0.0.1:8080
如果你看到那只可爱的小猫了,就证明安装成功了!
备注:安装过程中遇到几个问题
问题1
:
can't find the file 'setclasspath.sh'
在网络上找到如下解释,意思就是需要再设置
Then all you need to do is to include the complete
paths for the BASEDIR and CATALINA_HOME variables in the files
setclasspath.sh and catalina.sh respectively.
This
should be done even if CATALINA_HOME has been defined and exported
previously on the command line and/or in /etc/profile as well.
Moreover, this error message persists even though the file
setclasspath.sh is present in Tomcat's bin directory.
$ echo "BASEDIR=/path/to/tomcat" >> setclasspath.sh # /path/to 表示你的具体目录 $ echo "CATALINA_HOME=/path/to/tomcat" >> catalina.sh 但是在设置了如上的设置后,使用export命令查看环境变量,发现CATALINA_HOME仍没有改变,所以就是使用如下命令做修改 $ export CATALINA_HOME="/home/owner/tomcat-5.5.33" 问题2: 找不到JAVA_HOME 或者 JRE,由于未设置,因而Tomcat无法找到相应的环境变量,而无法启动 解决方法很简单,在终端中: $ export JAVA_HOME="/home/owner/tools/jdk1.6.0_26" 最发张Linux下,Firfox启动Tomcat的时候,虽然这种图片见的很多,但是,还是很喜欢看到这个画面的
相关文章推荐
- Linux red hat 5 下tomcat的安装及其环境变量配置 启动
- CentOS7,安装Tomcat8.5、JDK1.8,并设置开机启动(Linux CentOS Tomcat、JDK+Tomcat、Tomcat开机自启动)
- linux下tomcat 8的安装以及tomcat启动慢问题
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- linux 下安装jdk、tomcat并开机启动
- linux下tomcat 8的安装以及tomcat启动慢问题
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- LINUX安装tomcat 启动报异常 Protocol handler pause failed java.net.NoRouteToHostException: No route to host
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- linux【centos 】 安装tomcat并设置成开机启动
- 在linux中安装jdk以及tomcat并shell脚本关闭启动的进程
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- linux安装tomcat并作为服务启动
- Linux 平台下 JDK安装 TOMCAT安装(解压版) 启动 POSTGRESQL安装 启动 jboss安装
- 如何在Linux上安装tomcat并利用脚本快速启动
- Linux基本操作系列(二):在CentOS 6.8系统上安装Tomcat并配置自动启动
- linux安装jdk后启动tomcat无法访问启动后tomcat中的静态页面
- 如何在Linux下安装启动多个Tomcat