linux - 如何将 Maven 安装到 Red Hat Enterprise Linux 6 中?

标签 linux maven redhat yum

我正在使用 Scientific Linux 机器并尝试使用 yum 命令安装 Maven。 Scientific Linux 是基于 Red Hat Linux Enterprise Edition 6 的。

我更喜欢以一种易于更新的方式安装 Maven,这就是为什么我回避简单地访问 Apache Maven 站点并获取我需要的文件的原因。 仅以 root 权限运行 yum 是不够的。我使用 yum search maven 返回“JPackage Utilities”,我尝试安装它只是为了得到:

Package jpackage-utils-1.7.5-3.12.el6.noarch already installed and latest version

我假设创建一个像 /etc/yum.repos.d/maven.repo 这样的新 repo 文件就可以了。 我发现一个网站建议我将我的 maven.repo 文件指向 URL http://www.jpackage.org/jpackage50.repo ,但是这似乎是对旧版本 Linux 的修复,因为它没有解决我的问题

一如既往地提前感谢您的任何帮助或建议!

最佳答案

与发行版无关的通用存储库正是您想要的。作为 root,将几个 jpackage-generic repos 添加到 yum(下面的两个片段)。然后执行 yum update,最后 yum install maven2。

cat > /etc/yum.repos.d/jpackage-generic-free.repo << EOF
[jpackage-generic-free]
name=JPackage generic free
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/free/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF

cat > /etc/yum.repos.d/jpackage-generic-devel.repo << EOF
[jpackage-generic-devel]
name=JPackage Generic Developer
baseurl=http://mirrors.dotsrc.org/jpackage/6.0/generic/devel/
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF

关于linux - 如何将 Maven 安装到 Red Hat Enterprise Linux 6 中?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6298865/

相关文章:

linux - 在哪里管理 apache 后备目录

java - java中的视频处理

linux - 设置 JBOSS EAP 6 的多个实例

linux - Grep 中的行编号

python - CherryPy - 使用直接下载还是我的发行版?

maven - Nexus 3 : how to get latest snapshot?

java - AssertionFailedError : Maven 3. 需要 2.4 或更高版本(运行版本 3.2.5)

linux - 如何从输出中删除上方和下方的空行

mysql - 怎么修? : mysql> show variables like 'plugin_dir' ; Does not show plugin_dir location

linux - 内存保护键 内存重新排序