Installation Guide for Windows
1. Installation Guide for Windows
This guide supplies step-by-step instructions for installing the required tools for the course.
Note: If you haven't done so already, create a GitHub account.
2. Git and Git Bash
Note: Leave any settings not mentioned in the following steps with their default choices.
-
Navigate to the Git downloads page and select the download for Windows. The most up-to-date version will automatically download.
-
Click Next to progress through the installation. On the screen that asks you to choose a default editor for Git, select "Use Visual Studio Code as Git's default editor," as shown in the following image:
-
When the installation asks "How should Git treat line endings in text files?" select "Checkout as-is, commit Unix-style line endings," as shown in the following image:
-
Select "Use Windows' default console window," as shown in the following image:
-
After install has completed open a terminal and run the following to verify installation: git --version.
-
Run the following from terminal to set the default branch name to main: git config --global init.defaultBranch main.
3. Java Development Kit (OpenJDK)
-
Navigate to the Adoptium OpenJDK webpage.
-
Select "Temurin 8 (LTS)" from the list.
-
Select "Latest release."
-
Run the installation file.
-
On the first setup page, click Next.
-
On the "Custom Setup" page, click the icon next to "Set JAVA_HOME variable." Select "Will be installed on local hard drive," then click Next.
-
Click Install.
-
Click Finish.
4. IntelliJ IDEA
To install Intellij IDEA, either refer to the following video or follow the steps provided:
-
Navigate to the IntelliJ IDEA downloads page.
-
Download the Community edition.
-
Run the installation file.
-
On the first setup page, click Next.
-
Choose the destination folder, then click Next.
-
Select the "Update PATH variable" option, create the .java association, and then click Next.
-
Click Install to begin the installation.
-
Choose the option that you want for when to reboot.
-
After you reboot, start IntelliJ.
-
Accept the privacy policy, then continue.
-
Choose whether or not to send usage statistics (choose "Don't send" if you prefer not to share this data).
5. MySQL
-
Navigate to the MySQL Community Downloads page.
-
In the "Select Operating System" dropdown menu, choose Microsoft Windows, as shown in the following image:
-
Next to "Windows (x86, 32 & 64-bit), MySQL Installer MSI", select "Go to Download Page". On the next page, find the smaller file size for "Windows (x86, 32-bit), MSI Installer", and click the Download button. Refer to the following image for an example:
-
When prompted about signing up for a free Oracle Web account on the next page, select "No thanks, just start my download," as shown in the following image:
-
Navigate to the folder where the file was downloaded, and double-click it to run the installer. If you get prompted for an update, select Yes. When you reach the page labeled "Choosing a Setup Type", check that "Server only" is selected, and click Next, as shown in the following image:
-
On the next screen, entitled Download, you'll find your product listed (it should say "MySQL Server", followed by a version number). Click Execute to start the installation process, as shown in the following image:
-
After you click Execute, the status will be listed as Downloaded. Click Next, as shown in the following image:
-
The MySQL server is now ready for installation. Click Execute to begin the installation, as shown in the following image:
-
Once the installation status shows as Complete, click Next. Then click Next on the next page, which should indicate "Ready to configure", as shown in the following image:
-
On the Type and Networking page, do not change anything. Just select Next to proceed to the Authentication Method page.
-
On the Authentication Method screen, select "Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)" and click Next, as shown in the following image:
-
On the next screen, Accounts and Roles, you'll need to enter a password under Root Account Password, near the top of the screen. Enter "password" in both boxes, as shown in the following image:
Note: For the purposes of this course, setting your root password to "password" keeps things simple and prevents sensitive passwords from being shared on GitHub when you submit work. It is difficult to change or reset your MySQL root password, so make sure to enter it correctly.
-
On the Windows Service screen, don't change anything, and click Next. On the Apply Configuration screen, click Execute to apply the changes.
-
After the configuration is complete, click Finish.
Note: If you have any issues with the Windows (x86, 32-bit), MSI Installer that is the SMALLER file size, go back and download the LARGER size, following the same steps.
Now you will need to add the MySQL PATH to your environmental variables.
5.1 Add the MySQL PATH to the Environmental Variables
-
First you'll need to copy the MySQL PATH to your clipboard. Open any folder on your computer and select "This PC" in the left-hand navigation bar, then open the
C:
drive. -
Open the
Program files
folder, then navigate to theMySQL
folder.Note: Depending on the version of Windows on your computer, MySQL might be inside the
Program files (x86)
folder. -
Double-click the
MySQL Server 8.0
folder, and finally, double-click thebin
folder. Your window should resemble the following image: -
Right-click the address at the top of the screen and select "Copy address as text", as shown in the following image:
-
Now that you've got the PATH copied to your clipboard, press the Windows key on your keyboard and search for "Edit the system environment variables". Once that appears in the search screen, click on it, as shown in the following image:
-
You'll then be prompted with the System Properties screen. Navigate into the Advanced tab and select "Environment Variables...", as shown in the following image:
-
On the Environment Variables screen, under "User variables for
<user>
" (where<user>
is your username on that computer), click into Path and then click the "Edit..." button in the top section of the screen. It should resemble the following image: -
In the "Edit environment variable" window, select New.
-
Your cursor will appear in a new line at the bottom of the variables. Paste your PATH in this box and click OK. Your screen should resemble the following image:
-
Once you've added the PATH, restart Git Bash completely. You can verify that the installation was correct by typing
mysql -V
into Git Bash. -
The PATH followed by the MySQL version number should be printed to the screen. Once you verify that the MySQL server was correctly installed, you can move on to setting up MySQL Shell.
6. Chocolatey
-
Click Start and type "powershell".
-
Right-click Windows Powershell and choose "Run as an Administrator".
-
Run the command
Get-ExecutionPolicy
. If it returns "Restricted", runSet-ExecutionPolicy AllSigned
. -
Now run the following command:
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 encounter any errors, you are ready to use Chocolatey! Type
choco
orchoco -?
to verify the installation.
7. Docker
-
Note that the Windows Subsystem for Linux 2 (WSL2) must be installed before you can install Docker Desktop. To check whether it's installed, open a new admin PowerShell and run the following command:
wsl --list --verbose
-
If the response resembles the following, WSL is installed on your device:
NAME STATE VERSION Ubuntu-20.04 Stopped 2
-
If you need to install WSL, run the following command in an admin PowerShell:
choco install wsl2
-
To install Docker Desktop, run the following command in an admin PowerShell:
choco install docker-desktop
-
Check whether the installation succeeded by running the following command in PowerShell:
docker --version
-
If the response in the terminal is the currently installed Docker Desktop version, the installation succeeded.
Note: If you have any problems installing Docker Desktop, refer to the Docker documentation on installing Docker Desktop on Windows.
-
Open Docker Desktop to start the Docker Engine.
8. Docker Images
-
Open Git Bash.
-
Pull the Cassandra Docker image using the command
docker pull cassandra:latest
. -
Pull the MySQL Docker image using the command
docker pull mysql:latest
. -
Run the following command:
docker run -e MYSQL_ROOT_PASSWORD=password -p 3306:3306 --name mysql_local mysql:latest
9. DBeaver
-
Open a new admin PowerShell and run the command
choco install dbeaver
. -
If there are no errors you are ready to use DBeaver.
10. Connect MySQL to DBeaver
-
Open the DBeaver desktop app.
-
Select the Database menu in the top menu bar, then click "New Database Connection".
-
Select MySQL and click Next.
-
Enter your "root" as the username and "password" as the password, then click "Test Connection".
-
Select the Driver Properties tab.
-
Find "allowPublicKeyRetrieval" and change the value to "true".
-
Select Test Connection.
-
Select Download.
-
When the test is successful, click Finish.
11. Create Cassandra Driver
Note: Before creating the Cassandra driver for DBeaver, spin up an instance of Cassandra by opening Git Bash and entering the following command:
docker run -p 9042:9042 --name cass_cluster cassandra:latest
-
Download the Simba JDBC driver from DataStax.
Note: Make sure you select the "Simba JDBC Driver for Apache Cassandra" from the dropdown menu.
-
Unzip the file to a folder you will remember.
-
Open DBeaver.
-
Open the Database menu from the top menu bar, then select Driver Manager.
-
Select New.
-
In the window that opens, fill in the boxes as follows:
-
Driver Name:
Cassandra
-
Driver Type:
Generic
-
Class Name:
com.simba.cassandra.jdbc42.Driver
-
URL Template:
jdbc:cassandra://{host}[:{port}];AuthMech=1
-
Default Port:
9042
The form should resemble the following image:
-
-
Click on the Libraries tab at the top of the Create New Driver window.
-
Click Add File.
-
Navigate to the file you unzipped in Step 2, select the "CassandraJDBC42" file, and click Open, as shown in the following image:
-
Click OK.
12. Connect Cassandra to DBeaver
-
Open the DBeaver desktop app.
-
Select the Database menu in the top menu bar, then click "New Database Connection".
-
Select Cassandra and click Next.
-
Enter "cassandra" as both the username and password.
-
Select Test Connection.
-
Follow the prompts to download missing components.
-
When the test is successful, click Finish.
13. Insomnia
-
Navigate to the Insomnia download page.
-
Click the Download button.
-
Once the download finishes, run the file to install Insomnia.
14. You're Done
That's all for the installations! Your computer has everything that you'll need to begin on the first day of class.