Deploy Tomcat, JDK, and Javaweb projects under Linux (64-bit)

Source: Internet
Author: User

Purpose: To deploy a Javaweb project on Linux as a server for timed location escalation

A, install the JDK on Linux first:

1, download the JDK, upload to the linux/opt directory, unzip

Tar-zxv-f javajdk.tar.gz

2, modify/etc/profile at the end of the file to add

Java_home=/opt/javajdkpath= $JAVA _home/bin:$PATHCLASSPATH = $JAVA _home/jre/lib/ext:$JAVA _home/ Lib/tools.jarexport PATH Java_home CLASSPATH
Source/etc/profile    --

Note: Depending on the configuration information above, we can either complete the configuration of the environment variable

Note that the path in the configuration, it is necessary to put Ava_home/bin at the front, or use Java command, the system will find the previous Java, do not look down, so that the Java executable file run directory is not actually $java_home/bin under, In other directories, it can cause a lot of problems.

Source/etc/profile  ---Let profile take effect

Note: At first I was a fool. Path is written with classpath: (colon), which causes the path to be wrong, even the commands such as VI, Whereis, and so on are not executed properly .

There are two ways to fix this:

1, with the path/usr/bin/vim to execute but I do not know the source of the command path, so still not effective profile

2,export Path=/usr/bin:/usr/sbin:/bin:/sbin:/usr/x11r6/bin  and then hurriedly to modify profile

After configuring the profile path

Java-version

A question was reported:

-bash:/opt/javajdk/bin/java:/lib/ld-linux.so.2:bad ELF interpreter:no such file or directory

The reason is that Linux is a 64-bit system with 32-bit software

Yum Install libgcc.i686--This can be solved on the internet, but it's useless when I put it on.
Yum Install glibc.i686-Problem solving! Java-version  output JDK version!!

The JDK is ready to install!

Deploy Tomcat, JDK, and Javaweb projects under Linux (64-bit)

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.