Skip to content
Snippets Groups Projects
Select Git revision
  • 0f2283b9a2f863971f74f3c40912d3e1d7ca748d
  • develop default
  • master protected
  • feature/frontend-tests
  • 0.110
  • 0.109
  • 0.108
  • 0.107
  • 0.106
  • 0.105
  • 0.104
  • 0.103
  • 0.102
  • 0.101
  • 0.100
  • 0.99
  • 0.98
  • 0.97
  • 0.96
  • 0.95
  • 0.94
  • 0.93
  • 0.92
  • 0.91
24 results

Banner.tsx

Blame
  • install-centos.sh 1.54 KiB
    #!/bin/sh
    #
    # This script installs all dependencies for Firewall-on-Demand running in Python3
    # with Celery, Redis, and sqlite.
    #
    
    echo "Installing epel repo"
    rpm -Uh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
    
    echo "Installing remi repo"
    yum -q -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
    
    echo "Installing base dependencies"
    yum -q -y install python36 python36-setuptools python36-virtualenv vim git gcc libevent-devel libxml2-devel libxslt-devel mariadb-server mysql-devel patch yum-utils
    
    
    echo "Installing redis"
    # Installation of redis from remi RPM repository
    yum-config-manager --enable remi
    yum -q -y install redis
    
    echo "Setup python environment for FoD"
    mkdir -p /var/log/fod /srv
    virtualenv-3 /srv/venv
    (
    	source /srv/venv/bin/activate
    	mkdir -p /srv/flowspy/
    
    	# Select source dir and copy FoD into /srv/flowspy/
    	if [ "`basename "$0"`" = install-centos.sh ]; then
    		# this script is in the source directory
    		cp -r "`dirname $0`"/* /srv/flowspy/
    	elif [ -e /vagrant ]; then
    		# vagrant's copy in /vagrant/
    		cp -r /vagrant/* /srv/flowspy/
    	elif [ -e ./install-centos.sh ]; then
    		# current directory is with the sourcecode
    		cp -r ./* /srv/flowspy/
    	else
    		echo "Could not find FoD src directory tried `dirname $0`, /vagrant/, ./"
    		exit 1
    	fi
    	
    	cd /srv/flowspy/
    	(
    		cd flowspy
    		cp -f settings.py.dist settings.py
    		patch settings.py < settings.py.patch
    	)
    	pip install -r requirements.txt
    
    	touch flowspy/settings_local.py
    
    	./manage.py syncdb --noinput
    	./manage.py migrate
    	./manage.py loaddata initial_data
    )