--Get installation packages, download directly from the Internet or other channels, direct wget here
# wget http://curl.haxx.se/download/curl-7.17.1.tar.gz
--Extract to current directory
# TAR-ZXF Curl-7.17.1.tar.gz
--Into the unpacked directory
# CD curl-7.17.1
--Configure, specify the installed directory, this is "/usr/local/curl"
#./configure--prefix=/usr/local/curl
--
# make
--Installation
# make Install
--Installation Complete
Use:
Add the Curl command to the environment variable,
Command line (only for this session, or to configure environment variables in. bash_profile,. bashrc files):
# Export path= $PATH:/usr/local/curl/bin
And then you can use the
# Curl Http://www.baidu.com
Come out a lot of HTML code, is Baidu homepage code
Instructions for getting Started:
http://www.javaeye.com/topic/648143
-------------------------------------------------------------------------------------------
Use instance (send POST request):
# curl-d @json Http://www.google.com/loc/json
-d--is sending the request as Post
@json--@ reads data from a file, the content in the JSON file is {"Address_language": "Zh_cn", "cell_towers": [{"cell_id": "36526", "Location_area_code ":" 14556 "," Mobile_contry_code ":" 460 "," Mobile_network_code ":" "," "Host": "Maps.google.com", "location": null, " Request_address ": True," version ":" 1.1.0 "," wifi_towers ": []}
Return:
{"Location": {"latitude": 32.117302, "longitude": 114.116598, "address": {"Country": "China", "Country_code": "CN", "region" ":" Henan Province "," City ":" Xinyang "}," accuracy ": 1625.0}," Access_token ":" 2:FAXK0XL_DHRBCQIK:5TGTJSZX1SCPJUFJ "}
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/