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)