---------------------------------------------JDK-------------------------------------------------
Download the JDK on the Oracle website to download the rpm file
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Paste the Xftp software directly into the directory/usr/local (local for the custom folder, if not created enter the USR directory after entering mkdir+ folder name created)
Enter RPM-IVH JDK file name
Wait for installation to complete, install directory/usr/java
Editing system Environment variables
Vi/etc/profile
Input I
Add the following:
Export java_home=/usr/java/jdk1.7.0_71
Export classpath=.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jar
Export path= $JAVA _home/bin: $PATH
Note the punctuation, java_home is just MV to the path
Load the variable you just set
Source/etc/profile
Test whether the installation was successful
Enter java-version and then display the JDK version information, etc.
Input Javac will show Javac command help so the JDK and environment variables are configured successfully
---------------------------------------------TOMCAT-------------------------------------------------
Copy the Tomcat folder directly from the previous profile to the system
will prompt for insufficient permissions to the entire folder and its subfolders chmod 777-r/apache-tomcat-7.0.77
Rpm-qa|grep iptables Check if installation
To open the Tomcat port first Vi/etc/sysconfig/iptables
-A input-m state–state new-m tcp-p tcp–dport 80-j ACCEPT (allow 80 ports through the firewall)
-A input-m state–state new-m tcp-p tcp–dport 3306-j ACCEPT (Allow 3306 ports through the firewall)
-------------
CentOS7 didn't iptables this file.
Systemctl stop FIREWALLD First shut down the firewall
Download with yum to add DNS server vi/etc/resolv.conf
Add the following two lines to the file:
NameServer 8.8.8.8
NameServer 8.8.4.4
Save exit and restart Server service network restart. And then Ping www.baidu.com.
Yum Install iptables-services installation iptables Service
Then use Systemctl enable Iptables to start the iptables
Finally systemctl start iptables open iptables
Try the service Iptables save successfully after the/etc/sysconfig/iptables file is ready to add a port
-----------------
Finally start Tomcat
Enter the bin directory input./startup.sh boot
Ok
-----------------------------------------------Mysql--------------------------------------------
Linux install JDK tomcat MySQL