Skip to content

Instantly share code, notes, and snippets.

@liweitianux
Last active July 16, 2020 09:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liweitianux/0de83372d18ac17a1e3a1788a7b3e7e7 to your computer and use it in GitHub Desktop.
Save liweitianux/0de83372d18ac17a1e3a1788a7b3e7e7 to your computer and use it in GitHub Desktop.
F-Stack Installation (custom prefix)

F-Stack Installation

  • Author: Weitian LI
  • Date: 2020-07-16

Environment

  • OS: CentOS 7.4.1708
  • Kernel: 3.10.0-957.27.2.el7.x86_64
  • F-Stack: master branch (v1.21 as of 2020-07-16)

Installation

  1. Install requirements

    yum makecache fast
    yum -y install gcc meson
    yum -y install kernel-devel-$(uname -r)
    yum -y install numactl-devel
    
  2. Get F-Stack

    git clone https://github.com/F-Stack/f-stack
    cd f-stack
    
  3. Build and install DPDK

    cd dpdk
    make defconfig
    cd build
    make -j4
    make install prefix=/opt/f-stack/dpdk
    cp -R kmod /opt/f-stack/dpdk/
    cp ../usertools/*.py ../usertools/*.sh /opt/f-stack/dpdk/bin/
    
  4. Install F-Stack

    sed -i -e 's#/usr/local#/opt/f-stack#g' -e 's#/etc/#/opt/f-stack/etc/#g' \
        lib/Makefile tools/Makefile
    sed -i -e 's|^\(DPDK_CFLAGS.*DRTE_COMPILE_TIME_CPUFLAGS.*\)|#\1|' \
        lib/Makefile tools/compat/Makefile tools/libnetgraph/Makefile
    mkdir /opt/f-stack/{bin,etc,include,lib}
    (cd /opt/f-stack/dpdk/include; ln -s dpdk/* .)
    
    export FF_DPDK=/opt/f-stack/dpdk
    (cd lib && make -j4 && make install)
    (cd tools && make -j4 && make install)
    
  5. Install F-Stack Nginx

    export FF_PATH=/opt/f-stack
    cd app/nginx-1.16.1
    sed -i.bak 's|\(CFLAGS.*FF_PATH\)/lib|\1/include|' auto/make
    ./configure --prefix=/opt/f-stack/nginx --with-ff_module
    make -j4 && make install
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment