Ubuntu 中安装 IDEA 报错:Warning the selected directory is not a valid tomcat home

来源:互联网 发布:历史数据库 编辑:程序博客网 时间:2024/05/09 09:19

在Ubuntu上安装IDEA很方便,只需要将IDEA官方的tar.gz包下载到本地,我下载的如下图:

然后用命令

tar -xvf ideaIU-2017.2.6.tar.gz
将文件解压好,cd 到其bin目录,然后运行
./idea.sh
接着选择默认安装就可以了。

安装完成后,我在配置Tomcat的时候报错:Warning the selected directory is not a valid tomcat home

查看Tomcat目录的文件权限:

/usr/local/tomcat$ ls -l总用量 4drwxr-xr-x 9 root root 4096 11月 15 12:14 apache-tomcat-8.5.16
只有root用户才有写入权限,其他用户只能读跟执行,这样肯定不行啦。

使用命令,递归改变该文件夹下所有文件的权限:

sudo chmod 777 -R apache-tomcat-8.5.16/
然后 ls  -l 查看该文件夹下的文件:

drwxrwxrwx 2 root root  4096 11月 15 12:14 bindrwxrwxrwx 2 root root  4096 6月  22 01:02 confdrwxrwxrwx 2 root root  4096 11月 15 12:14 lib-rwxrwxrwx 1 root root 57092 6月  22 01:02 LICENSEdrwxrwxrwx 2 root root  4096 6月  22 01:01 logs-rwxrwxrwx 1 root root  1723 6月  22 01:02 NOTICE-rwxrwxrwx 1 root root  7064 6月  22 01:02 RELEASE-NOTES-rwxrwxrwx 1 root root 15946 6月  22 01:02 RUNNING.txtdrwxrwxrwx 2 root root  4096 11月 15 12:14 tempdrwxrwxrwx 7 root root  4096 6月  22 01:01 webappsdrwxrwxrwx 2 root root  4096 6月  22 01:01 work

然后再回去IDEA配置Tomcat,可以了

阅读全文
0 0
原创粉丝点击