centos 下tomcat 自动启动

1、修改start.sh文件

vim /usr/local/tomcat8/bin/startup.sh

在文件头增加以下内容:

#!/bin/sh

# chkconfig: 2345 97 00 
# description:tomcat auto start 
#processname: tomcat

2、创建链接文件

ln –s /usr/local/tomcat8/bin/startup.sh /etc/init.d/tomcat

3、添加启动

chkconfig –-add  tomcat(add前是两个减号)

chkconfig tomcat on

4、检查

service tomcat start

时间: 2024-08-10 17:20:32

centos 下tomcat 自动启动的相关文章

Centos下tomcat配置

1.下载tomcat http://tomcat.apache.org安装说明 安装环境:CentOS Linux release 7.2.1511 (Core)     安装方式:源码安装     软件:apache-tomcat-7.0.72.tar.gz    下载地址:http://tomcat.apache.org/download-70.cgi 安装前提 系统必须已安装配置JDK6+,安装请参考:Centos下安装JDK环境配置. 安装tomcat 将apache-tomcat-7.

Centos下Tomcat 安装Apache Portable Runtime

APR(Apache Portable Runtime)是一个高可移植库,它是Apache HTTP Server 2.x的核心. APR有很多用途,包括访问高级IO功能(例如sendfile,epoll和OpenSSL),OS级别功能(随机数生成,系统状态等等),本地进程管理(共享内存,NT管道和UNIX sockets).这些功能可以使Tomcat作为一个通常的前台WEB服务器,能更好地和其它本地web技术集成,总体上让Java更有效率作为一个高性能web服务器平台而不是简单作为后台容器.在

centos下tomcat日志文件乱码

最近装了centos7.0 准备用来搭建web服务器.遇到一个问题折腾了很久: 在tomcat日志文件中的中文全部为?号,并不是因为linux的编码问题引起的,而是因为启动tomcat的时候需要设置java虚拟机的编码. 于是在daemon.sh中加入以下一句解决. JAVA_OPTS="$JAVA_OPTS -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8 -Duser.language=zh_CN -Dsun.jnu.e

CentOS 下 Tomcat安装和配置优化

官网下载 1.直接下载.tar.gz安装包,地址:http://tomcat.apache.org/download-70.cgi 2.使用wget命令下载(推荐). wget -c http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.70/bin/apache-tomcat-7.0.70.tar.gz 解压 依然是直接命令: tar -zxvf apache-tomcat-7.0.70.tar.gz 启动 进入解压后的apache-to

centos 下tomcat安装

1. 下载jdk8 wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F;oraclelicense=accept-securebackup-cookie"  http://download.oracle.com/otn-pub/java/jdk/8u73-b02/jdk-8u73-linux-x64.rpm rpm -ivh jdk*.rpm

centos下tomcat中文路径不识别

---恢复内容开始--- 原因是tomcat服务器不能正常识别中文路径名称,详情如下图: 该问题是由于tomcat不能正常识别中文路径,,解决方法如下: 找到web.xml,友情提示:最好先备份. 找到网站配置节点,配置如下: URIEncoding="GBK",编码根据需求配置. 见下图: 保存之后重启tomcat服务,重新访问地址. 原文地址:https://www.cnblogs.com/happen-/p/9090423.html

在CentOS下安装Ngix服务及集群PHP、Tomcat

资源下载地址:http://download.csdn.net/detail/attagain/7570597 一. Ngix依赖模块安装 Ngix依赖模块有:pcre.zlib.openssl.md5 /sha1(如果系统中没有安装相应模块,需要按照下列方式安装) 1. 安装pcre模块(8.35) 官方网站:http://www.pcre.org/ 安装命令: # unzip pcre-8.35.zip # cd pcre-8.35 # ./configure # make && ma

Linux下Tomcat开机自动启动

linux下tomcat开机自动启动有两种方法,一种是简单,一种是复杂而又专业的,使用shell脚本要实现,我们一般推荐shell脚本启动方式.下面我们分别介绍这两种方法. 1.shell脚本启动 众所周知,在linux中 设置开机自启动的服务,需要在/etc/rcX.d下挂载.除此之外还需要在/etc/init.d下些启动脚本.其实很简单,先export出所需要的 环境变量,例如JAVA_HOME,JRE_HOME, CATALINA_HOME, CATALINA_BASE什么的,然后再直接调

解决Centos 7 下 tomcat字体异常 Font '宋体' is not available to the JVM

错误提示: SEVERE: Servlet.service() for servlet [example] in context with path [/myproject] threw exception [Request processing failed; nested exception is net.sf.jasperreports.engine.util.JRFontNotFoundException: Font '宋体' is not available to the JVM. S