linux apache ant安装,Linux服务器搭建Apache Ant

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] #

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值