Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Tomcat 6 install guide...

  1. #1
    Join Date
    Dec 2008
    Location
    Outer Shpongolia
    Beans
    Hidden!

    Tomcat 6 install guide...

    i found this on the web & it works so i thought id share it with yous here


    Installing Tomcat 6 on Ubuntu

    If you are running Ubuntu and want to use the Tomcat servlet container, you should not use the version from the repositories as it just doesn't work correctly. Instead you'll need to use the manual installation process that I'm outlining here.

    Before you install Tomcat you'll want to make sure that you've installed Java. I would assume if you are trying to install Tomcat you've already installed java, but if you aren't sure you can check with the dpkg command like so:

    dpkg –get-selections | grep sun-java

    This should give you this output if you already installed java:

    sun-java6-bin install
    sun-java6-jdk install
    sun-java6-jre install

    If that command has no results, you'll want to install the latest version with this command:

    sudo apt-get install sun-java6-jdk

    Installation

    Now we'll download and extract Tomcat from the apache site. You should check to make sure there's not another version and adjust accordingly.

    wget http://apache.hoxt.com/tomcat/tomcat...-6.0.14.tar.gz

    tar xvzf apache-tomcat-6.0.14.tar.gz

    The best thing to do is move the tomcat folder to a permanent location. I chose /usr/local/tomcat, but you could move it somewhere else if you wanted to.

    sudo mv apache-tomcat-6.0.14 /usr/local/tomcat

    Tomcat requires setting the JAVA_HOME variable. The best way to do this is to set it in your .bashrc file. You could also edit your startup.sh file if you so chose.

    The better method is editing your .bashrc file and adding the bolded line there. You'll have to logout of the shell for the change to take effect.

    gedit ~/.bashrc

    Add the following line:

    export JAVA_HOME=/usr/lib/jvm/java-6-sun

    At this point you can start tomcat by just executing the startup.sh script in the tomcat/bin folder.

    Automatic Starting

    To make tomcat automatically start when we boot up the computer, you can add a script to make it auto-start and shutdown.

    sudo gedit /etc/init.d/tomcat

    Now paste in the following:

    # Tomcat auto-start
    #
    # description: Auto-starts tomcat
    # processname: tomcat
    # pidfile: /var/run/tomcat.pid

    export JAVA_HOME=/usr/lib/jvm/java-6-sun

    case $1 in
    start)
    sh /usr/local/tomcat/bin/startup.sh
    ;;
    stop)
    sh /usr/local/tomcat/bin/shutdown.sh
    ;;
    restart)
    sh /usr/local/tomcat/bin/shutdown.sh
    sh /usr/local/tomcat/bin/startup.sh
    ;;
    esac
    exit 0

    You'll need to make the script executable by running the chmod command:

    sudo chmod 755 /etc/init.d/tomcat

    The last step is actually linking this script to the startup folders with a symbolic link. Execute these two commands and we should be on our way.

    sudo ln -s /etc/init.d/tomcat /etc/rc1.d/K99tomcat
    sudo ln -s /etc/init.d/tomcat /etc/rc2.d/S99tomcat

    Tomcat should now be fully installed and operational. Enjoy!
    What arrests my attention...
    is the fact, that this space is inhabited.

  2. #2
    Join Date
    Dec 2006
    Location
    bland vapids
    Beans
    6
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Tomcat 6 install guide...

    Following these instruction would result tomcat running as root. Is that what you intended?

    What problem exactly did you have with the packaged tomcat?

  3. #3
    Join Date
    Apr 2006
    Beans
    3
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: Tomcat 6 install guide...

    Of course I'm not sure, but apparently there are a lot of prerequisites if you want to install tomcat6 from the repository:

    gcj-4.3-base jsvc libcommons-collections-java libcommons-daemon-java
    libcommons-dbcp-java libcommons-pool-java libecj-java libecj-java-gcj
    libgcj-bc libgcj-common libgcj9-0 libgcj9-jar libservlet2.5-java
    libtomcat6-java tomcat6-common

    (as reported by apt-get -s install tomcat6).

    I want to use only the java environment from Sun. Why I need the others?

    Best regards,
    --
    Mauricio Strello C.
    Last edited by mstrello; April 9th, 2009 at 10:01 AM. Reason: A typo

  4. #4
    Join Date
    Dec 2008
    Location
    Outer Shpongolia
    Beans
    Hidden!

    Re: Tomcat 6 install guide...

    i just followed the instructions outlined above and it worked for me, i found it here http://www.howtogeek.com/howto/linux...t-6-on-ubuntu/

    mabye the original author could help you out more, as far as i know i didnt have to install any other packages other than the ones outlined . i didnt try to install the packaged one due to the warning in the post, so i dont actually know if the packaged one works or not?
    What arrests my attention...
    is the fact, that this space is inhabited.

  5. #5
    Join Date
    Jul 2009
    Beans
    23

    Angry Re: Tomcat 6 install guide...

    HEllO:
    Please help me out

    i did the steps of instalation of java but after that when i checked java existance by ur command as u mentioned it show me this result:


    dpkg: need an action option

    Type dpkg --help for help about installing and deinstalling packages [*];
    Use `dselect' or `aptitude' for user-friendly package management;
    Type dpkg -Dhelp for a list of dpkg debug flag values;
    Type dpkg --force-help for a list of forcing options;
    Type dpkg-deb --help for help about manipulating *.deb files;
    Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

    Options marked [*] produce a lot of output - pipe it through `less' or `more' !

    PLZ GUIEDE ME WHAT THAT MEANS
    Last edited by faizan_comsian; July 19th, 2009 at 05:13 PM.

  6. #6
    Join Date
    Jul 2009
    Beans
    1

    Re: Tomcat 6 install guide...

    BTW... if you guys really want to check if Tomcat got installed correctly, do:
    http://127.0.0.1:8080/

    Tomcat defaults to port 8080...

    Also for refernce, the "JAVA_PATH" is usually "/usr/lib/jvm/<your version of java>" if you installed the binaries (sudo apt-get.. )

  7. #7
    Join Date
    Sep 2009
    Beans
    1

    Re: Tomcat 6 install guide...

    Quote Originally Posted by faizan_comsian View Post
    HEllO:
    Please help me out

    i did the steps of instalation of java but after that when i checked java existance by ur command as u mentioned it show me this result:


    dpkg: need an action option

    Type dpkg --help for help about installing and deinstalling packages [*];
    Use `dselect' or `aptitude' for user-friendly package management;
    Type dpkg -Dhelp for a list of dpkg debug flag values;
    Type dpkg --force-help for a list of forcing options;
    Type dpkg-deb --help for help about manipulating *.deb files;
    Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

    Options marked [*] produce a lot of output - pipe it through `less' or `more' !

    PLZ GUIEDE ME WHAT THAT MEANS

    Hello Faizan,

    The original command is missing a "-" character. Try this:

    dpkg --get-selections | grep sun-java

  8. #8
    Join Date
    Nov 2009
    Beans
    14

    Re: Tomcat 6 install error

    Hi,
    when i typt the following line I get an error....Can you HELP PLEASE?

    fabio@ubuntu01:~$ tar xvzf apache-tomcat-6.0.20.tar.gz

    gzip: stdin: not in gzip format
    tar: Child returned status 1
    tar: Exiting with failure status due to previous errors
    fabio@ubuntu01:~$

    Thanks

  9. #9
    Join Date
    Aug 2010
    Beans
    1

    Re: Tomcat 6 install guide...

    Hi every body,

    I've followed the install instrucction just as the first post but I can't reach the server start, when i run the ./startup.sh i recive the next:

    alemancito@alemancito-desktop:/usr/local/tomcat/bin$ sudo ./startup.sh
    [sudo] password for alemancito:
    Using CATALINA_BASE: /usr/local/tomcat
    Using CATALINA_HOME: /usr/local/tomcat
    Using CATALINA_TMPDIR: /usr/local/tomcat/temp
    Using JRE_HOME: /usr
    Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar

    and when i check the server status open the url:localhost:8080 it does not working at all, also i'have
    run a netstat to check the por but:

    alemancito@alemancito-desktop:/usr/local/tomcat/bin$ sudo netstat -plut
    Conexiones activas de Internet (solo servidores)

    Protocolo Recv-Q Send-Q Dirección Local Dirección Externa Estado PID/Program name
    tcp 0 0 localhost:ipp *:* ESCUCHAR 1120/cupsd
    tcp 0 0 localhostostgresql *:* ESCUCHAR 986/postgres
    tcp6 0 0 localhost:ipp [::]:* ESCUCHAR 1120/cupsd
    tcp6 0 0 localhostostgresql [::]:* ESCUCHAR 986/postgres
    udp 0 0 *:mdns *:* 733/avahi-daemon: r
    udp 0 0 *:bootpc *:* 883/dhclient
    udp 0 0 *:60256 *:* 733/avahi-daemon: r

    if any could help I'll really appreciate it.
    Last edited by Alemacito; August 11th, 2010 at 06:48 PM.

  10. #10
    Join Date
    Jan 2010
    Beans
    8

    Re: Tomcat 6 install guide...

    How about a guide that doesnt run Tomcat as root and shows how to set up SSL.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •