๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ปTech/๐ŸงLinux

[๋ฆฌ๋ˆ…์Šค] ant ์„ค์น˜ ๋ฐ ์„ค์ •

by _viper_ 2019. 8. 20.
๋ฐ˜์‘ํ˜•

ant๋Š” Java ๊ธฐ๋ฐ˜์˜ ๋นŒ๋“œํˆด๋กœ ๋ฆฌ๋ˆ…์Šค์—์„œ make ์™€ ์œ ์‚ฌํ•œ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

 

1. ์•„๋ž˜ ์ฃผ์†Œ์—์„œ ant ์ตœ์‹  ๋ฒ„์ „ ํ™•์ธ

 

2. ๋‹ค์šด๋กœ๋“œ

wget https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.gz

 

3. ์••์ถ• ํ•ด์ œ 

tar -zxvf apache-ant-1.10.5-bin.tar.gz

 

4. ํŒจ์Šค ์„ค์ •

  • ๋ณธ์ธ์ด ์••์ถ•ํ•ด์ œํ•œ bin ๊ฒฝ๋กœ๋ฅผ ์„ค์ •ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค
vi ~/.bash_profile

-- ์•„๋ž˜ ๋‚ด์šฉ ์ถ”๊ฐ€
export ANT_HOME=/usr/bin/ant
export PATH=$PATH:$ANT_HOME/bin

 

5. ์„ค์ • ์ ์šฉ

source ~/.bash_profile

 

6. ๋ช…๋ น์–ด๋กœ ์„ค์น˜ ํ™•์ธ

ant -v

 

 

๐Ÿ”Ž ์ฐธ์กฐ

  • ant ์‹คํ–‰ ์‹œ command not found ๋‚  ๊ฒฝ์šฐ ์•„๋ž˜ ์œ„์น˜์—์„œ PATH๋ฅผ ๋ชจ๋‘ ํ™•์ธํ•ด ์ค๋‹ˆ๋‹ค.
  • /etc/profile ๋งŒ ์„ค์ •ํ•ด ์ฃผ๋ฉด ๋˜์ง€๋งŒ ๊ธฐ์กด์— PATH๋ฅผ ๋‹ค๋ฅธ ๊ฒฝ๋กœ์—์„œ ์„ค์ •ํ•˜๊ณ  ์žˆ๋‹ค๋ฉด ๊ฐ™์ด ๋ด์ค˜์•ผ ํ•ฉ๋‹ˆ๋‹ค..ใ… ใ… 
/etc/profile
~/.bash_profile
~/.bashrc