Tidy this up

This commit is contained in:
Dan Guido 2016-12-20 20:41:03 -05:00
parent 75194675eb
commit 3d28bce00f

View file

@ -1,6 +1,6 @@
# Algo pre-install steps for Red Hat/CentOS 6.x (currently 6.8) # Algo pre-install steps for Red Hat/CentOS 6.x (currently 6.8)
There is still heavy use of RH/CentOS 6 (which are essentially the basis of Amazon Linux as well) due to stability and lack of systemd. But unfortunately, as a result there are a number of dated libraries, including python 2.6 and limitations. This script will allow end-to-end installation of Algo on a local (or cloud-based) RH/Cent 6 VM to deploy to cloud instances including Digital Ocean and AWS, with zero warnings or errors. Many people prefer RedHat or CentOS 6 (or similar variants like Amazon Linux) for to their stability and lack of systemd. Unfortunately, there are a number of dated libraries, notably Python 2.6, that prevent Algo from running without errors. This script will prepare a RedHat, CentOS, or similar VM to deploy to Algo cloud instances.
## Step 1: Prep for RH/CentOS 6.8/Amazon ## Step 1: Prep for RH/CentOS 6.8/Amazon
@ -15,19 +15,21 @@ Enable any kernel updates:
## Step 2: Install Ansible & launch Algo ## Step 2: Install Ansible & launch Algo
Fix GPG key warnings during Ansible rpm install Fix GPG key warnings during Ansible rpm install:
``rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6`` ``rpm --import https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6``
Fix GPG key warning during offical Software Collections (SCL) package install Fix GPG key warning during offical Software Collections (SCL) package install:
``rpm --import https://raw.githubusercontent.com/sclorg/centos-release-scl/master/centos-release-scl/RPM-GPG-KEY-CentOS-SIG-SCLo`` ``rpm --import https://raw.githubusercontent.com/sclorg/centos-release-scl/master/centos-release-scl/RPM-GPG-KEY-CentOS-SIG-SCLo``
RH/Cent 6.x uses Python 2.6 by default, which is explicitly deprecated and produces many warnings and errors, so we will install a safe, non-invasive 2.7 tool set which has to be expressly enabled (and will not survive login sessions and reboots) RedHat/CentOS 6.x uses Python 2.6 by default, which is explicitly deprecated and produces many warnings and errors, so we must install a safe, non-invasive 2.7 tool set which has to be expressly enabled (and will not survive login sessions and reboots):
``` ```
yum -y -q install centos-release-SCL # install Software Collections Library (to enable Python 2.7) # Install the Software Collections Library (to enable Python 2.7)
# Won't take effect until explicitly enabled, per login session yum -y -q install centos-release-SCL
# 2.7 will not be used until explicitly enabled, per login session
yum -y -q install python27-python-devel python27-python-setuptools python27-python-pip yum -y -q install python27-python-devel python27-python-setuptools python27-python-pip
yum -y -q install openssl-devel libffi-devel automake gcc gcc-c++ kernel-devel wget unzip ansible nano yum -y -q install openssl-devel libffi-devel automake gcc gcc-c++ kernel-devel wget unzip ansible nano
@ -36,22 +38,26 @@ yum -y -q install openssl-devel libffi-devel automake gcc gcc-c++ kernel-devel w
source /opt/rh/python27/enable source /opt/rh/python27/enable
# We're now defaulted to 2.7 # We're now defaulted to 2.7
pip -q install --upgrade pip # upgrade pip itself # Upgrade pip itself
pip -q install pycrypto # python-devel needed to prevent setup.py crash, pycrypto 2.7.1 needed for latest security patch pip -q install --upgrade pip
# # python-devel needed to prevent setup.py crash, pycrypto 2.7.1 needed for latest security patch
pip -q install pycrypto
pip -q install setuptools --upgrade pip -q install setuptools --upgrade
wget -q https://github.com/trailofbits/algo/archive/master.zip wget -q https://github.com/trailofbits/algo/archive/master.zip
unzip master.zip unzip master.zip
cd algo-master || echo "No Algo directory found" cd algo-master || echo "No Algo directory found"
# Must be run from algo-master dir: # Install the local Algo dependencies (must be run from algo-master)
pip -q install -r requirements.txt # install Algo local (pusher) dependencies pip -q install -r requirements.txt
# Edit the userlist and any other settings you desire
nano config.cfg nano config.cfg
# Now you can run the Algo installer!
./algo ./algo
``` ```
## Post-install OSX: ## Post-install OSX
* Copy ./configs/*mobileconfig to your local Mac * Copy ./configs/*mobileconfig to your local Mac
* Install the VPN profile on your Mac (10.10+ required) * Install the VPN profile on your Mac (10.10+ required)