stynan27 / BlockHeads

Primary repository for team BlockHeads inc. projects.
0 stars 0 forks source link

Setup Ubuntu Virtual Machine on Joey's Machine #5

Closed stynan27 closed 1 year ago

stynan27 commented 1 year ago

User story

As a developer working on BlockHeads application, I want an Ubuntu virtual environment, So that I can isolate my development procedures with relevant software & packages.

Acceptance Criteria

stynan27 commented 1 year ago

Resources

NPM install Remote SSH Plugin for VSCode (Recommended) ~Eclipse Download~ ~Eclipse IDE Remote SSH Plugin (Recommended)~ react-bootrap component NPM package Ubuntu Guest Additions install (copy-paste functionality)

stynan27 commented 1 year ago

VSCode Installation on Ubuntu (Optional)

  1. sudo apt update && sudo apt upgrade -y
  2. sudo apt install software-properties-common apt-transport-https wget
  3. wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
  4. sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
  5. sudo apt install code -y
  6. sudo apt update && sudo apt upgrade -y
  7. Validate VSCode install: code --version

Source

stynan27 commented 1 year ago

Install Openjdk-17 Ubuntu (Open source Java install)

Source

stynan27 commented 1 year ago

VirtualBox Downlad

stynan27 commented 1 year ago

@stynan27 & @jtangelo98 to meet at 7 pm Monday June 5th to work on this.

stynan27 commented 1 year ago

Ubuntu ISO

https://ubuntu.com/download/desktop/thank-you?version=22.04.2&architecture=amd64

stynan27 commented 1 year ago

Steps to setup SSH Server, static IP, & Port forwarding for Ubuntu VM (To ssh from Windows host to Ubuntu VM)

  1. Install ssh server in Ubuntu and where to port forward + example ssh
  2. Make sure Adaptor 1 in VM image settings is attached to NAT
  3. Make sure adaptor 2 is attached to the Host-only adaptor
  4. In Ubuntu VM go to the Networking settings (first icon in the top-right corner)
  5. Click Settings
  6. You should see two connections here (enp0s3 & enp0s8)
  7. Toggle enp0s8 on then click its gear icon (if you don't see either then hit the plus icon next to it)
  8. Click the IPV4 tab
  9. Enter 192.168.1.10 for address, 255.255.255.0 for Netmask, & 192.168.1.1 for gateway.
  10. Click Green Add (top-right)
  11. 2x check this is enabled (enp0s8 toggled on)
  12. Add port forwarding rule as described in step 1 for adaptor 1.
  13. Host IP is 127.0.0.1 (localhost).
  14. Host Port can be say 2222
  15. Guest IP is 192.168.1.10 (enp0s8 adaptor for your configured in Ubuntu)
  16. Guest port is 22 (typically reserved for the SSH server)
  17. Save and relstart the VM
  18. Open cmd in Windows and type ssh -p 2222 <Ubuntu username>@127.0.0.1

Note If you run into an issue where the two network adaptors in Ubuntu toggle each other or overwrite each other's settings:

  1. Delete the current networking profile in Ubuntu network settings.
  2. Power cycle the VM.
  3. Go to VM network settings in VirtualBox and disable the second adaptor.
  4. Start the VM and create a new Networking profile with Adaptor 1.
  5. Power cycle the VM.
  6. Enable adaptor 2.
  7. Start the VM again and configure adaptor 2 as above.
  8. They should now be independent.
stynan27 commented 1 year ago

OpenJDK will be downloaded at a later point.

stynan27 commented 1 year ago

Install Eclipse on Linux with SNAP (no direct way via apt-get)

sudo apt-get install snapd -> to install snap package manager sudo snap install eclipse --classic