Linux installation Tomcat,maven, Ant

Source: Internet
Author: User

Download:

http://ant.apache.org/bindownload.cgi

wget Http://apache.tradebit.com/pub//ant/binaries/apache-ant-1.9.4-bin.zip

Unzip
Unzip Apache-ant-1.9.4-bin.zip
Install under the/opt/directory
MV apache-ant-1.9.4//opt/ant
Create a soft link
Ln-s/opt/ant/bin/ant/usr/bin/ant

Setting environment variables
vi/etc/profile.d/ant.sh

!/bin/bash

Ant_home=/opt/ant
Path= $ANT _home/bin: $PATH
Export PATH Ant_home
Export Classpath=.
Make files Executable
chmod +x/etc/profile.d/ant.sh

Initial initialization of the environment
source/etc/profile.d/ant.sh

Check:
Ant-version
Verifying environment variables:
Echo $ANT _home

Maven Installation:

http://maven.apache.org/download.cgi

wget Http://mirrors.hust.edu.cn/apache/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.zip
Unzip:
Unzip Apache-maven-3.2.3-bin.zip

Install under the/opt/directory:
MV Apache-maven-3.2.3//opt/maven
To create a soft link:
Ln-s/OPT/MAVEN/BIN/MVN/USR/BIN/MVN

To design a MAVEN environment variable:
vim/etc/profile.d/mavem.sh

!/bin/bash

Maven_home=/opt/maven
Path= $MAVEN _home/bin: $PATH
Export PATH Maven_home
Export Classpath=.

Make files Executable
chmod +x/etc/profile.d/maven.sh

Initializing environment variables for the first time

source/etc/profile.d/maven.sh

Mvn-version
Echo $MAVEN _home

[Email protected] pics]# mvn-version
Apache Maven 3.2.3 (33F8C3E1027C3DDDE99D3CDEBAD2656A31E8FDF4; 2014-08-12t04:58:10+08:00)
Maven Home:/opt/maven
Java version:1.8.0_20, Vendor:oracle Corporation
Java Home:/usr/java/jdk1.8.0_20/jre
Default LOCALE:EN_GB, Platform Encoding:utf-8
OS name: "Linux", Version: "3.10.0-123.6.3.el7.x86_64", Arch: "AMD64", Family: "Unix"

Tomcat Installation

http://tomcat.apache.org/download-70.cgi

wget Http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.57/bin/apache-tomcat-7.0.57.zip

Unzip Apache-tomcat-7.0.53.zip

MV apache-tomcat-7.0.53//opt/tomcat

source/etc/profile.d/tomcat.sh

chmod +x $CATALINA _home/bin/startup.sh
chmod +x $CATALINA _home/bin/shutdown.sh
chmod +x $CATALINA _home/bin/catalina.sh

vi/etc/profile.d/tomcat.sh

!/bin/bash

Catalina_home=/opt/tomcat
Path= $CATALINA _home/bin: $PATH
Export PATH Catalina_home
Export Classpath=.

chmod +x/etc/profile.d/tomcat.sh

CD $CATALINA _home/bin

./startup.sh

Edit:
/etc/sysconfig/iptables
Add to

-A input-m state–state new-m tcp-p tcp–dport 8080-j ACCEPT

./shutdown.sh

Vi/etc/init.d/tomcat

!/bin/shchkconfig:2345 80 20Description:tomcat Start/shutdown Script

Export java_home=/usr/java/jdk1.8.0_05

Case $ in
Start
cd/opt/tomcat/bin/
./startup.sh
;;
Stop
cd/opt/tomcat/bin/
./shutdown.sh
;;
Restart
cd/opt/tomcat/bin/
./shutdown.sh
cd/opt/tomcat/bin/
./startup.sh
;;
Esac
Exit 0

chmod A+x/etc/init.d/tomcat

Chkconfig–add Tomcat

Linux installation Tomcat,maven, Ant

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.