Download the latest version of Log4j from https://logging.apache.org/log4j/2.x/. This will download a file such as apache-log4j-2.11.1-bin.tar.gz or apache-log4j-2.11.1-bin.zip. Place the downloaded file on your Linux server. Create a directory for Log4J.
Extract the downloaded binaries.
unzip apache-log4j-<version>-bin.zip -d /opt/log4j tar -zxvf apache-log4j-<version>-bin.tar.gz --directory /opt/log4j
Once extracted, you will be able to use the Log4j JARs.