|
|
|
# Red Hat 7.7
|
|
|
|
|
|
|
|
## Install Red Hat 7.7
|
|
|
|
These are instructions to install NDN-IND plus NFD-IND and sentinel-transport on Red Hat Enterprise Linux 7.7 .
|
|
|
|
|
|
|
|
Install Red Hat Enterprise Linux 7.7 from the Binary DVD or other media. (Hint: During installation, in "Network and Host Name", enable your ethernet port. It is much easier to do this during installation.)
|
|
|
|
|
|
|
|
When you log in to Red Hat, use the Subscription Manager to register so that you can use the yum package manager. (Use your Red Hat username, not your email address.)
|
|
|
|
|
|
|
|
The packages from the install DVD need to be updated. In a terminal, enter:
|
|
|
|
|
|
|
|
sudo yum update
|
|
|
|
|
|
|
|
Reboot.
|
|
|
|
|
|
|
|
|
|
|
|
## Compiler
|
|
|
|
We need to upgrade the compiler. The following instructions are copied from https://developers.redhat.com/blog/2019/03/05/yum-install-gcc-8-clang-6/
|
|
|
|
|
|
|
|
In a terminal, enter:
|
|
|
|
|
|
|
|
sudo subscription-manager repos --enable rhel-7-server-optional-rpms \
|
|
|
|
--enable rhel-server-rhscl-7-rpms \
|
|
|
|
--enable rhel-7-server-devtools-rpms
|
|
|
|
sudo yum install devtoolset-8 llvm-toolset-6.0
|
|
|
|
To compile, you have to enter a special bash shell. All compilation steps must be done after entering this command:
|
|
|
|
|
|
|
|
scl enable devtoolset-8 llvm-toolset-6.0 bash
|
|
|
|
|
|
|
|
## Prerequisites
|
|
|
|
To install the prerequisites, in a terminal, enter:
|
|
|
|
|
|
|
|
sudo yum install git openssl-devel sqlite-devel libpcap-devel python-devel zlib-devel bzip2-devel log4cxx-devel autoconf automake libtool
|
|
|
|
To set up PKG_CONFIG_PATH, enter:
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig
|
|
|
|
|
|
|
|
## Boost
|
|
|
|
The version of Boost provided by yum is too old, so we need to build it. In a terminal, enter:
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
wget https://boostorg.jfrog.io/artifactory/main/release/1.71.0/source/boost_1_71_0.tar.gz
|
|
|
|
tar xvfz boost_1_71_0.tar.gz
|
|
|
|
cd boost_1_71_0
|
|
|
|
./bootstrap.sh --with-toolset=clang --with-libraries=all
|
|
|
|
./b2
|
|
|
|
sudo ./b2 install
|
|
|
|
|
|
|
|
## Protobuf
|
|
|
|
Yum doesn't have Protobuf, so we need to build it. In a terminal, enter:
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
git clone --recursive https://github.com/protocolbuffers/protobuf
|
|
|
|
cd protobuf
|
|
|
|
./autogen.sh
|
|
|
|
CC=clang CXX=clang++ ./configure
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
|
|
|
|
# NDN-CXX and NFD
|
|
|
|
To build NDN-CXX and the patched version of NFD, in a terminal, enter:
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
git clone https://github.com/named-data/ndn-cxx
|
|
|
|
cd ndn-cxx
|
|
|
|
git checkout 5149350bb437201e59b5d541568ce86e91993034
|
|
|
|
./waf configure --check-cxx-compiler=clang++ --boost-includes=/usr/local/include --boost-libs=/usr/local/lib
|
|
|
|
./waf
|
|
|
|
sudo ./waf install
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
git clone --recursive https://github.com/operantnetworks/nfd-ind
|
|
|
|
cd nfd-ind
|
|
|
|
git checkout patched
|
|
|
|
./waf configure --check-cxx-compiler=clang++ --boost-includes=/usr/local/include --boost-libs=/usr/local/lib
|
|
|
|
./waf
|
|
|
|
sudo ./waf install
|
|
|
|
sudo cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf
|
|
|
|
|
|
|
|
# NDN-IND
|
|
|
|
The OpenSSL library from yum is OpenSSL 1.0. But NDN-IND needs ChaCha20 which is in OpenSLL 1.1, so we need to build it in a local directory. In a terminal, enter:
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
wget https://www.openssl.org/source/openssl-1.1.1g.tar.gz
|
|
|
|
tar xvf openssl-1.1.1g.tar.gz
|
|
|
|
cd openssl-1.1.1g
|
|
|
|
./config no-shared --prefix=$HOME/openssl --openssldir=$HOME/openssl
|
|
|
|
make
|
|
|
|
make install
|
|
|
|
This installs libcrypto.a in ~/openssl/lib. We build only the static library which will be statically linked into NDN-IND. But we need to rename it so that it doesn’t conflict with the OpenSSL 1.0 library in /usr/lib64 :
|
|
|
|
|
|
|
|
mv $HOME/openssl/lib/libcrypto.a $HOME/openssl/lib/libcrypto1_1.a
|
|
|
|
To build NDN-IND, first we need to remove the OpenSSL 1.0 include files in /usr/include/openssl:
|
|
|
|
|
|
|
|
sudo yum remove openssl-devel
|
|
|
|
To build NDN-IND, enter the following which includes configure options to use OpenSSL 1.1 in the local directory:
|
|
|
|
|
|
|
|
cd ~
|
|
|
|
git clone https://github.com/operantnetworks/ndn-ind
|
|
|
|
cd ndn-ind
|
|
|
|
CC=clang CXX=clang++ ./configure ADD_CFLAGS=-I$HOME/openssl/include ADD_CXXFLAGS=-I$HOME/openssl/include ADD_LDFLAGS=-L$HOME/openssl/lib
|
|
|
|
make
|
|
|
|
sudo make install
|
|
|
|
Now that NDN-IND is statically linked to OpenSSL 1.1 and installed, we restore the OpenSSL 1.0 nclude files in /usr/include/openssl which are needed by other packages.
|
|
|
|
|
|
|
|
sudo yum install openssl-devel
|
|
|
|
|
|
|
|
## ldconfig
|
|
|
|
The usual library directories are not on the load path by default. The following needs to be run once to configure the system:
|
|
|
|
|
|
|
|
sudo sh -c "echo /usr/local/lib64 >> /etc/ld.so.conf"
|
|
|
|
sudo sh -c "echo /usr/local/lib >> /etc/ld.so.conf"
|
|
|
|
sudo ldconfig
|
|
|
|
|
|
|
|
## Common problems
|
|
|
|
If you get a compiler error like "g++ not found" or "strchr not found", remember that you need enter the special bash shell with this command:
|
|
|
|
|
|
|
|
scl enable devtoolset-8 llvm-toolset-6.0 bash
|
|
|
|
|
|
|
|
If you get an error like "libndn-cxx not found", remember that you need to update PKG_CONFIG_PATH with this command:
|
|
|
|
|
|
|
|
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig
|
|
|
|
|
|
|
|
If you run an application and get an error that a library is not found, make sure you run the commands in the "ldconfig" section to add the library directories. |
|
|
|
\ No newline at end of file |