Skip to content

Commit

Permalink
Documentation: fix installation guide (#145)
Browse files Browse the repository at this point in the history
- update list of dependencies
- use correct version of libtins
- include direct instructions for libyang-dev
- remove polycube-tools instructions
- use last working version of pistache

Solves: #143

Signed-off-by: Mauricio Vasquez B <mauriciovasquezbernal@gmail.com>
  • Loading branch information
mauriciovasquezbernal authored and acloudiator committed Jun 10, 2019
1 parent b50b84c commit b64e0fa
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
55 changes: 26 additions & 29 deletions Documentation/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,63 +91,60 @@ Install dependencies
::

# Install polycube dependencies
sudo apt-get -y install bison build-essential cmake flex git libedit-dev libllvm5.0 \
llvm-5.0-dev libclang-5.0-dev python zlib1g-dev libelf-dev nmap \
software-properties-common libnl-route-3-dev libnl-genl-3-dev \
curl uuid-dev build-essential autoconf libtool
sudo apt-get -y install git build-essential cmake bison flex \
libelf-dev libllvm5.0 llvm-5.0-dev libclang-5.0-dev \
libnl-route-3-dev libnl-genl-3-dev uuid-dev pkg-config \
autoconf libtool m4 automake libssl-dev kmod jq bash-completion \
gnupg2

Install libyang-dev
###################

Install libyang
^^^^^^^^^^^^^^^^
::

sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/liberouter/xUbuntu_16.04/ /' > /etc/apt/sources.list.d/home:liberouter.list"
wget -nv https://download.opensuse.org/repositories/home:liberouter/xUbuntu_16.04/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update
sudo apt-get install libyang-dev

Please check the `libyang installation documentation <https://software.opensuse.org//download.html?project=home%3Aliberouter&package=libyang>`_.

If you are using another operating system please check the `libyang installation documentation <https://software.opensuse.org//download.html?project=home%3Aliberouter&package=libyang>`_.

Install pistache
^^^^^^^^^^^^^^^^
################

::

# Install Pistache (a library to create web servers that is used in polycubed)
git clone https://github.com/oktal/pistache.git
cd pistache
# use last known working version
git checkout 117db02eda9d63935193ad98be813987f6c32b33
git submodule update --init
mkdir build && cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_SSL=ON ..
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_USE_SSL=ON ..
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install


Install libtins
^^^^^^^^^^^^^^^
###############

::

# Install libtins (a library for network packet sniffing and crafting, used to create packets)
git clone https://github.com/mfontanini/libtins.git
git clone --branch v3.5 https://github.com/mfontanini/libtins.git
cd libtins
mkdir build && cd build
cmake -DLIBTINS_ENABLE_CXX11=ON -DLIBTINS_BUILD_EXAMPLES=OFF \
-DLIBTINS_BUILD_TESTS=OFF -DLIBTINS_ENABLE_DOT11=OFF \
-DLIBTINS_ENABLE_PCAP=OFF -DLIBTINS_ENABLE_WPA2=OFF \
-DLIBTINS_ENABLE_WPA2_CALLBACKS=OFF
-DLIBTINS_BUILD_TESTS=OFF -DLIBTINS_ENABLE_DOT11=OFF \
-DLIBTINS_ENABLE_PCAP=OFF -DLIBTINS_ENABLE_WPA2=OFF \
-DLIBTINS_ENABLE_WPA2_CALLBACKS=OFF ..
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install
sudo ldconfig

Install polycube-tools
^^^^^^^^^^^^^^^^^^^^^^

Install it only if you are a developer

::

git clone https://github.com/mauriciovasquezbernal/polycube-tools
cd polycube-tools
mkdir build && cd build
cmake ..
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install


Installing polycube
^^^^^^^^^^^^^^^^^^^

Expand Down
6 changes: 4 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,15 @@ echo "Install pistache"
cd $WORKDIR
set +e
if [ ! -d pistache ]; then
git clone https://github.com/oktal/pistache.git --depth=1
git clone https://github.com/oktal/pistache.git
fi

cd pistache
# use last known working version
git checkout 117db02eda9d63935193ad98be813987f6c32b33
git submodule update --init
mkdir -p build && cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_SSL=ON ..
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DPISTACHE_USE_SSL=ON ..
make -j $(getconf _NPROCESSORS_ONLN)
$SUDO make install

Expand Down

0 comments on commit b64e0fa

Please sign in to comment.