Elastic Lab (part 2) - Install Debian Linux
William Douglass
Cyber Threat Analyst, Adjunct Cybersecurity Professor, Small Business Owner
In part 1 I dropped the link and how to install VMWare and configure the network. I would recommend reading through all the steps BEFORE digging in:
1- Now it's time to download Debian. I used this link and the downloads on the first two lines. You'll download an "iso" image- it's a file that can act like a CD/DVD. It's ALWAYS recommended that you check the "hash" of downloaded software to make sure it's authentic (not tampered with) as explained here.
2- Now go to VMWare and choose "Create a New Virtual Machine" or "File -> New Virtual Machine". Use the 'typical' install method. The iso is the Debian file you downloaded. Name the VM you're going to install. Keep most of the options as "default" unless noted:
3- Change the disk size to at least 60GB if you're going to ingest some real data into Elastic. 20GB is not much.
4- Click "customize hardware" and change memory to at least 8GB (8192MB) (if your host computer has at least 16GB RAM available). Elastic can use a lot of resources!
5- Now Debian install window will ask for prompts. Use the "Graphical Install" unless you feel adventurous. DO NOT click "I finished Installing" in the VMWare yellow box until everything is finished- as noted below. Click through the obvious language and location prompts.
6- If you turned off DHCP, you will be prompted to configure your network manually. Choose an IP address in your VM Network which isn't being used (never .0, .1, .254, .255). Subnet should be 255.255.255.0 unless you picked something else. Gateway and Name Server should be the DNS and Gateway address listed in VMWare network settings.
7- Choose a hostname that's not too long or crazy?!
8- The Domain can be anything, but I used something not used in real life (IRL), "netnetwork.net". Remember that you'll use this on all the VMs that would connect to your Elastic (Debian) VM.
9- Choose a password for the Linux Root account. This should be not easily guessable, but 16 characters or less, and you must remember it!
10- Create a user (in my case, William Douglass and username "will") and a password. Then the time zone.
11- Disk setup is easiest with "Guided- use entire disk". Use the default settings until it asks Write the changes to disks? where you'll choose YES.
12- Mirror country (for updates), archive, HTTP proxy, Package usage survey, and Software selection are all fine with default.
领英推荐
13- It may take some time to download the rest of the OS and unpack it.
14- Install the GRUB Boot Loader to your Primary Drive? = YES. Select /dev/sda.
15- When it finishes and says the installation is complete, NOW click the "I finished Installing" in the yellow box, and click Continue.
16- After the VM reboots, login with your username and finish the setup.
17- On a fresh Linux install, your username will not have the permissions an almighty super powerful user would need to manage the OS. Try typing "sudo nmcli" and putting your password in. It should say you don't have permission. Sudo is a brilliant way of separating mundane tasks from those which should require some more care and administrative control.
18- To add your username to the list of "sudoers", you could look through this link. Note that instructions for different flavors of Linux are different! What worked for me was: type "su" and enter the Root password. This changes your prompt, you are now acting as the Root user, not the username you created.
Type "sudo usermod -aG sudo [username]" (the username you created!) and hit enter. Voila! Your username can now use the sudo command. Type "exit" or "su [username]" to exit the Root context and use your username again.
Try "sudo nmcli" and you should see network information (this is NOT the same as "ipconfig" or "ifconfig", don't worry if the IP address(es) you're looking for aren't there!) We're just verifying that the sudo command works. If successful, continue on! If not, time to Google!
19- At this point I highly recommend making a snapshot. This saves the VM and all the settings at the current condition. If you mess stuff up later, you can revert back to the snapshot. I ALWAYS turn the VM off before taking a snapshot. Right-click on the VM and choose "Snapshot" -> "take snapshot". Give it a name and description.
Snapshots take up space on the hard drive but you can always delete them later in the Snapshot Manager.
NEXT we'll start installing Elastic!