Compiling and Installing Netty
Installing APR
- Download the apr-1.5.2 source code.
1wget https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz - Decompress apr-1.5.2.tar.gz.
1tar -xvzf apr-1.5.2.tar.gz
- Go to the apr-1.5.2 directory.
1cd apr-1.5.2
- 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
- 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
- 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.


- 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
- Comment out the compilation part of the boringssl-static module in the pom.xml file.
1vi netty-tcnative-netty-tcnative-1.1.33.Fork19/pom.xml
- Compile and install netty-tcnative-1.1.33.Fork19.jar to the local Maven repository.
1mvn install -DskipTests

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

Parent topic: netty-tcnative-1.1.33.Fork19.jar Porting Guide