Download Oracle Linux 7

You need to a Linux machine to create ssh keys or PuttyGen to create the ssh Key pair. Keep in mind the practices on rest API, CLI, Storage Gateway etc. you will need a Linux Instance. A ready Oracle Linux VM (about 9.7 GB) is available at: https://www.theskillpedia.com/oracle-linux-7-vm/

 Download and Import Virtual Machine

  • Visit the URL given above. You will see the page with a link as shown below
  • Click on the Link, you will be redirected to a page with link as given below

  • Click on Download to download the VM Image. Let us call it VM Image.
  • You need to download and install VirtualBox from www.virtualbox.org. This lab assumes you are using VirtualBox 6.1.2.

  • Once you have installed VirtualBox, you can set preferences as to where you want your VMs to store their files. This is to be specified based on the Disk Space you have on your You will need about 15 GB of Space to import the VM Image for this course. To set the preference, click on Preferences (icon) in VirtualBox

  • In the General Tab of the Preferences screen, choose the Directory in which you want to create the VM related files. Click Ok to close the Preferences screen.
  • To import the downloaded VM Image select

    File - > Import Appliance

  • You will get a pop up in which you need to specify the location of the

    VM Image

    .

  • Click on the Folder Option available at the end of the Text Box and select the downloaded VM Image.

 

  • Click Open. In the resulting screen click Next.

  • Click on

    Import

If you don’t see the Guest OS Type as Oracle (64-bit), just check in the BIOS of your computer and ensure VT is Enabled for the CPU. You need to shut down and boot your computer and use the F2/F8 key to get to the BIOS option. The Function Key can vary from computer to computer.

It is also required that no other Hypervisor/Docker based software is enabled on your Computer, you need to disable it so that Virtual Box can use the Virtualization features of your computer.

  • Once the VM Image is imported, the VM is available and listed in VirtualBox.

  • Click on the VM and Click on the Start Button in VirtualBox window.
  • Once the VM boots up, enter the username and password to login.

Username –

oracle

 

Password –

oracle

 

To facilitate ease of use, you can do all the practices with the OCI Web Console within the Linux VM using the Firefox browser, so that you don’t need to transfer the files between your VM and Laptop.

  • You need to ensure your Linux VM has internet Access. To do that, open the Firefox browser (

    Applications -> Firefox

    ) and enter a website such as theskillpedia.com and check you are able to access the website.

You may have to enter proxy setting in Firefox if you are behind a proxy server. If required specify it by clicking the 3 line menu on the Top Right in your Firefox browser, click on Preferences.

    • In the preferences tab, click on Advanced as shown below
    • In the Advanced Tab, click on Network
    • Click on Settings for Connection.
    • In the Settings page, specify the proxy settings as required on your network to access the internet and again verify from the browser if you are able to access the internet.

Create SSH Keys on Linux

An SSH Key pair is a unique combination of Public Key and Private key, used to secure the ssh communication between a client and server. The Public Key is uploaded to the Server and the Private Key is used to connect to the server from a client. Take a look at https://www.youtube.com/watch?v=A9CNbrwhcJs Lecture to know more about SSH Key pair.

  1. Login to the Linux VM as the

    oracle

    Right click on the Linux VM desktop and click on Open Terminal. Check your current directory using

    pwd

    command.

  1. Now create a key as given in following screen shot.

  1. This command will prompt for a few options.
    • In the prompt Enter the File in which to save the key – Accept the default and press Enter
    • In the prompt Enter Passphrase – Accept default press enter
    • In the prompt Enter same Passphrase – Accept default press enter
  1. Navigate to

    .ssh

    folder and list the contents with

    ls

    command
  2. There should be 2 files

    id_rsa

    is the Private Key and

    pub

    is the Public Key
  3. Change the Permissions of the Key Files

# chmod 0700 ~/.ssh # chmod 0600 ~/.ssh/id_rsa # chmod 0644 ~/.ssh/id_rsa.pub

 Create SSH Keys on Windows

  1. Install git for windows. Download Gitbash and install.
  2. Open Git-bash:
  3. Generate ssh-keys by running this command in Gitbash and hit enter for all steps:

# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/sangwan/.ssh/id\_rsa): Created directory '/c/Users/sangwan/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again:

Your identification has been saved in /c/Users/sangwan/.ssh/id\_rsa. Your public key has been saved in /c/Users/sangwan/.ssh/id\_rsa.pub.

Note

: In Gitbash, C:\Users\sangwan\ is shown as /c/Users/sangwan /