Compiling Dependencies
- Use the Yum source to install the base library.
1yum install openssl-devel zlib-devel automake libtool
- Optional: Compile Snappy.
Snappy is an optional compression library. You can add compilation options to the Hadoop software package.
- Download the Snappy dependency package.
1wget https://github.com/google/snappy/archive/refs/tags/1.1.7.tar.gz
The name of the installation package downloaded using the wget command is 1.1.7.tar.gz, while that downloaded using the browser is snappy-1.1.7.tar.gz.
- After decompression, go to the target directory. For example, if the downloaded installation package is named 1.1.7.tar.gz, run the following commands:
1 2
tar -zxvf 1.1.7.tar.gz cd snappy-1.1.7
- Modify the CMakeLists.txt file to enable the dynamic link library compilation.
- Open the file.
1vi CMakeLists.txt - Press i to enter the insert mode and change the value of this option from OFF to ON.
1option(BUILD_SHARED_LIBS "Build shared libraries(DLLs)." ON)
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Create a compilation directory and perform compilation.
1 2 3 4
mkdir build cd build cmake ../ make install
- Download the Snappy dependency package.
Parent topic: Porting Guide (CentOS & openEuler)