将防火墙关闭并设置为开机不自动启动:
systemctl stop firewalld.service
systemctl disable firewalld.service
Linux系统中JDK的安装与配置
进入opt目录下 :cd /opt
在opt目录下上传jdk文件 :jdk-8u152-linux-x64.tar.gz
解压 :tar -zxvf jdk-8u152-linux-x64.tar.gz
进入etc目录下:cd /etc
备份:cp profile profile.bak
修改:vim profile
大写G,进入文件末尾,输入i进行修改模式,末尾添加以下配置:
JAVA_HOME=/opt/jdk1.8.0_152
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME PATH
然后保存退出:按Esc+:wq
执行当前连接刚刚配置的脚本文件使配置文件生效:source /etc/profile 或者reboot重启
查看jdk版本:java -version
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
查看:path路径:echo $PATH
/opt/jdk1.8.0_152/bin:/opt/jdk1.8.0_152/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
查看:JAVA_HOME路径:echo $JAVA_HOME
/opt/jdk1.8.0_152
Tomcat安装与配置
进入opt目录:cd /opt
在opt目录下上传apache-tomcat-8.5.24.tar.gz
解压: tar -zxvf apache-tomcat-8.5.24.tar.gz
启动tomcat: /opt/apache-tomcat-8.5.24/bin/startup.sh
如果报错进入logs目录查看:cd /opt/apache-tomcat-8.5.24/logs
查看日志:less catalina.out
MySQL的安装与配置
进入opt目录:cd /opt
在opt目录下上传MySQL-server-5.5.52-1.el6.x86_64.rpm和MySQL-client-5.5.52-1.el6.x86_64.rpm
更多内容请见原文,原文转载自:https://blog.csdn.net/weixin_44519496/article/details/120632972
标签:opt,bin,152,tar,第十章,cd,Linux,服务器,HOME From: https://www.cnblogs.com/wangchuanxinshi/p/17657686.html