Source Installation - mkfio/mkfio GitHub Wiki
Get source code
git clone https://github.com/mkfio/mkfio.git
Build
==========================================================
Ubuntu16.04/18.04
Required tools and libraries
sudo apt install -y g++ libboost-all-dev cmake openssl libreadline-dev pkg-config libncurses5-dev autoconf
# ubuntu16.04
sudo apt install -y libssl-dev
# ubuntu18.04
sudo apt install -y cmake libssl1.0-dev libprotobuf-dev protobuf-compiler
# Compile libsodium (version >= 1.0.18)
wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz --no-check-certificate
tar -zxvf libsodium-1.0.18.tar.gz
cd libsodium-1.0.18
./configure
make -j8 && make check
sudo make install
# Compile protobuf
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.11.3/protobuf-cpp-3.11.3.tar.gz
tar -xzvf protobuf-cpp-3.11.3.tar.gz
cd protobuf-3.11.3
./configure --prefix=/usr
make -j8
sudo make install
Ubuntu Build
cd mkfio
./INSTALL.sh
mkf -help
CentOS 7
Required tools and libraries
sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y git cmake3 openssl-devel readline-devel gcc gcc-c++ ncurses-devel autoconf
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
# download protobuf 3.0.0 and build it
wget https://github.com/protocolbuffers/protobuf/releases/download/v3.0.0/protobuf-cpp-3.0.0.tar.gz
tar -xzvf protobuf-cpp-3.0.0.tar.gz
cd protobuf-3.0.0
./configure --prefix=/usr --libdir=/usr/lib64
make -j8
sudo make install
Download
boost (version >= 1.58.0). If there is no boost or older version, you must download and compile from source ---># compile
cd boost
./bootstrap.sh
sudo ./b2 install
libsodium (version >= 1.0.18)
- wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz --no-check-certificate
- tar -zxvf libsodium-1.0.18.tar.gz
- cd libsodium-1.0.18
- ./configure
- make -j8 && make check
- sudo make install
CentOS Build
cd mkfio
./INSTALL.sh
mkf -help
CentOS 6.5
Required tools and libraries
- sudo rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
- sudo yum install -y git cmake3 openssl-devel readline-devel ncurses-devel autoconf
- sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
protobuf (version >= 3.0.0)
- wget https://github.com/protocolbuffers/protobuf/releases/download/v3.0.0/protobuf-cpp-3.0.0.tar.gz
- tar -xzvf protobuf-cpp-3.0.0.tar.gz
- cd protobuf-3.0.0
- ./configure --prefix=/usr --libdir=/usr/lib64
- make -j8
- sudo make install
libsodium (version >= 1.0.18)
- wget https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE/libsodium-1.0.18.tar.gz --no-check-certificate
- tar -zxvf libsodium-1.0.18.tar.gz
- cd libsodium-1.0.18
- ./configure
- make -j8 && make check
- sudo make install
Download
boost (version >= 1.58.0). If there is no boost or older version, you must download and compile from source --->- wget https://sourceforge.net/projects/boost/files/boost/1.58.0/boost_1_58_0.tar.gz/download -O boost_1_58_0.tar.gz
- tar -xzf boost_1_58_0.tar.gz
- cd boost_1_58_0
- ./bootstrap.sh
- sudo ./b2 install
GCC
- sudo yum install centos-release-scl-rh
- sudo yum install -y devtoolset-7-gcc devtoolset-7-gcc-c++
- echo "source /opt/rh/devtoolset-7/enable" >> /etc/bashrc
- source /etc/bashrc
python2.7
- yum install centos-release-scl-rh
- yum install python27-python
- echo "source /opt/rh/python27/enable" >> /etc/bashrc
CentOS Build
cd mkfio
./INSTALL.sh
mkf -help
MacOSX
Required libraries
brew install cmake pkg-config openssl boost libsodium readline protobuf ncurses
cmake (version >= 3.5.1)
- Test cmake version :
cmake --version
openssl (version >= 1.0)
- Test openssl version :
`brew --prefix openssl`/bin/openssl version
- If "no OPENSSL_ROOT_DIR" error occured, set enviroment variable :
echo "export OPENSSL_ROOT_DIR=`brew --prefix openssl`" >> ~/.bash_profile && . ~/.bash_profile
boost (version >= 1.58.0)
- Test boost version :
grep "#define BOOST_VERSION" ${BOOST_ROOT}/include/boost/version.hpp
- If "no BOOST_ROOT" error occured, set enviroment variable :
echo "export BOOST_ROOT=`brew --prefix boost`" >> ~/.bash_profile && . ~/.bash_profile
sodium (version >= 1.0.18)
- Test sodium version :
pkg-config --exists libsodium && pkg-config --modversion libsodium
- If
no sodium
error occured, set enviroment variable :
echo "export PKG_CONFIG_PATH=`brew --prefix libsodium`/lib/pkgconfig:\${PKG_CONFIG_PATH}" >> ~/.bash_profile && . ~/.bash_profile
readline (version >= 6.0)
- Test readline version :
grep "#define RL_READLINE_VERSION" `brew --prefix readline`/include/readline/readline.h
- If occured error "rl_xxxx", try :
brew link --force readline
protobuf (version >= 3.0.0)
- Test protobuf version :
protoc --version
MacOSX Build
cd mkfio
./INSTALL.sh
mkf -help
Windows 10
There two manners to install mkfio source code on Windows 10.
Cygwin
Required tools and libraries
- Cygwin download (setup-x86_64.exe)
cygwin install
- run setup-x86_64.exe and remain default options to next steps
- choose http://cygwin.mirror.constant.com (if this not works,add http://mirrors.aliyun.com and choose it)as the download site
package choose as follows(click to choose the default version):
- cmake 3.14.5-1
- gcc-g++ 7.4.0-1
- libboost-devel 1.66.0-1
- libprotobuf-devel 3.7.1-1
- libreadline-devel 7.0.3-3
- libsodium-devel 1.0.18-1
- libssl-devel 1.1.1c-1
- make 4.2.1-2
- python2 2.7.16-1
- git 2.21.0-1
Windows Build
git clone https://github.com/mkfio/mkfio.git
cd mkfio
mkdir build
cd build
cmake ..
make mkf
cd src/bigbang
./mkf help
Visual Studio 2019
Visual Studio 2019
Install Download from the official website of VS2019
vcpkg
Install This is a VC++ package manager tool.
Other tools and libraries support installed by vcpkg
or natived
Installation of vcpkg
see vcpkg
Set system environment variables(If the installation path is "D:\vchpkg"):
[Environment]::SetEnvironmentVariable("vcpkg_ROOT", "D:\vcpkg", "User")
Install boost
vcpkg.exe install boost:x64-windows
Install libsodium
vcpkg.exe install libsodium:x64-windows
Install openssl
vcpkg.exe install openssl:x64-windows
Install protobuf
vcpkg.exe install protobuf:x64-windows
Install readline
vcpkg.exe install readline-win32:x64-windows
Install python
If no python.exe
in $PATH, type python.exe
in PowerShell to install python from Microsoft Store.
Clone source code of mkfio
In vs2019, clone mkfio source code https://github.com/mkfio/mkfio.git
Install mkfio
There are two ways to install mkfio.
- Install by command-line
- Install in Visual Studio
Install by command-line
- Open
x64 Native Tools Command Prompt for VS 2019
- Go to the mkfio folder.
- Run
INSTALL.bat
- If no error, run
build\bin\mkf.exe -help
Install in Visual Studio
- Open mkfio folder in Visual Studio
Project
-Generate Cache for mkfio
Build
-Build all
- If no error, run
out\build\x64-Debug\src\bigbang\mkf.exe -help
- If generate with release mode,
Project
-Cmake Setting for mkfio
- Add a x64-Release mode