Linux添加Tomcat Server时Server Name为空不可输入

来源:互联网 发布:mac相册制作软件 编辑:程序博客网 时间:2024/04/28 13:44

Linux添加Tomcat Server时Server Name为空不可输入


环境配置

  • tomcat 8.0
    • /usr/local/tomcat/tomcat8
  • eclipse mars
    • /home/falleyes/eclipse

问题

  • 配置Window -> Preferences -> Server -> Runtime Environment,添加新的Tomcat运行环境时正常。
  • 在项目运行时,选择已经存在的Server不可选,而下方新建一个Server选择Tomcat8.0时出现Server Name为空且不可输入。项目无法在eclipse上运行。

原因

当前登录用户没有权限访问tomcat8目录。
使用ll命令查看tomcat目录,看到tomcat8目录的属主为root。因为解压及部署tomcat时的用户为root用户,并非当前用户。


解决方法

  • 将当前用户添加到root用户组中的方法并不可行
  • 终端窗口使用su命令切换至root用户,使用chown命令递归修改tomcat8目录的文件属主
    • chmod -R falleyes tomcat8
0 0
原创粉丝点击