Redhat installing JDK, Tomcat, MySQL

Source: Internet
Author: User

Redhat Installing the JDK

1. use securecrt to upload the package, you need to register with the Redhat website when using yum install Lrzsz , generally commercial version, registration can be installed lrzsz installation

2. Enter the usr/local directory to create the Java Directory folder:cd/usr/local

Create: Mkdir/usr/local/java

3. Copy the uploaded file compression package to the directory : cp Jdk-8u171-linux-x64.tar.gz/usr/local/java

4. go to Java directory:Cd/usr/local/java unzip in current directory:TAR-ZXVF Jdk-8u171-linux-x64.tar.gz

after decompression there will be a jdk1.8.0_171 folder

6. Configure environment variables:VI /etc/profile Press i to enter edit mode at the end, add the following:

java_home=/usr/local/jdk1.8.0_171

Classpath= $JAVA _home/lib/

Path= $PATH: $JAVA _home/bin

Export PATH Java_home CLASSPATH

7. Restart Machine Execution command:source/etc/profile java-version

The installation succeeds when the following interface appears:

Installing Tomcat

1. similarly create a Tomcat folderunder/usr/local:cd/usr/local mkdir / usr /local/tomcat

2. Copy the uploaded files to the specified directory: CP Apache-tomcat-9.0.8.tar.gz/usr/local/tomcat

3. Proceed to the development directory to begin unpacking: cd/usr/local/tomcat TAR-ZXVF apache-tomcat-9.0.8.tar.gz

after decompression there will be a folder: apache-tomcat-9.0.8

4. Enter under Tomcat/bin to start the service:cd/usr/local/tomcat/apache-tomcat-9.0.8/bin

5. Start the service:./startupsh appears as follows:

The service started successfully.

install MySQL

1. test whether MySQL has been installed , enter command:mysql-server

the following message appears stating that MySQL has not been installed

2. you need to download it manually and then install mysql-server, which uses the wget command (yum install wget This command is important, or the MySQL package cannot be loaded .

Local download http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

3. use the RZ command to upload to redhat , terminal input command:rpm -IVH mysql-community-release-el7-5.noarch.rpm

Check if installation is successful, such as installation : ls-1/etc/yum.repos.d/mysql-community*

Install the Mysql-server as soon as it is installed.

Yum Install Mysql-server

start service mysqld Start,

To create a root administrator: mysqladmin-u root Password 123456

Log in to MySQL: mysql-u root-p

If the installation is successful:

Redhat installing JDK, Tomcat, MySQL

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.