Installation of JDK, Tomcat, and MySQL under Linux

Source: Internet
Author: User

1. Installing the JDK

1. upload jdk-7u45-linux-x64.tar.gz to Linux (using the WinSCP tool)

2. Unzip the JDK to the /usr/local directory

TAR-ZXVF jdk-7u45-linux-x64.tar.gz-c/usr/local/--- extracted and placed under /usr/local/

RM-RF jdk-7u45-linux-x64.tar.gz--- delete a compressed package

MV jdk-7u45 JDK---- rename

3. set environment variables, append relevant content at the end of the/etc/profile file

Vi/etc/profile

Export JAVA_HOME=/USR/LOCAL/JDK

Export path=.: $JAVA _home/bin: $PATH

4. Refresh Environment variables

Source/etc/profile

5. Test Whether Java commands are available

Java-version

The OpenJDK becomes the jdk under Oracle .

2. install Tomcat

1. upload apache-tomcat-7.0.68.tar.gz to Linux

2. Unzip Tomcat

TAR-ZXVF apache-tomcat-7.0.68.tar.gz-c/usr/local/

RM-RF apache-tomcat-7.0.68.tar.gz

MV apache-tomcat-7.0.68 Tomcat

3. Start Tomcat

/usr/local/apache-tomcat-7.0.68/bin/startup.sh

4. See If the Tomcat process is started

JPS---- Viewing processes

5. View The Tomcat process Port

NETSTAT-ANPT | grep 2465

6. access Tomcat through a browser

http://192.168.33.200:8080/

3. Install MySQL

1. Uploading mysql-client-advanced-5.6.19-1.el6.x86_64.rpm and mysql-server-advanced-5.6.19-1.el6.x86_64.rpm to/usr/local

2. Delete the MySQL-related library information that is already installed on Linux. RPM-E mysql-libs-xxx--nodeps
Execute command rpm-qa |grep mysql check whether to remove clean

3. Install the server and client

RPM-IVH mysql-server-5.5.48-1.linux2.6.x86_64.rpm

RPM-IVH mysql-client-5.5.48-1.linux2.6.x86_64.rpm

4. Turn on the service and initialize MySQL

Service MySQL Start

/usr/local/mysql_secure_installation

5, there will be errors, do not know the password. Then you need to re-retrieve and set the password.

#/etc/init.d/mysql Stop
  
# Mysqld_safe--user=mysql--skip-grant-tables--skip-networking &
  
# mysql-u Root MySQL
  
mysql> Update user set Password=password ('admin') where user= ' root ';
  
mysql> flush Privileges;

Mysql> quit
  
#/etc/init.d/mysql Restart
  
# mysql-uroot-p
  
Enter Password:
  
mysql>

6, after the successful login, enter show databases, when the error, the solution is as follows:

SET PASSWORD = PASSWORD (' admin ');

7. In this way, MySQL is installed successfully.

Installation of JDK, Tomcat, and MySQL under Linux

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.