Environment configuration of JDK, mysql and tomcat under Centos7
- This article will take you to understand the configuration of jdk, mysql and tomcat under Centos7. After reading this article, the environment configuration So easy
- jdk configuration
- Unzip the command tar -xzvf file name 1. vim /etc/profile
JDK path
export JAVA_HOME=/usr/local/jdk8
export CLASSPATH=.:{JAVA_HOME}/jre/lib/rt.jar:{JAVA_HOME}/lib/dt.jar:{JAVA_HOME}/lib/tools.jar
export PATH=PATH:${JAVA_HOME}/bin
- source /etc/profile
- java -version
- Install Docker
If you want to learn more about Dock, you can configure Alibaba Cloud's accelerator, you know the domestic environment
sudo apt-get -y update
sudo apt-get -y install docker
sudo systemctl start docker
- mysql installation (using docker image)
docker pull mysql:5.6
Get it in one line of code, start the mirror
docker run -it --name tanoak-mysql -p 3308:3306 -v /my/custom:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=123123 -d mysql:5.6
- tomcat configuration
After installing the JDK, just upload the tomcat to the server, find startup.sh in the bin directory of tomcat and run ./startup.sh
No accident, there will be a firewall, so you need to turn off the firewall
service iptables stop #Out of service
If you encounter problems during the configuration process, you can leave a message and discuss with each other.