下載1.8jdkhtml
官網下載地址 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.htmljava
下載jdk8,放到linux的/usr/local/src/目錄下linux
[root@100xuni1 ~]# mv /root/jdk-8u181-linux-x64.tar.gz /usr/local/src/jdk-8u181-linux-x64.tar.gz ##把這個jdk包放到/usr/local/src/下
解壓數據庫
[root@100xuni1 src]# tar zxvf jdk-8u181-linux-x64.tar.gz
把解壓縮拷貝到/usr/local/下而且更名字apache
[root@100xuni1 src]# mv jdk1.8.0_181 /usr/local/jdk1.8
編輯/etc/profile這個配置文件的做用環境變量的vim
[root@100xuni1 src]# vim /etc/profile ##在這個配置文件最後添加如下內容
JAVA_HOME=/usr/local/jdk1.8/ JAVA_BIN=/usr/local/jdk1.8/bin JRE_HOME=/usr/local/jdk1.8/jre PATH=$PATH:/usr/local/jdk1.8/bin:/usr/local/jdk1.8/jre/bin CLASSPATH=/usr/local/jdk1.8/jre/lib:/usr/local/jdk1.8/lib:/usr/local/jdk1.8/jre/lib/charsets.jar
編輯完用source讓這個配置文件生效tomcat
[root@100xuni1 src]# source /etc/profile
生效後檢驗jdk是否成功oracle
[root@100xuni1 src]# java -version
進入/usr/local/src下,下載tomcatjsp
[root@100xuni1 ~]# cd /usr/local/src
[root@100xuni1 src]# wget http://apache.fayea.com/tomcat/tomcat-8/v8.5.33/bin/apache-tomcat-8.5.33.tar.gz
解壓縮ide
[root@100xuni1 src]# tar zxvf apache-tomcat-8.5.33.tar.gz
解壓完成後拷貝到/usr/local/而且更名字叫tomcat
[root@100xuni1 src]# mv apache-tomcat-8.5.33 /usr/local/tomcat
啓動tomcat
[root@100xuni1 src]# /usr/local/tomcat/bin/startup.sh
查看java是否啓動
[root@100xuni1 src]# ps aux|grep java
關閉tomcat
[root@100xuni1 src]# /usr/local/tomcat/bin/shutdown.sh
監聽端口
[root@100xuni1 src]# netstat -lntp |grep java
java容器比較 http://my.oschina.net/diedai/blog/271367
http://www.360doc.com/content/11/0618/21/16915_127901371.shtml
j2ee、j2se、ejb、javabean、serverlet、jsp之間關係 http://bbs.csdn.net/topics/50015576
tomcat server.xml配置詳解 http://blog.csdn.net/yuanxuegui2008/article/details/6056754
tomcat經常使用數據庫鏈接的方法 http://wjw7702.blog.51cto.com/5210820/1109263