From 55c6c960c6a9975d1b5d30b6a92a0ae8a2b075db Mon Sep 17 00:00:00 2001 From: Christophe Imbaud <christophe.imbaud@savoirfairelinux.com> Date: Thu, 29 Feb 2024 15:06:40 -0500 Subject: [PATCH] doc: Update BUILD instructions Change-Id: I892a64860a5c7948d665d72c1de043344480ee91 --- BUILD.md | 28 +++++++++++++++++++++++++--- tools/dnc/README.md | 8 ++++---- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/BUILD.md b/BUILD.md index 63ab2a2..cd55fd1 100644 --- a/BUILD.md +++ b/BUILD.md @@ -25,7 +25,7 @@ brew install gnutls msgpack-cxx argon2 asio ## Building Instructions -Follow these steps to build DHTNet: +Follow these steps to build DHTNet ( Note: You will need ressources (RAM, CPU) for the build to succeed ): ### 1. Clone the DHTNet Repository @@ -47,6 +47,22 @@ This step ensures that your project has the most up-to-date dependencies for the ### 3. Install dependencies: +#### Add tools and libraries + +##### Ubuntu 20.04+: + +```bash +sudo apt install build-essential pkg-config cmake git wget \ + libtool autotools-dev autoconf \ + cython3 python3-dev python3-setuptools python3-build python3-virtualenv \ + libncurses5-dev libreadline-dev nettle-dev libcppunit-dev \ + libgnutls28-dev libuv1-dev libjsoncpp-dev libargon2-dev libunistring-dev \ + libssl-dev libfmt-dev libhttp-parser-dev libasio-dev libmsgpack-dev libyaml-cpp-dev \ + +``` + +### 4. Build: + Create a build directory and use CMake to configure the build: ```bash @@ -54,13 +70,19 @@ mkdir build cd build cmake .. ``` + +Or, if you want to override some variables, add them with -D : +```bash +cmake .. -DBUILD_DEPENDENCIES=On -DCMAKE_INSTALL_PREFIX=/usr +``` + Finally, initiate the build process: ```bash -make +make -j sudo make install ``` ## Contributing -If you encounter issues or wish to contribute to DHTNet's development, please visit the [GitHub repository](https://github.com/savoirfairelinux/dhtnet) for more details on how to get involved. \ No newline at end of file +If you encounter issues or wish to contribute to DHTNet's development, please visit the [GitHub repository](https://github.com/savoirfairelinux/dhtnet) for more details on how to get involved. diff --git a/tools/dnc/README.md b/tools/dnc/README.md index 3698189..6fe2748 100644 --- a/tools/dnc/README.md +++ b/tools/dnc/README.md @@ -46,7 +46,7 @@ To facilitate SSH connections to a remote device, dnc establishes a DHT network To initiate, generate a certificate authority and a server certificate: ```shell -sudo dhtnet-crtmgr --setup -i /usr/local/etc/dhtnet/ +sudo dhtnet-crtmgr --setup -o /etc/dhtnet/ ``` Then, launch the dnc service: ```shell @@ -65,8 +65,8 @@ dhtnet-crtmgr -g -c /usr/local/etc/dhtnet/id/id-server.crt -p /usr/local/etc/dht To establish a secure connection from the client side, it's necessary to generate a certificate authority (CA) and a certificate. Execute the following commands to set up your identity: ```shell -dhtnet-crtmgr -i <repo_ca> -n ca -dhtnet-crtmgr -i <repo_crt> -n certificate -c <repo_ca>/ca.crt -p <repo_ca>/ca.pem +dhtnet-crtmgr -o <repo_ca> -n ca +dhtnet-crtmgr -o <repo_crt> -n certificate -c <repo_ca>/ca.crt -p <repo_ca>/ca.pem ``` Replace <repo_ca> with the directory path for storing the CA files and <repo_crt> with the path for the client certificate files. Update your YAML configuration file to include <repo_crt>/certificate.pem as the privateKey and <repo_crt>/certificate.crt as the certificate. @@ -85,4 +85,4 @@ ssh <ssh_remote_user>@dnc/<peer_identifier> For exemple: ```sh ssh mypeer@dnc/2f4975e7b11a0908bd400b27130fe9a496d0f415 -``` \ No newline at end of file +``` -- GitLab