星空网 > 软件开发 > 操作系统

Ubuntu 12.04下解决Tomcat自启动问题

当我们安装好Tomcat使用后发现,每次启动都需要在终端中手动键入sudo /var/tomcat/bin/startup.sh,那么我们怎么解决这个问题呢 

http://hovertree.com/menu/ubuntu/

以下是我的解决方案: 

1.首先打开终端,输入su,接着输入ROOT的密码获得ROOT权限。进入/etc文件夹(使用cd /etc命令) 

2.打开rc.local文件(在/etc目录下使用vi rc.local命令) 

3.rc.local文件内容默认如下 

#!/bin/sh -e 



# rc.local 



# This script is executed at the end of each multiuser runlevel. 

# Make sure that the script will "exit 0" on success or any other 

# value on error. 



# In order to enable or disable this script just change the execution 

# bits. 



# By default this script does nothing. 

/var/tomcat/bin/startup.sh 

exit 0 

4.红色内容为我们手动添加的内容,这里指的是tomcat启动项,那么如何更改呢,首先键入A 进入INSERT模式,移动光标到红色位置输入准确路径,按ESC退出INSERT模式,光标移动到行尾,键入:wq保存文件 

至此,我们已经解决这个问题,重启Ubuntu我们发现已经可以自动访问Tomcat下的内容了

推荐:http://www.cnblogs.com/roucheng/p/ubuntu.html




原标题:Ubuntu 12.04下解决Tomcat自启动问题

关键词:ubuntu

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

食品跨境物流:https://www.goluckyvip.com/tag/93030.html
跨境电商物流中心:https://www.goluckyvip.com/tag/93031.html
跨境电商智能物流:https://www.goluckyvip.com/tag/93033.html
跨境电商物流协同:https://www.goluckyvip.com/tag/93034.html
跨境电商物流专员:https://www.goluckyvip.com/tag/93035.html
跨境电商物流仓库:https://www.goluckyvip.com/tag/93036.html
重庆品胜科技与星苹台达成合作 助力部队现代化后勤建设 :https://www.kjdsnews.com/a/1836523.html
回乡创业,不知道干什么,能否推荐几个农村老家创业的好项目?:https://www.vstour.cn/a/365177.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流