Linux服务器搭建Apache Ant

2017-06-22  本文已影响0人  蘑菇姐夫

Apache Ant 是一种自动构建软件工具。它类似于 Make,但它的实现是 Java,它的运行要求 Java 平台,最适合于构建 Java 项目。
我在 Linux 服务器上安装 apache ant 的步骤如下:
通过 SSH 协议登录服务器:

1.下载安装包:

[root@branch-jenkins-01 jumpserver] # wget http://apache.mirrors.tds.net/ant/binaries/apache-ant-1.9.9-bin.tar.gz
--2017-06-22 14:00:18--  http://apache.mirrors.tds.net/ant/binaries/apache-ant-1.9.9-bin.tar.gz
Resolving apache.mirrors.tds.net... 216.165.129.134
Connecting to apache.mirrors.tds.net|216.165.129.134|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5635116 (5.4M) [application/x-gzip]
Saving to: “apache-ant-1.9.9-bin.tar.gz”

100%[=================================================================================>] 5,635,116    566K/s   in 37s

2017-06-22 14:00:56 (149 KB/s) - “apache-ant-1.9.9-bin.tar.gz” saved [5635116/5635116]

2.解压缩:

[root@branch-jenkins-01 jumpserver] # tar -xzvf apache-ant-1.9.9-bin.tar.gz

3.切换到解压目录:

[root@branch-jenkins-01 jumpserver] # cd apache-ant-1.9.9
[root@branch-jenkins-01 apache-ant-1.9.9] #

4.复制:

[root@branch-jenkins-01 apache-ant-1.9.9] # cp -arp * /usr/local/ant
[root@branch-jenkins-01 apache-ant-1.9.9] #

5.PATH设置

[root@branch-jenkins-01 apache-ant-1.9.9] # echo 'export PATH=$PATH:/usr/local/ant/bin' >>/etc/profile
[root@branch-jenkins-01 apache-ant-1.9.9] #

6.ANT_HOME设置

[root@branch-jenkins-01 apache-ant-1.9.9] # echo 'export ANT_HOME=/usr/local/ant' >>/etc/profile
[root@branch-jenkins-01 apache-ant-1.9.9] #

7.本次登陆 PATH 设置:

[root@branch-jenkins-01 apache-ant-1.9.9] # export PATH=$PATH:/usr/local/ant/bin
[root@branch-jenkins-01 apache-ant-1.9.9] #

8.本次登陆 ANT_HOME 设置:

[root@branch-jenkins-01 apache-ant-1.9.9] # export ANT_HOME=/usr/local/ant
[root@branch-jenkins-01 apache-ant-1.9.9] #
上一篇下一篇

猜你喜欢

热点阅读