Tomcat 6 server creation using eclipse IDE on ubuntu

后端 未结 17 1766
礼貌的吻别
礼貌的吻别 2020-12-22 17:37

I\'m having a problem running tomcat 6 with eclipse 3 in ubuntu.

I installed tomcat 6 on my machine and when I tested it using http://localhost:8080, it

17条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-22 18:34

    You have to symlink various folders that are scattered across the file system to the desired tomcat6 main (or installation) folder.

    tsaid suggested symlinking to /usr/share/tomcat6, I rather use /var/lib/tomcat6.

    My /var/lib/tomcat6 directory (see the symlinks I've made):

    $ ls -g -o /var/lib/tomcat6
    lrwxrwxrwx 1   22 2010-07-20 18:15 bin -> /usr/share/tomcat6/bin
    drwxr-xr-x 3 4096 2010-07-20 12:22 common
    lrwxrwxrwx 1   12 2010-07-20 12:22 conf -> /etc/tomcat6
    lrwxrwxrwx 1   22 2010-07-20 18:14 lib -> /usr/share/tomcat6/lib
    lrwxrwxrwx 1   17 2010-07-20 12:22 logs -> ../../log/tomcat6
    drwxr-xr-x 3 4096 2010-07-20 12:22 server
    drwxr-xr-x 3 4096 2010-07-20 12:22 shared
    drwxrwxr-x 3 4096 2010-07-20 12:22 webapps
    lrwxrwxrwx 1   19 2010-07-20 12:22 work -> ../../cache/tomcat6
    

    Also, don't forget to give full rw permission to your configuration files, in my case in /etc/tomcat6. Since you'll also need to symlink catalina.policy from Catalina/localhost/catalina.policy, don't forget giving execute permission to those folders. You can simplify with full permission to the conf folder, but it's only advised if you're the only user of the computer.

    cd /var/lib/tomcat6/conf
    chmod -R a+xrw *
    

    Now, delete the entry in Eclipse under Window -> Preferences -> Server -> Runtime Environment and add a new server through Run on Server or anywhere else.

提交回复
热议问题