The installation and deployment process of Web projects in Linux environment

Source: Internet
Author: User

1. Preparatory work

Download the appropriate version of the Linux version of JDKandTomcat installation files.

Example:jdk-6u21-linux-i586-rpm.bin ( installation version )

JDK-6U21-LINUX-I586.RPM ( installation version )

Jdk-7u79-linux-x64.tar.gz (uncompressed version )

Recommended collocation:JDK1.7 + Tomcat7.0 more stable

2. InstallationJDK

First, upload the installation package via FTP to the specified file directory, in the following example:/usr/local/java

New Folder command:

[email protected] usr] #mkdir/usr/local/java

To increase the Execute permissions command:

[email protected] usr] #chmod a+x jdk-6u21-linux-i586-rpm.bin

installation command:

[email protected] usr] #rpm-ivh jdk-6u21-linux-i586.rpm

Description

Install package execution with ". RPM":rpm-ivh jdk-6u21-linux-i586.rpm command

installation package ending with ". Bin" execution:./jdk-6u21-linux-i586.rpm Command

Theinstallation package that endswith ". tar.gz" executes:tar –xvf jdk-7u79-linux-x64.tar.gz command /c13>

3. Configure Environment variables

Add the java_home CLASSPATH PATH environment variable in /etc/profile .

command: [[email protected] jdk1.6.0_21]# Vi/etc/profile

Press 'o' to enter edit mode

In the end, add:

Java_home=/usr/local/jdk1.6.0_45 (here is the corresponding JDK installation path)

Classpath=.: $JAVA _home/lib/tools.jar

Path= $PATH: $JAVA _home/bin

Export Java_home CLASSPATH PATH

Press 'Esc' -- Enter ':wq' to save and exit

4. JDKTest

To detect if the JDK was successfully installed:

command: [[email protected] ~]# java –version

If you see the JVM version and related information, the installation is successful.

If error:

If ' Java ' isn't a typo you can run the following command to lookup the package that contains the Binary:command-not-foun D Java-bash:java:command not found

The environment variable is configured incorrectly!

5. InstallationTomcat

[[Email protected] ~]# tar –xvf Apache-tomcat-6.0.29.tar // unzip

[[email protected] tomcat]# mkdir/usr/local/tomcat// Create a new Tomcat directory under usr/local

[[email protected] ~]# CP –R apache-tomcat-6.0.29/usr/local/tomcat // Copy to Tomcat under

6. Set the Tomcat encoding (can be ignored)

Configure the Tomcat Server encoding to UTF-8:

Open the conf/server.xml file in the Tomcat installation directory (approximately at the 8080 ) to of the Port <connector></connector> the label is set to uriencoding= " UTF-8 ".

7. StartTomcat

[Email protected] ~]#/usr/local/tomcat/apache-tomcat-6.0.29/bin/startup.sh

Using a browser to access http://localhost:8080, a tomcat default page appears stating that the installation was successful

8. Project Deployment

Make the web project into a war package and upload it to the Linux operating system tomcat installation directory WebApps !

The installation and deployment process of Web projects in Linux environment

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.