linux 安装jdk 和tomcat

lingxue 2018-08-29 18:42:59 阅读 411 评论 0 喜欢 0
tomcat linux jdk 

1 下载jdk

  去 官网 下载安装包上传到服务器某个目录下

 image.png


服务器如果可以访问外网,可以右键复制链接地址(注意选择接受协议),用wget 命令下载

wget http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz


2 解压jdk

tar  -zxvf  jdk-8u131-linux-x64.tar.gz

 解压后的jdk目录最后移动到 /usr/local/java 目录下


3 配置环境变量

编辑文件 vim /etc/profile  
在文件末尾加上以下代码
export JAVA_HOME=/usr/local/java/jdk1.8.0_1312 
export JRE_HOME=${JAVA_HOME}/jre3 
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH4 
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin5 
export PATH=$PATH:${JAVA_PATH}
按esc退出到命令模式,输入 :wq 命令可以保存退出编辑


 4 检验是否安装配置成功

输入命令 java -version,出来正确的版本号表示成功。



5 下载tomcat

  到官网: 下载文件上传到服务器


image.png

服务器如果可以访问外网,可以右键复制链接地址,用wget 命令下载

wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.33/bin/apache-tomcat-8.5.33.tar.gz


6 解压tomcat

tar -zxvf apache-tomcat-8.5.4.tar.gz


7 启动tomcat 

切换到tomcat的bin目录下 运行命令 sh startup.sh, 能访问tomcat则表示成功


支持@用户名回复

×  

:bowtie: :smile: :laughing: :blush: :smiley: :relaxed: :smirk: :heart_eyes: :kissing_heart: :kissing_closed_eyes: :flushed: :relieved: :satisfied: :grin: :wink: :stuck_out_tongue_winking_eye: :stuck_out_tongue_closed_eyes: :grinning: :kissing: :kissing_smiling_eyes: :stuck_out_tongue: :sleeping: :worried: :frowning: :anguished: :open_mouth: :grimacing: :confused: :hushed: :expressionless: :unamused: :sweat_smile: :sweat: :weary: :pensive: :disappointed: :confounded: :fearful: :cold_sweat: :persevere: :cry: :sob: :joy: :astonished: :scream: :neckbeard: :tired_face: :angry: :rage: :triumph: :sleepy: :yum: :mask: :sunglasses: :dizzy_face: :imp: :smiling_imp: :neutral_face: :no_mouth: :innocent: :alien: :yellow_heart: :blue_heart: :purple_heart: :heart: :green_heart: :broken_heart: :heartbeat: :heartpulse: :two_hearts: :revolving_hearts: :cupid: :sparkling_heart: :sparkles: :star: :star2: :dizzy: :boom: :collision: :anger: :exclamation: :question: :grey_exclamation: :grey_question: :zzz: :dash: :sweat_drops: :notes: :musical_note: :fire: :hankey: :poop: :shit: :+1: :thumbsup: :-1: :thumbsdown: :ok_hand: :punch: :facepunch: :fist: :v: :wave: :hand: :open_hands: :point_up: :point_down: :point_left: :point_right: :raised_hands: :pray: :point_up_2: :clap: :muscle: :metal: :walking: :runner: :running: :couple: :family: :two_men_holding_hands: :two_women_holding_hands: :dancer: :dancers: :ok_woman: :no_good: :information_desk_person: :raised_hand: :bride_with_veil: :person_with_pouting_face: :person_frowning: :bow: :couplekiss: :couple_with_heart: :massage: :haircut: :nail_care: :boy: :girl: :woman: :man: :baby: :older_woman: :older_man: :person_with_blond_hair: :man_with_gua_pi_mao: :man_with_turban: :construction_worker: :cop: :angel: :princess: :smiley_cat: :smile_cat: :heart_eyes_cat: :kissing_cat: :smirk_cat: :scream_cat: :crying_cat_face: :joy_cat: :pouting_cat: :japanese_ogre: :japanese_goblin: :see_no_evil: :hear_no_evil: :speak_no_evil: :guardsman: :skull: :feet: :lips: :kiss: :droplet: :ear: :eyes: :nose: :tongue: :love_letter: :bust_in_silhouette: :busts_in_silhouette: :speech_balloon: :thought_balloon:

共0条评论

相似文章

  • 顶部
  • 关灯
  • 留言
  • 点赞