From 6a3eac3288b7722ea3573862b7fffb90a8dc02c8 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 12 Nov 2019 09:33:42 -0500 Subject: [PATCH] add mysql python library and dependencies for py3 salt centos7 - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/105 --- so-setup-network.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/so-setup-network.sh b/so-setup-network.sh index 54948c538..8b6451e59 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -357,7 +357,7 @@ docker_install() { yum -y update yum -y install docker-ce pip3 install docker - set_environment_var "PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages/" + set_environment_var "PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages/:/usr/local/lib64/python3.6/site-packages/" if [ $INSTALLTYPE != 'EVALMODE' ]; then docker_registry fi @@ -984,6 +984,13 @@ salt_master_directories() { } +salt_install_mysql_deps() { + + yum -y install gcc mariadb-devel python3-devel + pip3 install mysqlclient + +} + sensor_pillar() { SENSORPILLARPATH=$TMP/pillar/sensors @@ -1888,6 +1895,8 @@ if (whiptail_you_sure); then # Install salt and dependencies { sleep 0.5 + echo -e "XXX\n1\nInstalling mysql dependencies for saltstack... \nXXX" + salt_install_mysql_deps >> $SETUPLOG 2>&1 echo -e "XXX\n0\nInstalling and configuring Salt... \nXXX" echo " ** Installing Salt and Dependencies **" >> $SETUPLOG saltify >> $SETUPLOG 2>&1 @@ -2122,6 +2131,8 @@ if (whiptail_you_sure); then sleep 0.5 echo -e "XXX\n0\nCreating Bond Interface... \nXXX" network_setup >> $SETUPLOG 2>&1 + echo -e "XXX\n1\nInstalling mysql dependencies for saltstack... \nXXX" + salt_install_mysql_deps >> $SETUPLOG 2>&1 echo -e "XXX\n1\nInstalling saltstack... \nXXX" saltify >> $SETUPLOG 2>&1 echo -e "XXX\n3\nInstalling docker... \nXXX"