Problem scenario
You want a generic script that can install open source Apache Solr on Debian/Ubuntu, CentOS/RedHat/Fedora or SUSE distributions of Linux. How do you do this with the same bash script?
Solution
1. Create a script such as this in /tmp/ (e.g., /tmp/solr.sh).
#!/bin/bash
# Written by www.continualintegration.com
solrversion=7.2.1 # Change this version as necessary
distro=$(cat /etc/*-release | grep NAME)
debflag=$(echo $distro | grep -i “ubuntu”)
if [ -z “$debflag” ]
then
…
Continue reading “How Do You Install Apache Solr on Any Type of Linux?”