zhangbin_snow
zhangbin_snow
采纳率0%
2015-02-21 04:46

linux下非root用户在MyEclipse2014配置tomcat无法启动的问题!!!

我在linux下的MyEcpLise配置类tomcat7,但是启动时却显示:
二月 21, 2015 12:38:08 下午 org.apache.catalina.startup.Catalina load
警告: Unable to load server configuration from [/opt/tomcat7.0/conf/server.xml]
二月 21, 2015 12:38:08 下午 org.apache.catalina.startup.Catalina load
警告: Permissions incorrect, read permission is not allowed on the file.
二月 21, 2015 12:38:08 下午 org.apache.catalina.startup.Catalina load
警告: Unable to load server configuration from [/opt/tomcat7.0/conf/server.xml]
二月 21, 2015 12:38:08 下午 org.apache.catalina.startup.Catalina load
警告: Permissions incorrect, read permission is not allowed on the file.
二月 21, 2015 12:38:08 下午 org.apache.catalina.startup.Catalina start
严重: Cannot start server. Server instance is not configured.
而且在终端中输入 ./startup.sh 却显示:
Using CATALINA_BASE: /opt/tomcat7.0
Using CATALINA_HOME: /opt/tomcat7.0
Using CATALINA_TMPDIR: /opt/tomcat7.0/temp
Using JRE_HOME: /opt/jdk/jdk1.8
Using CLASSPATH: /opt/tomcat7.0/bin/bootstrap.jar:/opt/tomcat7.0/bin/tomcat-juli.jar
touch: 无法创建"/opt/tomcat7.0/logs/catalina.out": 权限不够
./catalina.sh: 385: ./catalina.sh: cannot create /opt/tomcat7.0/logs/catalina.out: Permission denied

本人也在 /etc/profile中设置了环境变量:
#set tomcat7.0
TOMCAT_HOME=/opt/tomcat7.0
export TOMCAT_HOME

jdk也设置的没有问题,我是linux菜鸟,请教大神帮我解决!!!

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • Lee_my_ Lee_my_ 6年前
    点赞 评论 复制链接分享
  • Lee_my_ Lee_my_ 6年前

    文件属性,可执行可读可写,具体百度一下。记不清了

    点赞 评论 复制链接分享
  • zhangbin_snow zhangbin_snow 6年前

    麻烦详细说下可以吗?我刚才把tomcat复制到了非root用户的文件下,现在可以以非用户身份运行startup.sh,但是使用shutdown.sh时却显示:
    Using CATALINA_BASE: /home/snow/soft/tomcat7.0
    Using CATALINA_HOME: /home/snow/soft/tomcat7.0
    Using CATALINA_TMPDIR: /home/snow/soft/tomcat7.0/temp
    Using JRE_HOME: /opt/jdk/jdk1.8
    Using CLASSPATH: /home/snow/soft/tomcat7.0/bin/bootstrap.jar:/home/snow/soft/tomcat7.0/bin/tomcat-juli.jar
    二月 21, 2015 3:17:21 下午 org.apache.catalina.startup.Catalina stopServer
    严重: Catalina.stop:
    java.io.FileNotFoundException: /home/snow/soft/tomcat7.0/conf/server.xml (权限不够)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.(FileInputStream.java:138)
    at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:466)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:370)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:457)
    并且myeclipse运行tomcat时还是显示:
    警告: Unable to load server configuration from [/home/snow/soft/tomcat7.0/conf/server.xml]
    二月 21, 2015 3:19:37 下午 org.apache.catalina.startup.Catalina load
    警告: Permissions incorrect, read permission is not allowed on the file.
    二月 21, 2015 3:19:37 下午 org.apache.catalina.startup.Catalina load
    警告: Unable to load server configuration from [/home/snow/soft/tomcat7.0/conf/server.xml]
    二月 21, 2015 3:19:37 下午 org.apache.catalina.startup.Catalina load
    警告: Permissions incorrect, read permission is not allowed on the file.
    二月 21, 2015 3:19:37 下午 org.apache.catalina.startup.Catalina start
    严重: Cannot start server. Server instance is not configured.

    点赞 评论 复制链接分享
  • oyljerry oyljerry 6年前

    文件属性不对。你没法访问。
    用chmod修改一下文件属性。

    点赞 评论 复制链接分享