Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for RHEL/CentOS 7 #724

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ It also allows system administrators to:

## Installation

- The MHN server is supported on Ubuntu 18.04, Ubuntu 16.04, and Centos 6.9.
- The MHN server is supported on Ubuntu 18.04, Ubuntu 16.04, Centos 6.9 and Centos 7.
- Other versions of Linux may work but are generally not tested or supported.

Note: if you run into trouble during the install, please checkout the [troubleshooting guide](https://github.com/Pwnlandia/MHN/wiki/MHN-Troubleshooting-Guide) on the wiki. If you only want to experiment with MHN on some virtual machines, please check out the [Getting up and Running with Vagrant](https://github.com/Pwnlandia/mhn/wiki/Getting-up-and-running-using-Vagrant) guide on the wiki.
Expand Down
132 changes: 67 additions & 65 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,72 +67,74 @@ echo "[`date`] ========= Installing MHN Server ========="
echo "[`date`] ========= MHN Server Install Finished ========="
echo ""

while true;
do
echo -n "Would you like to integrate with Splunk? (y/n) "
read SPLUNK
if [ "$SPLUNK" == "y" -o "$SPLUNK" == "Y" ]
then
echo -n "Splunk Forwarder Host: "
read SPLUNK_HOST
echo -n "Splunk Forwarder Port: "
read SPLUNK_PORT
echo "The Splunk Universal Forwarder will send all MHN logs to $SPLUNK_HOST:$SPLUNK_PORT"
./install_splunk_universalforwarder.sh "$SPLUNK_HOST" "$SPLUNK_PORT"
./install_hpfeeds-logger-splunk.sh
break
elif [ "$SPLUNK" == "n" -o "$SPLUNK" == "N" ]
then
echo "Skipping Splunk integration"
echo "The splunk integration can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./install_splunk_universalforwarder.sh <SPLUNK_HOST> <SPLUNK_PORT>"
echo " sudo ./install_hpfeeds-logger-splunk.sh"
break
fi
done


while true;
do
echo -n "ELK Script will only work on Debian Based systems like Ubuntu"
echo -n "Would you like to install ELK? (y/n) "
read ELK
if [ "$ELK" == "y" -o "$ELK" == "Y" ]
then
./install_elk.sh
break
elif [ "$ELK" == "n" -o "$ELK" == "N" ]
then
echo "Skipping ELK installation"
echo "The ELK installation can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./install_elk.sh"
break
fi
done


while true;
do
echo -n "A properly configured firewall is highly encouraged while running MHN."
echo -n "This script can enable and configure UFW for use with MHN."
echo -n "Would you like to add MHN rules to UFW? (y/n) "
read UFW
if [ "$UFW" == "y" -o "$UFW" == "Y" ]
then
./enable_ufw.sh
break
elif [ "$UFW" == "n" -o "$UFW" == "N" ]
then
echo "Skipping UFW configuration"
echo "The UFW configuration can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./enable_ufw.sh"
break
fi
done

# These scripts only work on debian-like systems
if [ -f /etc/debian_version ]; then
while true;
do
echo -n "Would you like to integrate with Splunk? (y/n) "
read SPLUNK
if [ "$SPLUNK" == "y" -o "$SPLUNK" == "Y" ]
then
echo -n "Splunk Forwarder Host: "
read SPLUNK_HOST
echo -n "Splunk Forwarder Port: "
read SPLUNK_PORT
echo "The Splunk Universal Forwarder will send all MHN logs to $SPLUNK_HOST:$SPLUNK_PORT"
./install_splunk_universalforwarder.sh "$SPLUNK_HOST" "$SPLUNK_PORT"
./install_hpfeeds-logger-splunk.sh
break
elif [ "$SPLUNK" == "n" -o "$SPLUNK" == "N" ]
then
echo "Skipping Splunk integration"
echo "The splunk integration can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./install_splunk_universalforwarder.sh <SPLUNK_HOST> <SPLUNK_PORT>"
echo " sudo ./install_hpfeeds-logger-splunk.sh"
break
fi
done

while true;
do
echo -n "ELK Script will only work on Debian Based systems like Ubuntu"
echo -n "Would you like to install ELK? (y/n) "
read ELK
if [ "$ELK" == "y" -o "$ELK" == "Y" ]
then
./install_elk.sh
break
elif [ "$ELK" == "n" -o "$ELK" == "N" ]
then
echo "Skipping ELK installation"
echo "The ELK installation can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./install_elk.sh"
break
fi
done


while true;
do
echo -n "A properly configured firewall is highly encouraged while running MHN."
echo -n "This script can enable and configure UFW for use with MHN."
echo -n "Would you like to add MHN rules to UFW? (y/n) "
read UFW
if [ "$UFW" == "y" -o "$UFW" == "Y" ]
then
./enable_ufw.sh
break
elif [ "$UFW" == "n" -o "$UFW" == "N" ]
then
echo "Skipping UFW configuration"
echo "The UFW configuration can be completed at a later time by running this:"
echo " cd /opt/mhn/scripts/"
echo " sudo ./enable_ufw.sh"
break
fi
done
fi
chown $WWW_OWNER /var/log/mhn/mhn.log

chown $WWW_OWNER /var/log/mhn/mhn.log
Expand Down
Loading