<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>nexus-aliyun</id> <mirrorOf>central</mirrorOf> <name>Nexus aliyun</name> <url>http://maven.aliyun.com/nexus/content/groups/public</url> </mirror> </mirrors>
1 2 3 4 5 6
[root@hadoop101apache-maven-3.0.5]# vim /etc/profile #MAVEN_HOME export MAVEN_HOME=/opt/module/apache-maven-3.0.5 export PATH=$PATH:$MAVEN_HOME/bin
[root@hadoop101software]#source /etc/profile
验证命令:mvn -version
ant解压、配置 ANT_HOME和PATH
1 2 3 4 5 6 7 8
[root@hadoop101software]# tar -zxvf apache-ant-1.9.9-bin.tar.gz -C /opt/module/
[root@hadoop101apache-ant-1.9.9]# vim /etc/profile #ANT_HOME export ANT_HOME=/opt/module/apache-ant-1.9.9 export PATH=$PATH:$ANT_HOME/bin
[root@hadoop101software]# tar -zxvf protobuf-2.5.0.tar.gz -C /opt/module/ [root@hadoop101opt]# cd /opt/module/protobuf-2.5.0/
1 2 3 4 5 6 7 8 9 10 11 12
[root@hadoop101protobuf-2.5.0]#./configure [root@hadoop101protobuf-2.5.0]# make [root@hadoop101protobuf-2.5.0]# make check [root@hadoop101protobuf-2.5.0]# make install [root@hadoop101protobuf-2.5.0]# ldconfig
[root@hadoop101hadoop-dist]# vi /etc/profile #LD_LIBRARY_PATH export LD_LIBRARY_PATH=/opt/module/protobuf-2.5.0 export PATH=$PATH:$LD_LIBRARY_PATH