在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
总用量 4
drwxr-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 bin
drwxrwxrwx 2 root root 4096 6月 22 01:02 conf
drwxrwxrwx 2 root root 4096 11月 15 12:14 lib
-rwxrwxrwx 1 root root 57092 6月 22 01:02 LICENSE
drwxrwxrwx 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.txt
drwxrwxrwx 2 root root 4096 11月 15 12:14 temp
drwxrwxrwx 7 root root 4096 6月 22 01:01 webapps
drwxrwxrwx 2 root root 4096 6月 22 01:01 work
然后再回去IDEA配置Tomcat,可以了