1. Download and unpack it

2. Go to the /usr directory

2.5 Grant all JDK permissions

chmod 777 -R jdk

3. Modify the /etc/profile file

Plus at the bottom

 exportJAVA_HOME = / usr/Java/jdk1.7.0 _60exportJRE_HOME = / usr/Java/jdk1.7.0 _60 / jreexportCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib

 export PATH=$PATH:$JAVA_HOME/bin
Copy the code

4. Source profile makes the file take effect

5. Check whether the java-version is installed successfully

  • Tomcat installation

  • 1. Unpack the

    • Unzip or tar
  • 2. Move to /usr

  • 3. Grant permission

  • 4. Run the./startup.sh command to check whether the installation is successful.

  • 5. Solve firewall and port problems

    • View tomcat logs in the bin directory./catalina.sh run.
    • Disabling the firewall service iptables stop// Redhat series

Service ufw stop // Ubuntu ufw disable The system does not automatically start upon startup

    • Check 8080 port usage netstat apn | grep, 8080

    • Or open port 8080

    • yum install -t iptables

    • service iptables status

    • service iptables start

    • Iptables -p INPUT ACCEPT #

    • Iptables -f # Clears all default rules

    • Iptables -x # Clear all custom rules

    • Iptables -z # counter 0

    • iptables -A INPUT -i lo -j ACCEPT

    • iptables -A INPUT -p tcp –dport 22 -j ACCEPT

    • Iptables -a INPUT -p TCP –dport 80 -j ACCEPT Opens port 80

    • Iptables -a INPUT -p TCP –dport 8080 -j ACCEPT Opens port 8080

    • Save the restart

    • service iptables save

    • service iptables restart

  • If you can’t access it! View alitencent security group port!!
  • mysql
    • 1. Check whether the mysql database exists
    • rpm -qa |grep mysql
    • 2. Delete the mysql service
    • rpm -e mysql
    • 2.5 Forcibly Deleting mysql Services
    • rpm -e –nodeps mysql
    • 3. Use yum to install mysql
    • Yum list | grep mysql check mysql list
    • 4. Install mysql services
    • yum install -y mysql-server mysql mysql-deve
    • 5. View the installation version
    • rpm -qi mysql-server
    • 6. Start the mysql service
    • service mysqld start
    • 7. Check whether the device is powered on
    • chkconfig –list |grep mysqld
    • 7.5 If startup is required
    • Chkconfig mysqld on then return to step 7
    • 8. Set the password of the mysql account
    • mysqladmin -u root password ‘root’
    • 9. Configuration file
    • /etc/my.cnf
    • 10. Database files
    • /var/lib/mysql
    • 11. The log
    • /var/log mysql.log