Netty-all-4.0.52.Final
Installing APR
- Download the apr-1.5.2 source package.
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-parent-2.0.6.Final
- Download the netty-tcnative-parent-2.0.6.Final source package.
1 2
wget https://codeload.github.com/netty/netty-tcnative/tar.gz/netty-tcnative-parent-2.0.6.Final mv netty-tcnative-parent-2.0.6.Final netty-tcnative-parent-2.0.6.Final.tar.gz
- Decompress the source package.
1tar -zxvf netty-tcnative-parent-2.0.6.Final.tar.gz
- Go to the directory where the Netty source package is decompressed.
1cd netty-tcnative-netty-tcnative-parent-2.0.6.Final
- Modify the pom.xml file to mask the compilation of BoringSSL.
- Open the file.
vi pom.xml
- Press i to enter the insert mode and comment out <module>boringssl-static</module>.

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Change the APR reference directory to the installation directory.
- Open the pom.xml file.
vi /opt/tools/netty-tcnative-netty-tcnative-parent-2.0.6.Final/openssl-dynamic/pom.xml
- Press i to enter the insert mode and change the content in the <configureArg> tag to <configureArg>--with-apr=/usr/local/apr</configureArg>.

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the pom.xml file.
- Compile and package the file to the local Maven repository.
1mvn install - Modify the pom.xml file.
- Open the file.
vi pom.xml
- Press i to enter the insert mode and comment out the two locations for downloading apr-1.6.2 in the file.
Location 1:

Location 2:

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Download the apr-1.6.2.tar.gz package to the following directory:
1 2
wget https://archive.apache.org/dist/apr/apr-1.6.2.tar.gz mv apr-1.6.2.tar.gz netty-tcnative-netty-tcnative-parent-2.0.6.Final/openssl-static/target
- Compile and package the file to the local Maven repository.
1mvn install - Modify the openssl-static/pom.xml file.
- Open the file.
vi openssl-static/pom.xml
- Press i to enter the insert mode and comment out the three locations for downloading openssl-1.0.2l in the file.
Location 1:

Location 2:

Location 3:

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Download the openssl-1.0.2l.tar.gz package to the following directory:
1 2
wget https://ftp.openssl.org/source/old/1.0.2/openssl-1.0.2l.tar.gz mv openssl-1.0.2l.tar.gz netty-tcnative-netty-tcnative-parent-2.0.6.Final/openssl-static/target
- Compile and package the file to the local Maven repository.
1mvn install - Copy the apr-1.6.2 package downloaded in 8 to the netty-tcnative-netty-tcnative-parent-2.0.6.Final/libressl-static/target directory.
1cp apr-1.6.2.tar.gz netty-tcnative-netty-tcnative-parent-2.0.6.Final/libressl-static/target
- Compile and package the file to the local Maven repository.
1mvn install - Modify the libressl-static/pom.xml file.
- Open the file.
vi libressl-static/pom.xml
- Press i to enter the insert mode and comment out the content of downloading libressl-2.5.5 in the file.
Location 1:

Location 2:

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Download the libressl-2.5.5.tar.gz package to the following directory:
1 2
wget http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.5.5.tar.gz mv libressl-2.5.5.tar.gz netty-tcnative-netty-tcnative-parent-2.0.6.Final/libressl-static/target
- Compile and package the file to the local Maven repository.
1mvn install
Compiling and Installing netty-4.0.52
- Download the netty-4.0.52 source code.
1wget https://github.com/netty/netty/archive/netty-4.0.52.Final.tar.gz - Decompress the source package.
1tar -zxvf netty-4.0.52.Final.tar.gz
- Go to the directory where the Netty source package is decompressed.
1cd netty-netty-4.0.52.Final
- Modify the netty-netty-4.0.52.Final/pom.xml file.
- Open the file.
vi netty-netty-4.0.52.Final/pom.xml
- Press i to enter the insert mode and comment out the following code:

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Compile and generate netty-all-4.0.52.Final.jar in the all/target directory, and netty-transport-native-epoll-4.0.52.Final.jar and netty-transport-native-epoll-4.0.52.Final-linux-aarch64_64.jar in the transport-native-epoll/target directory.
1mvn package -DskipTests
Parent topic: Compilation