Linux install JDK tomcat MySQL

Source: Internet
Author: User
Tags iptables nameserver

---------------------------------------------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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.