CentOS作为服务器系统,稳定的状态成为良好的口碑。现在模拟服务器环境安装配置Java、Tomcat并对Tomcat做优化自启动。
系统:CentOS 6.9
Java:jdk-8u121-linux-i586.rpm
Tomcat:apache-tomcat-8.5.13.tar.gz
安装Java
#查看系统自带的Java并对应删除
[root@localhost ~]# rpm -qa | grep java java_cup-0.10k-5.el6.i686 tzdata-java-2017b-1.el6.noarch java-1.5.0-gcj-1.5.0.0-29.1.el6.i686 [root@localhost ~]# rpm -e --nodeps java-1.5.0-gcj-1.5.0.0-29.1.el6.i686
#下载好JDK文件,查看rpm包详细信息
[root@localhost 下载]# rpm -qip jdk-8u121-linux-i586.rpm Name : jdk1.8.0_121 Relocations: /usr/java Version : 1.8.0_121 Vendor: Oracle Corporation Release : fcs Build Date: 2016年12月13日 星期二 08时28分49秒 Install Date: (not installed) Build Host: sca00boj.us.oracle.com Group : Development/Tools Source RPM: jdk1.8.0_121-1.8.0_121-fcs.src.rpm Size : 279013566 License: http://java.com/license Signature : (none) Packager : Java Software <[email protected]> URL : URL_REF Summary : Java Platform Standard Edition Development Kit Description : The Java Platform Standard Edition Development Kit (JDK) includes both the runtime environment (Java virtual machine, the Java platform classes and supporting files) and development tools (compilers, debuggers, tool libraries and other tools). The JDK is a development environment for building applications, applets and components that can be deployed with the Java Platform Standard Edition Runtime Environment.
#看到默认安装目录是Relocations: /usr/java
继续阅读“CentOS6下安装Java+Tomcat优化并自启动”