Environment - sofwerx/mad-jack GitHub Wiki
Many tools used in this project are cross-platform, and users have many choices of software and hardware configurations that will have the same capabilities as the system used in the safe house. The following pages will walk through the setup and configuration of our operating environment. The operating systems used in this instance were PopOS! 17.10 and Ubuntu 16.04.
Ubuntu Installation
The Ubuntu version used in this project is 16.04. Canonical has since released a new LTS version, 18.04 (Bionic Beaver). As of this writing, it's believed that there are no compatibility issues between the two releases for the purposes of this project.
Download Ubuntu 16.04/Pop!OS and Create Bootable Installation Media
- Download the Ubuntu or Pop! OS disk image. Choose the appropriate (64-bit or 32-bit) option for your computer.
- Create a bootable USB drive.
From Windows
- Connect a USB drive to your computer. Its contents will be erased during this process. It must be at least 2GB in storage capacity.
- Download and run Rufus.
- From the Device dropdown list, select your inserted USB drive.
- Enter a volume label of your choice.
- Ensure the file system is set to FAT32, partition scheme is MBR, and the Quick Format option is selected.
- Check the Create a bootable disk using ISO image box.
- Click on the disk icon to the right of the previous option. A pop-up field will prompt you to navigate to the download location for your Ubuntu disk image. Select the image and click Ok.
- Click Start and follow the onscreen prompts. The result will be a formatted USB drive ready to boot the Ubuntu installation medium.
From MacOS
- Connect a USB drive to your computer. Its contents will be erased during this process. It must be at least 2GB in storage capacity.
- Launch Disk Utility from Applications>Utilites or use Spotlight search.
- Select the USB drive from the list of external storage devices on the left.
- Click the Erase button near the top of the window.
- In the resulting pop-up menu, choose a volume name, and ensure the format is set to MS-DOS (FAT) and the scheme is set to GUID Partition Map. Then click Erase on the bottom right of the window.
- Download, install, and run Etcher.
- Click Select image and navigate to the Linux image download location. Click Select drive and choose your USB storage device. Click Flash! and follow the on-screen prompts to create your bootable Linux installation drive.
Install Ubuntu 16.04 or Pop! OS
This process will erase the storage contents of the host computer. You must have at least 25GB of storage space.
With your formatted Ubuntu installation drive still inserted:
-
Restart your computer.
-
On a Mac, hold down the Option/alt (⌥) key while the computer starts. You'll be presented with a selection of storage media to choose from. Select the your USB drive, usually labeled EFI Boot and with a gold/white icon.
On a PC, hold down F12 while your computer starts. You'll be presented with a list of storage media to choose from, so select your USB drive. Note: The manufacturer of your computer determines the appropriate key to hold down to reach the boot selection menu. If F12 does not work, please consult your computer's manual to find the right key.
-
Follow the on-screen prompts to select the appropriate installation options for your computer. The installation wizard will guide you through the process, typically 10 minutes.
Update
Once you have either Ubuntu or Pop!OS installed, it's a good idea to install updates.
- Click Activities in the upper left corner.
- In the pop-in dashboard, type Terminal in the search bar and click on the icon to open a Terminal window. You can also drag the icon to keep in your Favorites on the left.
- Enter the following commands:
sudo apt-get install update
sudo apt-get install upgrade
Docker
Docker is virtualization software used to rapidly deploy applications. For the purposes of replicating our safe house configuration, you will need to install Docker. The process is the same whether you install Ubuntu or PopOS!. We'll be using Docker Community Edition for this project. There are a few installation methods, but the most recommended is installation from Docker's repository.
Setting up Docker's Repository
- Click Activities in the top left corner, and open a Terminal window.
- Update your package index by entering:
sudo apt-get update
- Enable repository usage over HTTPS by entering the following command (enter 'y' when prompted):
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
- Include Docker's GPG key so that APT can authenticate Docker packages:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- Now add the external stable Docker repository to the APT package manager:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Installation
Now that APT is configured to use Docker's repo, installation is simple.
- Update the package index with:
sudo apt-get update
- Install Docker Community Edition with:
sudo apt-get install docker-ce
Note: If you encounter an error E: Package 'docker-ce' has no installation candidate please refer to step 5 in the previous section, and replace $(lsb_release -cs) with the version name depending on your OS version number:
Ubuntu/Pop!OS Version | Name |
---|---|
16.04 | xenial |
17.10 | artful |
18.04 | bionic |
Example for 18.04:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
bionic \
stable"
Then run sudo apt-get install docker-ce
again.
- You can verify correct installation by entering:
sudo docker run hello-world
Sample output:
- Install docker-compose with the following command
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
And make it executable with:
sudo chmod +x /usr/local/bin/docker-compose
Git
If you haven't already, install Git with:
sudo apt-get install git-all