CentOS 7 Installation configuration JDK

Source: Internet
Author: User
Tags server installation and configuration

1. Setting up an FTP server

We install VSFTPD server on CentOS, VSFTPD Server installation and configuration reference: CentOS open FTP and configure users, install Leapftp client in Windows, through leapftp to VSFTPD server upload resources, The default is stored under the/var/ftp/pub path of CentOS.

2. Turn on the SSH service

The CentOS SSH service is turned off by default, with the service sshd start command to open the CentOS SSH services, install the Putty client in Windows, This allows the CentOS system to be remotely controlled on Windows via putty.

3. Installing the JDK

Enter the command cd/var/ftp/pub Enter the pub directory, enter the command LS display all the files under the pub, the resource default is not execute permission, so we need to enter chmod +x jdk-8u45-linux-x64.rpm gives execute permission to the resource, enters the ls command again, and if the target resource is green, proves to have execute permission.

Execute the rpm-ivh jdk-8u45-linux-x64.rpm command to install the JDK, the default installation path is/usr/java/java1.8.0_45, in order to facilitate later configuration, you can rename the file, Input command mv /usr/java/java1.8.0_45 /usr/java/java1.8 rename java1.8.0_45 to java1.8.

4. Configuring the JDK environment variables

Input command vi/etc/profile, VI is the default command mode, enter the command I will enter the editing mode. Add the following at the end of the profile:

Java_home=/usr/java/jdk1.8path= $JAVA _home/bin: $PATHCLASSPATH =.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/ Tools.jarexport Java_homeexport Pathexport CLASSPATH

Press ESC when the edit is complete, and then enter : x to save the exit.

5. Test the JDK

Entering the command javac-version, showing the Java version proves that the configuration was successful.

CentOS 7 Installation configuration JDK

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.