centos 安装maven

wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

yum -y install apache-maven

配置环境变量

# vim /etc/profile 

#set maven environment

MAVEN_HOME=/usr/share/apache-maven

export MAVEN_HOME

export PATH=${PATH}:${MAVEN_HOME}/bin

# source /etc/profile

你可能感兴趣的:(centos 安装maven)