Installing Java under the CENTOS7 of test service Setup

Source: Internet
Author: User

Install JAVA1 Create normal user Useradd wujianpasswd Wujian prompt for password: "Enter Wujian password" User:wujian group:root passwd:123456789 2 to "Wujian" Assign root permissions vi/etc/sudoers found in file #%wheel all= (All) all remove "#" execution command: usermod-g root wujian Execute command: Su-"note su and-there is a space between" 3 background: if the user Using root to upload the Java installer to the server, the Java installer is bound to be the root of the current user role: Root create installation file folder Directory execution command: CD/USR Execute command: mkdir-p serversoft " Use Xftp to upload the Java installer to Serversoft "The current directory structure is:/usr/serversoft/jdk-8u141-linux-x64.rpm change Serversoft belongs to: Wujian Execute command: chown -R Root.wujian/serversoft "-r: Represents the recursive root.wujian:root for the group, Wujian on behalf of the user" "/serversoft: Represents the folder" this time the file belongs to the user Wujian 4 Go to the Serversoft directory, perform the decompression installation execution command: RPM-IVH JDK-8U141-LINUX-X64.RPM5 set environment variable execution command: Vi/etc/profile "at the bottom of the file" #set Java Environmentjava_home=/usr/java/jdk1.8.0_141classpath=.: $JAVA _home/lib/tools.jarpath= $JAVA _home/bin: $PATHexport Java_home CLASSPATH Path Save exit Execute command: Source/etc/profile6 Verify Installation "Execute the following command sequentially, with normal input OK" echo $JAVA _homeecho $CLASS _pathecho $ Pathjava-version

Installing Java under the CENTOS7 of test service Setup

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.