Problem scenario
You want to install and configure Apache Camel from source on any distribution of Linux. What do you do?
Solution
You cannot. But there is a way to use Apache Camel as a test.
Background: It is not something that is can be purely installed-and-configured like other applications. Camel is a framework for integrating messaging solutions or microservice architecture. Camel can be used as a library within Spring Boot and other tools (according to https://camel.apache.org/). You can use Camel with Maven (or other tools). The following is how to use Camel with Maven as a proof-of-concept.
Prerequisites if you want to use the script below:
Your server has 4 GB of memory. If this memory is mostly from swap space, the installation will take several hours to complete. With two CPUs and 4 GB of RAM, it will take 40 to 60 minutes to complete. You have Java and Maven installed. If you need assisting installing Java, see this posting. If you need assisting installing Maven, see this posting.
Procedures
Run this script. (It was tested to work with SUSE Linux Enterprise Server 15 SP2, Ubuntu 20.04.1 LTS, and RHEL 8.3.)
# Written by www.continualintegration.com.
# We incorporated a command found here: https://stackoverflow.com/questions/11616835
# Last modified on 11/26/20.
camelversion=3.6.0
echo "Warning: This script will wipe out previous installations of Mavan and Java to create new ones. It will also create a 4 GB swap space file on the hard drive."
sleep 5
echo "Installing the dependencies of Camel at this time..."
curl https://www.continualintegration.com/wp-content/uploads/2020/11/swapspace4G.txt > /tmp/swapspace4G.sh
curl https://www.continualintegration.com/wp-content/uploads/2020/11/javainstallscript.txt > /tmp/javainstallscript.sh
curl https://www.continualintegration.com/wp-content/uploads/2020/11/mavenscript.txt > /tmp/mavenscript.sh
sed -i 's/\r$//' /tmp/swapspace4G.sh
sed -i 's/\r$//' /tmp/javainstallscript.sh
sed -i 's/\r$//' /tmp/mavenscript.sh
bash /tmp/swapspace4G.sh
bash /tmp/javainstallscript.sh
bash /tmp/mavenscript.sh
echo "Installation of the dependencies should be complete now."
echo "********************************************************"
echo "Beginning the installation of Apache Camel. This process on a server with 4 GB of RAM takes 30 to 60 minutes. If it has 1 GB of RAM [and uses swap space], it may take several hours."
curl -Ls https://mirrors.sonic.net/apache/camel/apache-camel/$camelversion/apache-camel-$camelversion-src.zip > /tmp/apache-camel-$camelversion-src.zip
echo "Verify unzip is installed..."
apt -y install unzip
yum -y install unzip
zypper -n install unzip
echo "Two of the above commands should have failed. Do not be alarmed if there were previous failures with 'commmand not found' messages"
cd /opt
cp /tmp/apache-camel-$camelversion-src.zip .
unzip apache-camel-$camelversion-src.zip
echo "Now attempting to set the permissions of the new directory and its subdirectories"
gn=$(groups | awk '{print $1}')
un=$whoami
chown -R $un:$gn apache-camel-$camelversion
cd apache-camel-$camelversion
echo "This process may take hours to complete"
MAVEN_OPTS=-Xmx5120m
export MAVEN_OPTS=-Xmx5120m
mvn clean install -Pfastinstall
#mvn clean install -X
# The above stanza is commented out as a suggestion of something you could potentially run.