我要评分
获取效率
正确性
完整性
易理解

Compiling and Installing Netty

Installing APR

  1. Download the apr-1.5.2 source code.
    1
    wget https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
    
  2. Decompress apr-1.5.2.tar.gz.
    1
    tar -xvzf apr-1.5.2.tar.gz
    
  3. Go to the apr-1.5.2 directory.
    1
    cd apr-1.5.2
    
  4. Install APR to the /usr/local/apr directory.
    1
    2
    ./configure --prefix=/usr/local/apr
    make && make install
    

Compiling and Installing netty-tcnative-1.1.33.Fork19.jar

  1. Download the netty-tcnative-1.1.33.Fork19.zip source code package and decompress it.
    1
    2
    wget https://github.com/netty/netty-tcnative/archive/netty-tcnative-1.1.33.Fork19.zip
    unzip netty-tcnative-1.1.33.Fork19.zip
    
  2. Modify the link for downloading the apr-1.5.2.tar.gz package in the pom.xml file to prevent access timeout.
    1
    2
    cd netty-tcnative-netty-tcnative-1.1.33.Fork19
    vi pom.xml
    

    Modify the following:

    Replace http://www.us.apache.org with https://archive.apache.org.

  3. Download openssl-1.0.2h to netty-tcnative-netty-tcnative-1.1.33.Fork19/openssl-static/target.
    1
    2
    3
    wget https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2h.tar.gz
    mkdir -p netty-tcnative-netty-tcnative-1.1.33.Fork19/openssl-static/target
    mv openssl-1.0.2h.tar.gz netty-tcnative-netty-tcnative-1.1.33.Fork19/openssl-static/target
    
  4. Comment out the compilation part of the boringssl-static module in the pom.xml file.
    1
    vi netty-tcnative-netty-tcnative-1.1.33.Fork19/pom.xml
    

  5. Compile and install netty-tcnative-1.1.33.Fork19.jar to the local Maven repository.
    1
    mvn install -DskipTests
    

    The compiled package netty-tcnative-1.1.33.Fork19.jar is in the openssl-dynamic/target/ directory.