2017-04-13 00:25:31 +00:00
# RedHat/CentOS 6.x pre-installation requirements
2016-12-19 21:08:41 +00:00
2016-12-21 01:41:03 +00:00
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.
2016-12-19 21:08:41 +00:00
## Step 1: Prep for RH/CentOS 6.8/Amazon
2017-04-13 00:25:31 +00:00
```shell
2019-09-28 00:10:20 +00:00
yum -y update
yum -y install epel-release
2016-12-19 21:08:41 +00:00
```
Enable any kernel updates:
2017-04-13 00:25:31 +00:00
```shell
reboot
```
2016-12-19 21:08:41 +00:00
2017-04-13 00:25:31 +00:00
## Step 2: Install Ansible and launch Algo
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
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 3.6 tool set which has to be expressly enabled (and will not survive login sessions and reboots):
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
- Install the Software Collections Library (to enable Python 3.6)
2017-04-13 00:25:31 +00:00
```shell
2019-09-28 00:10:20 +00:00
yum -y install centos-release-SCL
yum -y install \
openssl-devel \
libffi-devel \
automake \
gcc \
gcc-c++ \
kernel-devel \
rh-python36-python \
rh-python36-python-devel \
rh-python36-python-setuptools \
rh-python36-python-pip \
rh-python36-python-virtualenv \
rh-python36-python-crypto \
rh-python36-PyYAML \
libselinux-python \
python-crypto \
wget \
unzip \
nano
2017-04-13 00:25:31 +00:00
```
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
- 3.6 will not be used until explicitly enabled, per login session. Enable 3.6 default for this session (needs re-run between logins & reboots)
```
scl enable rh-python36 bash
2017-04-13 00:25:31 +00:00
```
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
- We're now defaulted to 3.6. Upgrade required components
```
python3 -m pip install -U pip virtualenv pycrypto setuptools
```
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
- Download and uzip Algo
```
wget https://github.com/trailofbits/algo/archive/master.zip
2017-04-13 00:25:31 +00:00
unzip master.zip
2016-12-19 21:22:27 +00:00
cd algo-master || echo "No Algo directory found"
2019-09-28 00:10:20 +00:00
```
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
- Set up a virtualenv and install the local Algo dependencies (must be run from algo-master)
```
python3 -m virtualenv --python="$(command -v python3)" .env
source .env/bin/activate
python3 -m pip install -U pip virtualenv
python3 -m pip install -r requirements.txt
```
2016-12-19 21:08:41 +00:00
2019-09-28 00:10:20 +00:00
- Edit the userlist and any other settings you desire
```
2016-12-19 21:08:41 +00:00
nano config.cfg
2019-09-28 00:10:20 +00:00
```
- Now you can run the Algo installer!
```
2016-12-19 21:08:41 +00:00
./algo
```
2017-04-13 00:25:31 +00:00
## Post-install macOS
1. Copy `./configs/*mobileconfig` to your local Mac
2. Install the VPN profile on your Mac (10.10+ required)
```shell
/usr/bin/profiles -I -F ./x.x.x.x_NAME.mobileconfig
```
3. To remove:
2016-12-19 21:08:41 +00:00
2017-04-13 00:25:31 +00:00
```shell
/usr/bin/profiles -D -F ./x.x.x.x_NAME.mobileconfig
```
2016-12-19 21:08:41 +00:00
The VPN connection will now appear under Networks (which can be pinned to the top menu bar if preferred)