intellij idea的安装,转载
2011-09-08 09:47
85 查看
http://techbrew.net/articles/200711/how-to-put-intellij-idea-on-ubuntu/
I’ve been a user of the excellent IntelliJ
Java IDEfor 4 years on Windows. Even though the official Linux support by JetBrains is only for RedHat, you can also install IntelliJ fairly easily onUbuntu.
I’ve tested this with Xubunto 7.10
(Gutsy), Java 6,
and IntelliJ 7. Here’s how to do it in four basic steps:
1) Get Java
Install the Java 6 JDK, which IDEA itself needs to run. (You can have other JDKs for your projects, but you’ll need this one to run IntelliJ itself.) For example, type this in a terminal:
Follow the prompts for root password, download confirmation, and eventually the Sun EULA to install Java itself. If it installed successfully, you should be able to type this at a prompt:
… to get several lines telling you the version of Java you have installed. If this doesn’t work, refer to Sun’s documentation on troubleshooting installations.
2) Get IntelliJ IDEA
Download the latest version of IntelliJ IDEA for Linux:
http://www.jetbrains.com/idea/download/index.html#linux
Once the download is finished, extract the archive using the correct filename according to your download. For example, to install IntelliJ in /usr/lib,
do the following:
The IntelliJ installation will now be in a subdirectory indicating the build number, in the format “idea-xxxx”. In the case of IDEA 7.0.1, the app directory is “idea-7364“.
(Once the extraction is done, you can delete the downloaded archive to conserve disk space if needed.)
3) Get Environmental
There are a couple of environment variables to be taken care of. First, you need to set a new environment variable that tells IntelliJ where your install of Java is. For example:
Use the “env” command, or just “echo
$JDK_HOME“, to verify the variable is set.
Next, you’ll need to edit /etc/environment with superuser rights in the editor of your choice,
adding the idea-xxxx/bin directory to your PATH variable.
For example, you can edit the environment with the GUI mousepad editor like so:
The various directories in the environment PATH variable are delineated by colons (:). Append the current value (inside the quotes) with a new colon and then add the idea-xxxx/bin location.
It should look something like this:
Save and close the environment file. You’ll need to “source” it for your system to pick up the new directory in the PATH. You can verify your changes by echoing the variable as well:
If you see the path to IntelliJ returned in the output, you’re all set.
Lastly, you may want to change the VM settings of IntelliJ. This depends entirely on your project size and other factors, so you’ll need to base these settings on your own need. The settings are in idea-xxx/bin/idea.vmoptions.
4) Get Started!
That’s it. Now you can run “idea.sh” from a terminal in any directory, and IntelliJ should launch…
If you run into problems, be sure to double-check the readme files in the installation directory.
Give Back
If this article proved useful to you, please drop us a comment and let us know. Or, if you find problems/alternate solutions along the way, please share them for the benefit of others. Thanks and happy coding!
I’ve been a user of the excellent IntelliJ
Java IDEfor 4 years on Windows. Even though the official Linux support by JetBrains is only for RedHat, you can also install IntelliJ fairly easily onUbuntu.
I’ve tested this with Xubunto 7.10
(Gutsy), Java 6,
and IntelliJ 7. Here’s how to do it in four basic steps:
1) Get Java
Install the Java 6 JDK, which IDEA itself needs to run. (You can have other JDKs for your projects, but you’ll need this one to run IntelliJ itself.) For example, type this in a terminal:
sudo apt-get install sun-java6-jdk
Follow the prompts for root password, download confirmation, and eventually the Sun EULA to install Java itself. If it installed successfully, you should be able to type this at a prompt:
java -version
… to get several lines telling you the version of Java you have installed. If this doesn’t work, refer to Sun’s documentation on troubleshooting installations.
2) Get IntelliJ IDEA
Download the latest version of IntelliJ IDEA for Linux:
http://www.jetbrains.com/idea/download/index.html#linux
Once the download is finished, extract the archive using the correct filename according to your download. For example, to install IntelliJ in /usr/lib,
do the following:
tar xfz idea-7.0.1.tar.gz ./usr/lib/
The IntelliJ installation will now be in a subdirectory indicating the build number, in the format “idea-xxxx”. In the case of IDEA 7.0.1, the app directory is “idea-7364“.
(Once the extraction is done, you can delete the downloaded archive to conserve disk space if needed.)
3) Get Environmental
There are a couple of environment variables to be taken care of. First, you need to set a new environment variable that tells IntelliJ where your install of Java is. For example:
export JDK_HOME="/usr/lib/jvm/java-6-sun/"
Use the “env” command, or just “echo
$JDK_HOME“, to verify the variable is set.
Next, you’ll need to edit /etc/environment with superuser rights in the editor of your choice,
adding the idea-xxxx/bin directory to your PATH variable.
For example, you can edit the environment with the GUI mousepad editor like so:
sudo mousepad /etc/environment
The various directories in the environment PATH variable are delineated by colons (:). Append the current value (inside the quotes) with a new colon and then add the idea-xxxx/bin location.
It should look something like this:
PATH="/usr/local/sbin:/usr/local/bin:/usr/lib/idea-7364/bin"
Save and close the environment file. You’ll need to “source” it for your system to pick up the new directory in the PATH. You can verify your changes by echoing the variable as well:
source /etc/environment
echo $PATH
If you see the path to IntelliJ returned in the output, you’re all set.
Lastly, you may want to change the VM settings of IntelliJ. This depends entirely on your project size and other factors, so you’ll need to base these settings on your own need. The settings are in idea-xxx/bin/idea.vmoptions.
4) Get Started!
That’s it. Now you can run “idea.sh” from a terminal in any directory, and IntelliJ should launch…
idea.sh
If you run into problems, be sure to double-check the readme files in the installation directory.
Give Back
If this article proved useful to you, please drop us a comment and let us know. Or, if you find problems/alternate solutions along the way, please share them for the benefit of others. Thanks and happy coding!
相关文章推荐
- IntelliJ IDEA 2018.1安装破解图文教程
- Intellij IDEA 安装lombok及使用详解
- RabbitMQ安装遇到的问题(转载)
- android虚拟机上安装SD卡(转载)
- Ubuntu 通过Deb 安装 MySQL 5.5 [转载]
- Intellij IDEA 安装lombok及使用详解
- Thrift安装[转载]
- linux man使用方法和centos安装中文man包- 转载
- (转载)【总结】Python中第三方的库(library)、模块(module),包(package)的安装方法
- Intellij IDEA配置优化--转载
- gvim,安装taglist (此文大部分属转载于网络)
- 如何安装IntelliJ IDEA
- IntelliJ IDEA - 热部署插件JRebel 安装使用教程
- 在CentOS 7/6.5/6.4 中安装Java JDK 8(转载)
- IntelliJ IDEA开发工具详细安装步骤
- 关于ubuntu11.04安装后启动花屏的解决方案(转载并修正)
- Ubuntu 9.10 java 安装(转载)
- [转载]MAC OS X 安装完mysql后终端不识别mysql命令的解决办法
- 在mac系统安装Apache Tomcat的详细步骤(转载自himi的博客,修改了错误添加了图片)
- Intellij IDEA 插件的安装(live edit为例,实现HTML自动换行缩进/保存/刷新等功能)