IntelliJ needs to copy tomcat/conf directory to project directory

前端 未结 6 1182
面向向阳花
面向向阳花 2020-12-09 08:02

I have a freshly installed Tomcat 7 server, and I\'m trying to make IntelliJ deploy a HelloWorld Spring MVC app to Tomcat.

My Tomcat home is /usr/share/tomcat7

相关标签:
6条回答
  • 2020-12-09 08:40

    For me, this worked for Tomcat 8 on Manjaro Linux:

    sudo chmod -R 755 /usr/share/tomcat8/
    
    0 讨论(0)
  • 2020-12-09 08:48

    I had the same problem and these steps helped me to Start my tomcat7 from Intellij :

    I have Linux Mint 17,and Tomcat 7 which is installed using apt-get

    CATALINA_HOME in /usr/share/tomcat7 and CATALINA_BASE in /var/lib/tomcat7

    1- First I created a soft link which references /etc/tomcat7

    cd /usr/share/tomcat7
    ln -s /etc/tomcat7 conf
    

    2- Then you have to change the access permissions of /etc/tomcat7

    sudo chmod -R 655 /etc/tomcat7/
    

    That's it.

    0 讨论(0)
  • 2020-12-09 08:54

    I added my own user account to the tomcat7 group.

    And chmod g+r /var/lib/tomcat7/conf/tomcat-users.xml

    0 讨论(0)
  • 2020-12-09 08:55

    Had the same error with usr/share, dont just blindly run a command to act as magic-wand as many just tell you you run this and that on a mother-directory.

    this is Linux, always some stupid thing with the permissions.

    all you garra do is using chmod 666 or chmod 777 on files that are causing the error, but you need to look at those files first using ll and ls to make sure you are not decreasing some access, you may have a directory with 77x and when you do 666 you mess things up.

    just gradually and one by one increase the chmod level and check whether problem goes away or not.

    Sorry I didn't give you some code to fix all the problems.

    0 讨论(0)
  • 2020-12-09 08:58

    Try chmod -R 777 /var/lib/tomcat7/conf/, it works to me.

    0 讨论(0)
  • 2020-12-09 08:59

    Make sure that files under /var/lib/tomcat7/conf/ directory have read permission for the user IntelliJ IDEA is running from.

    chmod -R 644 /var/lib/tomcat7/conf/
    

    should help.

    Also check that /home/adonis/.IntelliJIdea12/system/tomcat/ has correct permissions and owner. Could be that it was created from a different user and your current user doesn't have the rights to write into it.


    If it doesn't help, download and unpack a new Tomcat installation from .tar.gz file, configure IDEA to use this installation instead.

    Note that Tomcat installed using the package manager on some Linux systems has non-standard layout and permissions, and therefore will not work with IDEA.

    0 讨论(0)
提交回复
热议问题