好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

在CentOS7(有图形化界面)上安装maven和idea的详细教程

在centos7(有图形化界面)上安装maven和idea 一、安装maven二、安装idea社区版

一、安装maven

maven下载地址

https://maven.apache.org/download.cgi

安装包会默认在当前用户的家目录下,将其移动到tgz目录

?

1

mv apache-maven- 3.6 . 3 -bin.tar.gz tgz/

解压安装,需进入到tgz目录下,执行如下命令

?

1

tar -zvxf apache-maven- 3.6 . 3 -bin.tar.gz -c training/

设置环境变量

?

1

2

3

#maven

export mvn_home=/home/zkpk/tgz/training/apache-maven- 3.6 . 3

export path=$path:$mvn_home/bin

环境变量生效,执行:source ~/.bash_profile

验证,执行: mvn -v

配置阿里云中央仓库,进入到/home/zkpk/tgz/training/apache-maven-3.6.3/conf目录下,vi settings.xml,修改成如下所示

?

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

<settings xmlns= "http://maven.apache.org/settings/1.0.0" xmlns:xsi= "http://HdhCmsTestw3.org/2001/xmlschema-instance"

  xsi:schemalocation="http: //maven.apache.org/settings/1.0.0

            https: //maven.apache.org/xsd/settings-1.0.0.xsd">

  <!-- localrepository

      | the path to the local repository maven will use to store artifacts.

   |

   | default : ${user.home}/.m2/repository -->

      <localrepository>${user.home}/tgz/.m2/repository</localrepository>

 

      <mirrors>

        <mirror>

         <id>alimaven</id>

         <name>aliyun maven</name>

         <url>http: //maven.aliyun测试数据/nexus/content/groups/public/</url>

        <mirrorof>central</mirrorof>   

       </mirror>

      </mirrors>

</settings>

二、安装idea社区版

下载地址

https://HdhCmsTestjetbrains测试数据/idea/download/#section=linux

安装包会默认在当前用户的家目录下,将其移动到tgz目录

?

1

mv ideaic- 2020.3 . 3 .tar.gz tgz/

解压安装,需进入到tgz目录下,执行如下命令

?

1

tar -zvxf ideaic- 2020.3 . 3 .tar.gz -c training/

设置环境变量,执行:vi ~/.bash_profile,添加如下内容:

?

1

2

3

#idea

export idea_home=/home/zkpk/tgz/training/idea-ic- 203.7717 . 56

export path=$path:$idea_home/bin

环境变量生效,执行: source ~/.bash_profile 启动idea命令: idea.sh 打开idea,配置maven,选择file->settings->maven,如下图所示:

到此这篇关于在centos7(有图形化界面)上安装maven和idea的详细教程的文章就介绍到这了,更多相关centos7安装maven和idea内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!

原文链接:https://blog.csdn.net/sujiangming/article/details/115036704

查看更多关于在CentOS7(有图形化界面)上安装maven和idea的详细教程的详细内容...

  阅读:24次