AFCA(Tianjin) Information Technology Co.,Ltd.
亚联(天津)信息技术有限责任公司
Ant软件安装手册
序号 |
分类 |
姓名 |
范围要求 |
1 |
Owner |
林志国 |
|
2 |
作者 |
林志国 |
|
3 |
审核人 |
||
4 |
审核人 |
||
5 |
审核人 |
||
6 |
批准人 |
序号 |
版本号 |
修订日期 |
修订概述 |
修订人 |
审核人 |
批准人 |
备注 |
1 |
V1.0 |
2018.07.09 |
创建 |
林志国 |
|||
目录
一、JDK安装
在Ant服务器上操作
安装jdk1.8,请参考https://www.cnblogs.com/pydevops/p/9489093.html
如果Ant与SonarScanner在一台服务器上安装,请跳过这一步
二、安装Ant
1、建立ant用户
groupadd -g 2005 ant useradd -u 2005 -g 2005 ant echo “ant”|passwd ant --stdin
2、解压软件包
cd /software/Maven_ant_gradle unzip apache-ant-1.9.12-bin.zip mv apache-ant-1.9.12 /home/ant/ant
3、配置环境变量
cat >>/etc/profile<<EOF export ANT_HOME=/home/ant/ant export PATH=\$PATH:\$ANT_HOME/bin EOF source /etc/profile
4、授予权限
chown ant:ant -R /home/ant chmod 755 -R /home/ant
5、验证安装
su – ant ant -v
出现以下信息,完成安装
Apache Ant(TM) version 1.9.12 compiled on June 19 2018 Trying the default build file: build.xml Buildfile: build.xml does not exist! Build failed