1.\u7f16\u8bd1\u5b89\u88c5jdk<\/strong><\/span><\/div>\n[root@localhost src]# mkdir \/usr\/java #\u521b\u5efa\u5b58\u653e\u76ee\u5f55<\/span>\r\n[root@localhost src]# tar -zxvf jdk-8u131-linux-x64.tar.gz #\u89e3\u538b\u4e0b\u8f7d\u597d\u7684<\/span>jdk\r\n[root@localhost src]# mv jdk1.8.0_131\/ \/usr\/java #\u79fb\u52a8\u5230\u521b\u5efa\u7684\u76ee\u5f55<\/span>\r\n<\/code><\/pre>\n2.\u914d\u7f6ejdk\u73af\u5883<\/strong><\/span><\/div>\n\n- \u5168\u5c40\u7528\u6237\u6dfb\u52a0JDK\u73af\u5883\u53d8\u91cf<\/li>\n<\/ul>\n
\u4ee5root\u7528\u6237<\/strong>\uff0c\u7f16\u8f91\u7cfb\u7edf\u5168\u5c40\u73af\u5883\u914d\u7f6e\u6587\u4ef6\/etc\/profile<\/p>\n[root@localhost src]# vim \/etc\/profile \r\n\u5728<\/span>\/etc\/profile\u6587\u4ef6\u5c3e\u90e8\u6dfb\u52a0\uff1a<\/span>\r\nexport JAVA_HOME=\/usr\/java\/jdk1.8.0_131 #jdk\u5b89\u88c5\u8def\u5f84<\/span>\r\nexport PATH=$JAVA_HOME\/bin:$JAVA_HOME\/jre\/bin:$PATH\r\nexport CLASSPATH=$JAVA_HOME\/lib:$JAVA_HOME\/jre\/lib:$CLASSPATH.\r\n<\/code><\/pre>\n\n- \u7ed9\u7528\u6237\u914d\u7f6eJDK\u73af\u5883\u53d8\u91cf\u4ee5tomcat\u7528\u6237\uff08\u5e94\u7528\u7cfb\u7edf\u7528\u6237\uff09\uff0c\u7f16\u8f91\u7528\u6237\u73af\u5883\u914d\u7f6e\u6587\u4ef6$HOME\/.bash_profile<\/li>\n<\/ul>\n
[tomcat@localhost ~]$ vim .bash_profile\r\n#<\/span>\u4fee\u6539\u4e3a\u4e0b\u9762\u7684\u5185\u5bb9<\/span><\/span>\r\n#<\/span> .bash_profile<\/span>\r\n#<\/span> Get the aliases and functions<\/span><\/span>\r\nif [ -f ~\/.bashrc ]; then\r\n . ~\/.bashrc\r\nfi\r\n#<\/span> User specific environment and startup programs<\/span>\r\nJAVA_HOME=\/usr\/java\/jdk1.8.0_131 #jdk\u5b89\u88c5\u8def\u5f84<\/span>\r\nexport JAVA_HOME\r\nCLASSPATH=.:$JAVA_HOME\/jre\/lib\/dt.jar:$JAVA_HOME\/jre\/lib\/tools.jar\r\nexport CLASSPATH\r\nPATH=$PATH:$HOME\/bin:$JAVA_HOME\/jre\/bin\r\nexport PATH\r\nexport LANG=zh_CN.UTF-8\r\n\r\n[tomcat@localhost ~]$ source \/etc\/profile\r\n[tomcat@localhost ~]$ java -version\r\njava version \"1.8.0_131\"\r\nJava(TM) SE Runtime Environment (build 1.8.0_131-b11)\r\nJava HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"[root@localhost src]# mkdir \/usr\/java #\u521b\u5efa\u5b58\u653e\u76ee\u5f55 [root@loc […]<\/p>\n","protected":false},"author":1476,"featured_media":110544,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-151569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/151569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1476"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=151569"}],"version-history":[{"count":4,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/151569\/revisions"}],"predecessor-version":[{"id":151649,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/151569\/revisions\/151649"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/110544"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=151569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=151569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=151569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}