1.需要在/etc/init.d下面新建tomcat启动脚本
#!/bin/sh
#tomcat auto-start
#
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/tomcat.pid
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun
case $1 in
start)
sh /usr/lib/tomcat6/bin/startup.sh
;;
stop)
sh /usr/lib/tomcat6/bin/shutdown.sh
;;
restart)
sh /usr/lib/tomcat6/bin/shutdown.sh
sh /usr/lib/tomcat6/bin/startup.sh
;;
*)
echo 'Usage:tomcat start|stop|restart'
;;
esac
exit 0
2.这样还不能自动启动,需要添加到系统服务里面
使用
sysv-rc-conf tomcat on
也可以使用
update-rc.d tomcat6 defaults
update-rc.d tomcat6 remove
3如果提示找不到sysv-rc-conf
则需要安装
apt-get install sysv-rc-conf
4.如果本地设置没有设置好,Per会给出下面的错误提示:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "zh_CN.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
我们只需要执行以下命令就OK了
root@idealserver:~# apt-get install locales
root@idealserver:~# dpkg-reconfigure locales
root@idealserver:~# locale
5.reboot一下查看我们的tomcat是否已经启动.
分享到:
相关推荐
ubuntu中部署tomcat
ubuntu linux下安装tomcat
Ubuntu下使用Tomcat搭建网站出现中文乱码的问题.docx
ubuntu8.04中配置java+tomcat+eclipseMyEclipse开发环境(更新)
ubuntu 16.04安装tomcat 8.0图文详细教程
主要介绍了Ubuntu下配置Tomcat服务器以及设置自动启动的方法,适用于Java的web程序开发,需要的朋友可以参考下
ubuntu linux 下apache与tomcat的整合.txt
Ubuntu 12.04 安装配置 Tomcat 7.0.40Tomcat 服务器.docx
ubuntu 下安装配置tomcat,亲自实践总结的文档,ubuntu版本:ubuntu-10.10-amd64
linux系统下可以实现多个tomcat同时使用,部署多个软件
ubuntu+jdk+tomcat+eclipse 亲自实验 按照步骤操作即可
ubuntu中安装mysql/apache/tomcat/php环境
ubuntu+nginx+tomcat 实现负载匀衡
ubuntu14.04 不启动桌面,命令行中 U盘的自动挂载 只有在命令行中进行。 ubuntu14.04 不启动桌面,命令行中 U盘的自动挂载 只有在命令行中进行。 ubuntu14.04 不启动桌面,命令行中 U盘的自动挂载 只有在命令行中...
在ubuntu系统中安装jdk、tomcat. 在ubuntu系统中安装jdk、tomcat. 在ubuntu系统中安装jdk、tomcat.
如何在Ubuntu11.10版本配置JDK Tomcat Maven jenkins
安装网上其他人的指导,完全安装排错后的总结.
Ubuntu下安装jdk&tomcat Ubuntu下安装jdk&tomcat Ubuntu下安装jdk&tomcat
Ubuntu上Tomcat部署war包失败的解决办法.docx
该文档介绍了ununtu如何将tomcat注册成系统服务。