For details, see: https://libcoap.net/doc/install.html#code
1. Environment:
1.1. Alibaba Cloud Server
1.2.Ubuntu 16.04
2. Configure the environment:
2.1. Remote connection server (win10 Linux subsystem Ubuntu)
$: ssh root@IP
2.2. Tools needed for configuration:
$:sudo apt-get update
$:sudo apt-get install git
$: sudo apt-get install -y pkg-config
$: sudo apt-get install m4
$:sudo apt-get install autoconf
$:sudo apt-get install automake
$:sudo apt-get install libtool
$:sudo apt-get install doxygen
$:sudo apt-get install asciidoc
$:sudo apt-get install cunit
2.3. Create a directory to download the source code:
$: cd / home / liu
$:mkdir coap
$: cd coap
Download the source code:
$:git clone https://github.com/obgm/libcoap.git
3. Compile and test
3.1. Enter the directory:
$:cd libcoap
3.2. Configuration compilation
$: ./autogen.sh //Generate script
$: ./configure //Configure script
$: make //compile
$: make install //install
For specific usage, see: https://www.linuxidc.com/Linux/2011-02/32211.htm?_t_t_t=0.8881751426961273
3.3. Testing
After everything goes well, go to the examples folder in this directory
$:cd examples/
There are generated test tools to run
$:./coap-server
Then according to the copper plugin we installed last time
http://www.cnblogs.com/liuyunxiang/p/8894596.html
Test if it is successful If it is successful, the following content will appear to get the time of the server