Install ant on Mac and ant on Mac
When you are still depressed about how to set environment variables to set ant deployment on mac, a lot of complicated problems are coming. Here is a simple way to set it quickly, we chose to install brew to install ant, which can solve the problem easily;
So that mac can have similar apt-get functions-brew:
I have always missed apt-get In ubuntu, because it is really convenient, what to install, a command to handle it, and all the dependent packages are maintained by apt-get. Download, compile, and install. What kind of software is uncomfortable to use, a command to uninstall!
I miss apt-get and found the alternative tool MacPorts, which is also said to solve my problem. Unfortunately, I cannot update the local software index library!
The homebrew homepage provides a detailed description of brew, but we prefer to download it for practical drills!
- Install brew
- Use brew to install software
- Use brew to uninstall software
- Use brew retrieval software
1. Install brew:
Shell code
- Curl-LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz-C/usr/local -- strip 1
The above command can be found on the official website!
2. Use brew to install software
Wget is indispensable for other tools, but it is not available on mac by default!
Let's start with it:
Shell code
- Brew install wget
Even install tomcat:
Shell code
- Brew install tomcat
Or unrar:
Shell code
- Brew install unrar
3. Use brew to uninstall the software
Simple installation, easier to uninstall:
Shell code
- Brew uninstall unrar
4. Use brew search software
Let's see what we can find:
Shell code
- Brew search/apache */
/Apache */uses a regular expression. Use/to separate the expressions!
Start installing ant:
Sudo brew install ant
Password:
==>Downloading https://downloads.sf.net/project/machomebrew/Bottles/ant-1.9.4.mave
######################################## ################################ 100.0%
==>Pouring ant-1.9.4.mavericks.bottle.tar.gz
��/Usr/local/Cellar/ant/1.9.4: 1597 files, 39 M
Forlong401: build forlong401 $ ant-version
Apache Ant (TM) version 1.9.4 compiled on Limit L 29 2014
This eliminates a series of troubles such as environment variable settings.