Installing Jakarta - Tomcat

2009-05-13 13:16:01来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折


General Information
A straight forward manner to install the basic Jakarta - Tomcat server.
Requirements
Minimal knowledge of FreeBSD and a minimal FreeBSD installation.
Linux compatibility, wget and unzip have to be installed.
Local or remote access to the box.
You will need a web browser in order to sign the JDK agreement and download accordingly.
Installation
Download and unpack the latest Apache - Tomcat source from
http://tomcat.apache.org/
in your home directory.
#
#
#
# cd ~
wget
http://apache.belnet.be/tomcat/tomcat-6/v6.0.14/src/apache-tomcat-6.0.14-src.tar.gz
tar xvzf apache-tomcat-6.0.14-src.tar.gz
cd apache-tomcat-6.0.14-src
Read the included BUILDING.txt.
This text file contains the steps we are going to take to successful install Jakarta – Tomcat.
# more BUILDING.txt
Following this instructions, we have to download and install the JDK first and Ant afterwards. Instead of following the provided link in the text file for downloading the JDK, we will use
http://www.freebsdfoundation.org/downloads/java.shtml
to download the needed JDK. Please select the Diablo JDK 1.5.0-7 package accordingly your architecture and follow the download procedure. Go to your download directory and add the package.
# pkg_add diablo-jdk-freebsd6.i386.1.5.0.07.01.tbz
The installation can complain about two missing packages: xorg-libraries-6.9.0 and javavmwrapper-2.0_6. We add the packages as follows or use their respectively ports and afterwards re-execute previous command.
#
# pkg_add -r xorg-libraries
pkg_add -r javavmwrapper
You can safely ignore following notice after adding the diablo-jdk:
pkg_add: warning: package 'diablo-jdk-1.5.0.07.01' requires 'javavmwrapper-2.0_6', but 'javavmwrapper-2.3' is installed

Now we download apache-ant from
http://ant.apache.org/bindownload.cgi
and unpack it in /usr/local/apache-ant-1.7.0.  
#
#
#
#
# cd ~
wget
http://apache.scarlet.be/ant/binaries/apache-ant-1.7.0-bin.tar.gz
tar xzf apache-ant-1.7.0-bin.tar.gz
cp -r apache-ant-1.7.0/ /usr/local/
cd /usr/local/apache-ant-1.7.0
Before we can start building Tomcat, we have to set a few environment variables.
#
#
#
# setenv ANT_HOME /usr/local/apache-ant-1.7.0
setenv JAVA_HOME /usr/local/diablo-jdk1.5.0
setenv PATH /sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
:/usr/local/apache-ant-1.7.0/bin
We are ready to build Tomcat, first go to your Apache – Tomcat directory.
# cd ~/apache-tomcat-6.0.14-src
Now we have to execute ‘ant download’ and ‘ant’ in this directory. Although we followed the set environment instructions provided in the BUILDING.txt,  ‘ant’ won't do its thing at this point. We know better. Execute ‘ant’ as follows in the source directory of  Apache-Tomcat.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Chrooting Apache and PHP

下一篇:Why I wanted FreeBSD before I knew it existed