注册 登录
  • 一份付出一分收获点我获取博客邀请码
  • 明明可以过安分的生活,却偏偏有颗不安分的心。赞助会员表
  • 遇到问题时,不要轻易去放弃所遇到的这个难题,解决问题的方法有很多种,主要看你动不动脑了。最新电影电视
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏或者分享给其他技术爱好者
  • 本站福利,湖南卫视在线直播。点我查看湖南卫视直播

源码安装jdk1.8和tomcat8.5

java 大自然搬运工 237次浏览 0个评论 扫描二维码

下载jdk

源码安装jdk1.8和tomcat8.5

 

安装jdk

[root@iZj6cffp8anaguadrxuwx8Z ~]# cd /usr/local/src/

[root@iZj6cffp8anaguadrxuwx8Z src]# tar -xvf jdk-8u191-linux-x64.tar.gz

[root@iZj6cffp8anaguadrxuwx8Z src]# mkdir -p /usr/java
[root@iZj6cffp8anaguadrxuwx8Z src]# mv jdk
jdk1.8.0_191/ jdk-8u191-linux-x64.tar.gz 
[root@iZj6cffp8anaguadrxuwx8Z src]# mv jdk1.8.0_191/ /usr/java/

[root@iZj6cffp8anaguadrxuwx8Z src]# cd /usr/java/
[root@iZj6cffp8anaguadrxuwx8Z java]# ln -s /usr/java/jdk1.8.0_191/ /usr/java/latest
[root@iZj6cffp8anaguadrxuwx8Z java]# ln -s /usr/java/latest/ /usr/java/default

环境变量

echo '#!/bin/sh' >>/etc/profile.d/java.sh
echo "# This is JAVA profile by zhaoshuai in $(date +%F)." >>/etc/profile.d/java.sh
echo 'export JAVA_HOME=/usr/java/latest' >>/etc/profile.d/java.sh
echo 'export JRE_HOME=/usr/java/latest/jre' >>/etc/profile.d/java.sh
echo 'export CLASSPATH=$JAVA_HOME/lib/:$JRE_HOME/lib' >>/etc/profile.d/java.sh
echo 'export PATH=$JAVA_HOME/bin:$PATH' >>/etc/profile.d/java.sh
cat /etc/profile.d/java.sh
source /etc/profile.d/java.sh

检查

[root@iZj6cffp8anaguadrxuwx8Z java]# java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)

安装tomcat

源码安装jdk1.8和tomcat8.5

 

 

解压

[root@iZj6cffp8anaguadrxuwx8Z src]# tar -zxf apache-tomcat-8.5.37.tar.gz 
[root@iZj6cffp8anaguadrxuwx8Z src]# mv apache-tomcat-8.5.37 /usr/local/tomcat

启动

[root@iZj6cffp8anaguadrxuwx8Z ~]# /usr/local/tomcat/bin/catalina.sh start 
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr/java/latest/jre
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
[root@iZj6cffp8anaguadrxuwx8Z ~]# ps -ef |grep --color=auto tomcat
root 11255 1 18 12:18 pts/0 00:00:01 /usr/java/latest/jre/bin/java -Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Dignore.endorsed.dirs= -classpath /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/tomcat/temp org.apache.catalina.startup.Bootstrap start
root 11273 28820 0 12:18 pts/0 00:00:00 grep --color=auto --color=auto tomcat
[root@iZj6cffp8anaguadrxuwx8Z ~]# tail -f /usr/local/tomcat/logs/catalina.out 
24-Dec-2018 12:18:19.377 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/usr/local/tomcat/temp
24-Dec-2018 12:18:19.377 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
24-Dec-2018 12:18:19.663 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
24-Dec-2018 12:18:19.686 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
24-Dec-2018 12:18:19.714 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
24-Dec-2018 12:18:19.715 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read

 

源码安装jdk1.8和tomcat8.5


大自然搬运工 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明源码安装jdk1.8和tomcat8.5
喜欢 (0)
[扫描二维码]
分享 (0)
大自然搬运工
关于作者:
不是路不平,而是你不行。到底行不行,看你停不停。只要你不停,早晚都能行。
发表我的评论
取消评论

*

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址