How to install Tomcat 7

Michael Powell nightrecon at hotmail.com
Mon Feb 21 10:35:04 UTC 2011


Andreas Junius wrote:

> Hi All,
> 
> This is my first post to this list, so I hope I get it right. I'm new to
> both Unix and freeBSD and I've been doing my first steps for three days
> now. I was able to install Java and Tomcat 6, because these products are
> part of the ports directory. However I'd prefer Tomcat 7, so I got the
> tomcat7.tar.gz and extracted the files to /usr/ports/www/tomcat7.

Sorry but this is not the way this works. Maybe study the sections in the 
Handbook which explain how to install software on FreeBSD. This is just 
totally a wrong procedure.
 
> The I tried the following and got the message:
> 
> # pwd
> /usr/ports/www/tomcat7
> # make install clean
> ===>  Vulnerability check disabled, database not found
> ===>  License accepted by the user
> => apache-tomcat-7.0.6.tar.gz is not in /usr/ports/www/tomcat7/distinfo.
> => Either /usr/ports/www/tomcat7/distinfo is out of date, or
> => apache-tomcat-7.0.6.tar.gz is spelled incorrectly.
> *** Error code 1
> 
> Stop in /usr/ports/www/tomcat7.
> 
> 
> To be honest, I don't understand that message. That file
> apache-tomcat-7.0.6.tar.gz can't be in /usr/ports/www/tomcat7/distinfo,
> because distinfo is a file and not a directory. What went wrong? I got
> the missing file, however where is it supposed to be?
>
The distinfo file contains a checksum hash and file size for the expected 
tarball.  The message means the tarball isn't a match.

When you try to make a port, it will fetch the source tarball and place it 
into /usr/ports/distfiles. 

What seems so totally bizarre about this is you indicated you installed Java 
and Tomcat 6 successfully? Why not just remove Tomcat 6 and install Tomcat 7 
using a method which already worked to install Tomcat 6?

Repair the damage you've done to /usr/ports/www/tomcat7. You can just rm -rf 
the entire directory and a ports tree refresh will fix it for you. Then 
change into /usr/ports/www/tomcat6 and do make deinstall. This removes 
Tomcat 6. Then cd to /usr/ports/www/tomcat7 and do make install clean. You 
do not need to be concerned with downloading the tarball, the port will 
fetch it for you.

If you aren't clear on how to update the ports tree prior to installing or 
updating software this is covered in the Handbook. Dependency tracking 
depends on the ports tree. I suspect that you tried to 'add' the tomcat7 
port to a stale ports tree, but the proper thing is to update the entire 
ports tree, as there is already a tomcat7 port present. Trying to add just 
one port to an old, out of date ports tree is asking for dependency issues.

-Mike




More information about the freebsd-questions mailing list