Running a Webserver on a Tonido Plug
Running a Webserver on a Tonido Plug - Compiling Tomcat from Source on Plugbox Linux PDF Print E-mail
Written by Administrator   
Tuesday, 16 November 2010 20:16
Article Index
Running a Webserver on a Tonido Plug
Getting Started
Installing PlugBox Linux
Installing the Apache Webserver
Installing an FTP server on a Tonido Plug
Apache and Bftp Autostart at Boot
Getting a JDK to run on a Tonido Plug
Compiling Tomcat from source on Plugbox Linux
Getting Tomcat Running After Building It
All Pages
Compiling Tomcat from Source on Plugbox Linux

 OK, so I’m going to try for TomCat.   To do that I’m working from this page of the apache website.

  A Prerequisite for Tomcat is Apache Ant, which as I understand it is a program made to do the same job as the venerable 'make' utility.    This is a good thing, because large complicated makefiles are about the most confusing things I've had to deal with.

Apache Ant


Ant seems to be written in Java.  So hopefully if my jdk is running I will be able to get ant to work.

 As it said to do on the Apache Tomcat Building page, I have downloaded the binary apache-ant-1.6.5-bin.tar.bz from the Apache Ant Historical downloads page. I have downloaded and unpacked apache ant 1.6.5 because I’m going to try for Tomcat 6.0. Why am I attempting to install Tomcat 6.0, when 7.0 is available? Because the folks at maemo.org specifically reported that Tomcat 6 worked. Probably 7 will work too, but at this point I want to do the simplest thing.
 
I unpacked the archive using the 
 
tar jxf
 
command like above with the openJDK files. 
 
 

Installing Ant


cd /usr/local
wget archive.apache.org/dist/ant/binaries/apache-ant-1.6.5-bin.tar.bz2
tar jxf apache-ant-1.6.5-bin.tar.bz2
mv -v apache-ant-1.6.5 ant
rm apache-ant-1.6.5-bin.tar.bz2

 

Now I have to put the bin folder in the path.

To do that I’m going to edit /etc/profile


# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin"
export PATH

I’m changing this to

# Set our default path
PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/ant/bin"
export PATH


and at the end of the file I added the following to set the environment variables JAVA_HOME and ANT_HOME


# add JAVA_HOME and ANT_HOME
ANT_HOME="/usr/local/ant"
JAVA_HOME="/opt/OpenJDK-camswl"
export ANT_HOME JAVA_HOME

Now I’m rebooting to see if the path changed and the environment variables changed.

ant -diagnostics >ant_diagnostics



-------------------------------------------
Tasks availability
-------------------------------------------
image : Missing dependency com.sun.media.jai.codec.FileSeekableStream
sshexec : Missing dependency com.jcraft.jsch.UserInfo
scp : Missing dependency com.jcraft.jsch.UserInfo
jdepend : Missing dependency jdepend.xmlui.JDepend
junit : Missing dependency junit.framework.Test

-------------------------------------------
org.apache.env.Which diagnostics
-------------------------------------------
Not available.
Download it at http://xml.apache.org/commons/


-----------
OK, I’m not sure if that means Ant is broken, or not.   I’ll just forge ahead assuming that Ant is ok.
 

Installing SubVersion revision Control System

 
We need to do this so we can get the source code for Tomcat out of their repository.
 

To get the TomCat source I need SVN.   Luckily, there is a package available with pacman:

pacman -S subversion

ok, this seems to be working at least svn --help gives a help page...


cd
mkdir tomcat_build
cd tomcat_build
svn export http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/
cd trunk
ant download
ant


7 minutes and 22 seconds later -
BUILD SUCCESSFUL
 
 

Now Tomcat has supposedly been built, but it needs to be configured before it will run.  On the next page, I'll cover how I got it to actually run.



Last Updated on Wednesday, 01 December 2010 14:06
 

Sponsored Links

Bold Inventions, Powered by Joomla!; Joomla templates by SG web hosting