Linux安装jdk、tomcat、mysql

时间:2021-07-15 22:50:39

一、jdk和tomcat:将两者的包解压(tar xvf /opt/soft/jdk1.8.0_131 -C /opt/app/)到/opt/app/文件下,注意:jdk和tomcat不用安装,他俩走的是环境变量,最后的配置文件vi /etc/profile的最下面添加信息为:

  JAVA_HOME=/opt/app/jdk1.8.0_131
  CLASSPATH=$JAVA_HOME/lib/
  CATALINA_HOME=/opt/app/apache-tomcat-7.0.68
  PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin
  export PATH JAVA_HOME CLASSPATH CATALINA_HOME

这就行了,java -version 查看jdk版本,在tomcat的bin下启动tomcat:./startup.sh   查看网站为:192.168.10.101:8080/

二、然后是MySQL,注意mysql是个软件,需安装:参考下方链接

 

 

jdk参照:https://www.cnblogs.com/fengweiweicoder/p/10777032.html

tomcat参照:https://blog.csdn.net/fukai8350/article/details/80467224

mysql参照:https://www.cnblogs.com/shuangfeike/p/11393863.html