Configuration and installation of Jdk and Tomcat and jdktomcat

Source: Internet
Author: User

Configuration and installation of Jdk and Tomcat and jdktomcat

I. jdk installation and configuration

3. Create a soft link to configure/usr/local/src/jdk1.8.0 _ 60 to/etc/profile. Create two soft links first:

(1) original directory/usr/local/src/jdk1.8.0 _ 60

Ln-s/usr/local/src/jdk1.8.0 _ 60 java

(2) original directory/usr/local/src/jdk1.8.0 _ 60/lib

Ln-s/usr/local/src/jdk1.8.0 _ 60/lib javalib

 

4. Configure the environment variables. Edit vi/etc/profile and insert the following three statements to the end of the profile file.

Export JAVA_HOME = (/usr/java/jdk1.7.0 _ 25) is changed to the first soft link java
Export CLASSPATH = (/usr/java/jdk1.7.0 _ 25/lib ).
Export PATH = $ JAVA_HOME/bin: $ PATH

5. The source/etc/profile takes effect for the configuration information, that is, the inserted three-board Command Execution

6. Output JAVA_HOME and CLASSPATH. If the output is a soft link to be provisioned, it indicates that it is successful; otherwise, it is false.

7. Check the java version. Run the following command: java-version.

Ii. Tomcat installation and configuration

1. First create a directory, mkdir tomcat4

Move the tomcat compressed package file to tomcat 4

Mv/usr/local/src/apache-tomcat-9.0.0.M8.tar.gz/usr/local/tomcat4

Decompress the package

 

A. then unzip the file/usr/local/tomcat4/apache-tomcat-9.0.0.M8/bincommons-daemon-native.tar.gz

B. Then go to/usr/local/tomcat4/apache-tomcat-9.0.0.M8/bin/commons-daemon-1.0.15-native-src/unix to find configure

 

C. assign a value to configure, chmod 777 configure, and then run the configure command:./configure (gcc and yum install gcc must be installed in centos)

 

D. Compile make

 

E. Find the jsvc directory in/usr/local/tomcat4/apache-tomcat-9.0.0.M8/bin/commons-daemon-1.0.15-native-src/unix/and then move jsvc up the two-tier directory cp jsvc ../../

2. First write a soft link to/usr/local/src/apache-tomcat-9.0.0.M8,

Ln-s/usr/local/src/apache-tomcat-9.0.0.M8 virtuat4,

 

Configure environment variables, vim/etc/profile

 

3. Execute the configuration file first

After the file takes effect, output it to see if tomcat is configured successfully.

 

4. Modify tomcat port number,/usr/local/tomcat4/apache-tomcat-9.0.0.M8/conf # server. xml, change the port number to 8060

5. in/etc/init. d/Add daemon. the soft link of sh must be in/etc/init. d/directory to create a soft link ln-s/usr/local/tomcat4/apache-tomcat9.0.0.M8/bin/daemon. sh tomcat4 as the tomcat Startup Program

6. Grant the directory permission chown-R tomcat: tomcat/usr/local/tomcat4

Start/etc/init. d/tomcat4 start

Tail-500f/usr/local/tomcat4/apache-tomcat-9.0.0.M8/logs/catalina-daemon.out

Note: Modify the inbound and outbound rules of the firewall.

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.