M0- Installation Overview
Python Installation
Python is a high-level, adaptable programming language known for its readability and simplicity. It's widely used in web development, data analysis, artificial intelligence, and automation due to its extensive libraries and community support. Python's straightforward syntax makes it an ideal choice for beginners and experienced programmers.
Windows
Download Python:
Visit the official Python website at https://www.python.org/downloads/windows/.
Choose the latest version of Python for Windows.
Download the installer (usually a .exe file).
Run Installer:
Double-click the downloaded .exe file to run the installer.
Check the box that says "Add Python X.X to PATH" during installation (replace X.X with the Python version number).
Installation Complete:
After installation, open a Command Prompt or PowerShell window.
Type python and press Enter to verify that Python is installed.
MacOS
Install Python:
MacOS usually comes with a version of Python pre-installed. To see if Python is already installed, type python3 --version in the Terminal.
If Python is not installed or you want to install a different version, you can download the official Python installer from the Python website: https://www.python.org/downloads/mac-osx/.
Follow the on-screen instructions to complete the installation.
Ensure you add Python to your system PATH during installation.
Verification:
To verify the installation, open a new Terminal window and type python3. You should see the Python interpreter prompt.
Ubuntu
User terminal to Install python:
Open a Terminal window by pressing Ctrl + Alt + T or searching for "Terminal" in the applications.
Run sudo apt update to update the package lists.
Install Python by running sudo apt install python3 for Python 3. Ubuntu usually comes with Python 2 installed, but Python 3 is recommended.
To verify the installation, type python3 --version in the Terminal.
Bandit Installation
Bandit is a tool for analyzing Python code for security issues. The installation process for Windows, MacOS, and Ubuntu are the same. To install it, open your terminal or command prompt and run the following command:
pip install bandit
To verify that Bandit is installed, run the following command in the terminal or command prompt. It will show the installed version number_
bandit --version
Git Installation
Git is a distributed version control system that tracks source code changes during software development. It facilitates collaboration among multiple developers by enabling them to simultaneously work on the same project. Git records and manages various versions of code, simplifying the tracking of changes, merging contributions, and reverting to prior states when necessary. It is essential in contemporary software development to ensure code reliability, maintain a history of changes, and facilitate efficient teamwork.
Windows
Download Git for Windows
Open your web browser and go to the official Git for Windows download page: Git for Windows.
Click the "Download" button to download the latest version of Git for Windows.
Run the Installer
Once the download is complete, run the installer executable file (e.g., Git-2.34.1-64-bit.exe) that you downloaded.
The installer will guide you through the installation process. You can choose the default options for most settings, but pay attention to the following:
Select the default text editor (e.g., Notepad) unless you prefer another editor.
Choose the default line ending conversions. "Checkout as-is, commit Unix-style line endings" is a good choice for cross-platform compatibility.
Click "Install" to start the installation process.
Configure Git
During the installation, you'll be prompted to configure Git settings. You'll need to provide your name and email address, which will be associated with your Git commits.
Open a command prompt or Git Bash and run the following commands to set your name and email: git config --global user.name "Your Name" Â and git config --global user.email "youremail@example.com"
Verify Installation
To verify that Git has been installed successfully, open a command prompt or Git Bash and run: git --version
MacOS
Install Xcode Command Line Tools (if not already installed)
Open the Terminal application on your Mac and run the following command: xcode-select --install and Follow the on-screen instructions to install the command line tools.
Install Homebrew (Optional but recommended): Homebrew is a package manager for macOS, making it easier to manage software installations. You can skip this step if you prefer not to use Homebrew.
Open Terminal and run the following command to install Homebrew:Â
/bin/bash -c "$(curl -fsSLÂ https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Follow the instructions in the Terminal to complete the Homebrew installation.
Install Git
If you didn't install Homebrew, you can install Git directly using macOS's built-in package manager. Open Terminal and run:Â
sudo xcode-select --switch /Library/Developer/CommandLineTools
If you installed Homebrew in the previous step, open Terminal and run:
brew install git
To check git installed run sudo git --version
Configure Git
Open terminal and set your name and email address
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
Ubuntu
Open a terminal window and run the following command to update the package lists:
sudo apt update
To install Git, run the following command:
sudo apt install git
Set your name and email address by running the following commands:
git config --global user.name "Your Name"
git config --global user.email "youremail@example.com"
To verify that Git has been installed successfully, open a terminal and run: git --version
Docker Installation
Docker is a platform that helps developers to package applications and their dependencies into containers. These containers are lightweight and portable, which can run consistently across various environments, from development to production, ensuring that applications work reliably and consistently. Docker simplifies the deployment and scaling of applications, making it a popular choice for DevOps and cloud-native development.
Windows
Visit the Docker website: Docker Desktop for Windows.
Click the "Download for Windows" button to download the Docker Desktop installer.
Run the installer you downloaded (e.g., Docker Desktop Installer.exe).
Follow the installation wizard's prompts to install Docker Desktop. During the installation, it may require enabling Hyper-V and Windows Subsystem for Linux (WSL) features. Allow the installer to make the necessary changes to your system.
Once the installation is complete, Docker Desktop will start automatically.
To verify that Docker has been installed successfully, open a command prompt or PowerShell and run: docker --version
MacOS
Visit the Docker website: Docker Desktop for Mac.
Click the "Download for Mac" button to download the Docker Desktop installer.
Run the installer you downloaded (e.g., Docker.dmg).
Drag the Docker icon to the Applications folder to install it.
Launch Docker Desktop from the Applications folder.
Docker Desktop may prompt you to allow it to make changes to your system. Click "Open" to proceed.
Docker Desktop will start and appear in your system tray.
To verify that Docker has been installed successfully, open a terminal and run: docker --version
Ubuntu
Open a terminal and run the following command to update the package lists:
sudo apt update
To install Docker, run the following command and Confirm the installation by typing "Y" when prompted.
sudo apt install docker.io
Start the Docker service with the following command:
sudo systemctl start docker
To ensure Docker starts automatically at boot, enable the Docker service:
sudo systemctl enable docker
By default, Docker requires root privileges. To allow your user to run Docker commands without using sudo, add your user to the docker group:
sudo usermod -aG docker $USER
For the group changes to take effect, log out of your Ubuntu session and then log back in.
To verify that Docker has been installed successfully, open a terminal and run: docker --version
Vault Installation
Vault typically refers to HashiCorp Vault, a tool designed to manage secrets and sensitive data in modern IT environments securely. It provides a centralized platform for storing, accessing, and controlling access to secrets such as API keys, passwords, certificates, and encryption keys. Vault offers features like dynamic secret generation, access control policies, and auditing to enhance security and manage secrets effectively. It is widely used in DevOps and cloud-native applications to protect sensitive information and ensure secure access across various systems and services.
To install, you can follow the instructions from here_ https://developer.hashicorp.com/vault/tutorials/getting-started/getting-started-install. Or follow the instructions below_
Windows
You can install HashiCorp Vault on Windows using Chocolatey, a popular Windows package manager. Chocolatey is a Windows package manager that automates installing, configuring, updating, and removing software on a Windows operating system. It is similar to package managers like apt on Ubuntu or Homebrew on macOS.
Open a PowerShell window with administrator privileges.
Install Chocolatey by running the following command. Copy the command and paste it into the PowerShell.
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
Wait a few seconds for the command to complete. If you don't see any errors, you are ready to use Chocolatey! Type choco or choco -?.
Once Chocolatey is installed, you can install Vault by running the following command: choco install vault.
After installation, you can verify it by running: vault --version
MacOS
You can install HashiCorp Vault on macOS using Homebrew, a popular package manager for macOS.
Open a Terminal window.
Install Homebrew by following the instructions on the Git Installation section for macOS.
Once Homebrew is installed, you can install Vault by running the following command: brew install vault.
After completion of the installation, you can verify by typing this command: vault --version.
Ubuntu
You can install HashiCorp Vault on Ubuntu using the APT package manager, which is the default package manager for Ubuntu.
Open a Terminal window.
Update the package list to ensure you have the latest information: sudo apt update.
Install Vault by running the following command: sudo apt install vault.
After installation, you can verify it by running:Â vault --version.