Step-by-Step Guide: Installing Oracle Linux in Oracle VirtualBox for Seamless Development

Table of Contents

Installing Oracle Linux within Oracle VirtualBox provides a robust and efficient method for developers and system administrators to leverage a powerful, enterprise-grade operating system in a virtualized environment. This approach offers numerous benefits, including enhanced security, system isolation, and the flexibility to run multiple operating systems on a single physical machine. This guide will provide a comprehensive, step-by-step walkthrough of the process, ensuring a smooth and successful installation of Oracle Linux on Oracle VirtualBox. By the end of this guide, you will have a fully functional Oracle Linux virtual machine ready for development, testing, and exploration.

How to Install Oracle Linux on Oracle VirtualBox?

The installation of Oracle Linux on Oracle VirtualBox is a structured process that involves several key stages. To successfully set up and configure your virtual environment, it is essential to follow a logical sequence of steps. These steps are designed to guide you from the initial preparation to the final configuration of your Oracle Linux virtual machine. The main stages can be summarized as follows:

  1. Download Oracle VirtualBox and Oracle Linux ISO Image: This initial step involves acquiring the necessary software components required for the installation process.
  2. Create a New Virtual Machine and Attach the ISO File: In this stage, you will configure a new virtual machine within Oracle VirtualBox and link it to the downloaded Oracle Linux ISO image.
  3. Launch the New VM and Configure Installation Options: Finally, you will start the virtual machine and proceed with the Oracle Linux installation, customizing settings according to your needs.

Let’s delve into each of these steps in detail to ensure a successful installation.

1] Download Oracle VirtualBox and Oracle Linux ISO Image

Download Oracle VirtualBox and Oracle Linux ISO Image

Before commencing the installation of Oracle Linux on Oracle VirtualBox, it is crucial to ensure that your host system meets the necessary prerequisites. This includes having sufficient system resources, particularly in terms of storage and memory. For a smooth operation of the virtual machine, it is recommended to have at least 40 GB of free disk space available for the virtual machine and a minimum of 4 GB of RAM allocated to it. These resources will ensure that your virtual machine runs efficiently and without performance bottlenecks.

If you haven’t already installed Oracle VirtualBox on your system, the first step is to download and install it. Navigate to the official Oracle VirtualBox website at virtualbox.org. On the downloads page, you will find various platform packages. Select the appropriate package for your host operating system (Windows, macOS, Linux, or Solaris) and follow the on-screen instructions to complete the installation process. The installation is generally straightforward, involving accepting license agreements and choosing installation locations.

Once Oracle VirtualBox is installed, the next critical step is to download the Oracle Linux ISO image. This ISO image contains the installation files required to set up the operating system within the virtual machine. Ensure you have a stable and reasonably fast internet connection before proceeding with the download, as the ISO file can be quite large. To download the Oracle Linux ISO, visit the Oracle Linux download page at yum.oracle.com. This page provides access to the latest Oracle Linux ISO images. Locate and download the latest Installer ISO file. Wait for the download process to complete fully. Depending on your internet speed, this might take some time. Once the download is finished, you are ready to move on to the next step, which involves creating and configuring a new virtual machine in Oracle VirtualBox.

2] Create and Configure a New Virtual Machine

Create and Configure a New Virtual Machine

With both Oracle VirtualBox installed and the Oracle Linux ISO image downloaded, the next crucial step is to create a new virtual machine (VM). This VM will serve as the environment where Oracle Linux will be installed and run. Follow these steps to create and configure your virtual machine:

  1. Launch Oracle VirtualBox and Create a New VM: Open the Oracle VirtualBox application on your host system. Once the VirtualBox Manager window is open, locate and click on the “New” button. This action will initiate the creation of a new virtual machine and open a configuration window.

  2. Name and Operating System Selection: In the “Create Virtual Machine” window, you will be prompted to enter a name for your VM. Choose a descriptive name, such as “Oracle Linux VM” or “Oracle Linux Development”. This name will help you identify the VM later. Next, you need to specify the type and version of the operating system you intend to install. In the “Type” dropdown menu, select “Linux”. Then, in the “Version” dropdown menu, choose “Oracle (64-bit)”. These selections ensure that VirtualBox is correctly configured for an Oracle Linux 64-bit installation. You will also see an option to specify the “Folder” where the VM files will be stored. It is advisable to choose a location on a disk with ample free space.

  3. Memory Allocation: The next step is to allocate memory (RAM) to your virtual machine. The amount of RAM you allocate will directly impact the performance of your Oracle Linux VM. A minimum of 4GB is recommended for basic operations, but for development or more demanding tasks, consider allocating 8GB or more if your host system has sufficient RAM. Use the slider to adjust the memory size. Keep in mind not to allocate too much RAM, as this can negatively impact the performance of your host operating system.

  4. Hard Disk Configuration: In the “Hard disk” section of the configuration window, you need to create a virtual hard disk for your VM. Select “Create a virtual hard disk now” and click “Create”. In the subsequent “Create Virtual Hard Disk” window, you will be asked to choose the hard disk file type. The default option, “VDI (VirtualBox Disk Image)”, is generally suitable. Click “Next”.

  5. Storage on Physical Hard Disk: You will then be presented with the option to choose between “Dynamically allocated” and “Fixed size”. “Dynamically allocated” means that the virtual disk file will grow as data is added to it, up to the maximum size you specify. “Fixed size” creates a virtual disk file of the specified size right away. Dynamically allocated is generally recommended for its flexibility and efficient use of disk space. Select your preferred option and click “Next”.

  6. File Location and Size: Finally, you need to specify the “File location and size” for your virtual hard disk. Choose a location where you have sufficient disk space. Set the size of the virtual hard disk. For Oracle Linux, a minimum of 40-60GB is recommended for a basic installation. If you plan to install many applications or store large amounts of data, consider allocating more space. Use the slider or enter the size directly. Once you are satisfied with the settings, click the “Create” button.

With these steps completed, your new virtual machine is created. However, before you can install Oracle Linux, you need to attach the downloaded ISO file to the virtual machine. This will allow the VM to boot from the ISO image and initiate the operating system installation process.

To attach the Oracle Linux ISO file to your newly created VM, follow these steps:

  1. Access VM Settings: In the VirtualBox Manager, locate the VM you just created in the left-hand pane. Right-click on the VM and select “Settings” from the context menu, or select the VM and click the “Settings” button in the toolbar.

  2. Navigate to Storage Settings: In the VM settings window, navigate to the “Storage” tab. Here, you will see the storage configuration for your VM.

  3. Attach the ISO Image: Under the “Storage Tree” section, you should see a “Controller: IDE” or “Controller: SATA” entry, and under it, an “Empty” CD/DVD icon. Click on this “Empty” icon. On the right side of the window, under “Attributes”, you will see “Optical Drive”. Click on the disk icon next to the “Optical Drive” dropdown menu. From the dropdown menu, select “Choose a disk file…”.

  4. Select the ISO File: A file explorer window will open. Browse to the location where you downloaded the Oracle Linux ISO file. Select the ISO file and click “Open”. The path to the ISO file will now be displayed in the “Optical Drive” section.

  5. Save Settings: Click the “OK” button at the bottom of the VM settings window to save the changes.

Now, the Oracle Linux ISO file is attached to your virtual machine, and you are ready to launch the VM and begin the operating system installation process.

3] Launch the New VM and Configure Installation Options

Launch the New VM and Configure Installation Options

With the virtual machine created and the Oracle Linux ISO attached, you are now ready to launch the VM and proceed with the operating system installation. Follow these steps to start the VM and configure the installation options:

  1. Start the Virtual Machine: In the VirtualBox Manager, select the Oracle Linux VM you created from the list on the left. Click the “Start” button in the toolbar to power on the virtual machine. A new window will open, displaying the virtual machine’s console.

  2. Oracle Linux Boot Screen: The virtual machine will boot from the attached ISO image. The Oracle Linux boot screen will appear, presenting you with several options.

  3. Initiate Installation: Using your keyboard arrow keys, select the option “Install Oracle Linux version.x” (where “version.x” will reflect the specific version of Oracle Linux you downloaded). Press the “Enter” key to begin the installation process. This option typically initiates the graphical installation process.

  4. Language Selection: The installer will start by prompting you to select the installation language. Choose your preferred language from the list and click the “Continue” button to proceed.

  5. Installation Summary: The next screen you will see is the “Installation Summary”. This screen provides an overview of various installation settings that need to be configured. You will see options like “Keyboard”, “Installation Destination”, “Software Selection”, “Network & Host Name”, “Time & Date”, and “User Creation”. Click on each of these options to configure them according to your preferences.

  6. Keyboard Layout: Click on “Keyboard” in the Installation Summary. Select your preferred keyboard layout from the available options. You can add multiple layouts if needed. Click “Done” to return to the Installation Summary.

  7. Installation Destination (Disk Partitioning): Click on “Installation Destination”. Here, you need to select the virtual hard disk you created earlier as the installation destination. In most cases, the installer will automatically detect the virtual disk. Select the disk. For a basic installation, you can accept the default partitioning scheme, which is usually “Automatic”. If you require custom partitioning, you can choose the “Custom” option and configure partitions manually. Once you have selected the disk and partitioning scheme, click “Done”.

  8. Software Selection: Click on “Software Selection”. This option allows you to choose the software environment for your Oracle Linux installation. For a graphical desktop environment, select “Server with GUI” on the left side. On the right side, under “Add-ons for Selected Environment”, you can optionally select additional software packages. For development purposes, consider selecting “Development Tools”, “Graphical Administration Tools”, and “System Tools”. These tools provide useful utilities and development environments. After making your selections, click “Done”.

  9. Root Password: Click on “Root Password”. Set a strong password for the root user. The root user is the system administrator account and has full control over the system. It is crucial to choose a secure password. Enter the password in both the “Root Password” and “Confirm” fields. Click “Done”.

  10. Network & Host Name: Click on “Network & Host Name”. Enable the network interface card by toggling the switch next to the Ethernet interface (usually labeled something like “enp0s3” or similar). This will enable networking for your virtual machine. You can also set a hostname for your computer in the “Host Name” field. Enter a desired hostname. Click “Done”.

  11. Time & Date: Click on “Time & Date”. Configure the time zone and date/time settings for your virtual machine. You can select your region and city from the dropdown menus. You can also enable network time synchronization if desired. Click “Done”.

  12. User Creation: Click on “User Creation”. It is highly recommended to create a regular user account for daily tasks instead of using the root user directly. Enter the full name, username, and password for the new user. You can optionally choose to make this user an administrator. Click “Done”.

  13. Begin Installation: Once you have configured all the necessary settings in the Installation Summary, click the “Begin Installation” button. The installation process will start, copying files to the virtual hard disk and configuring the system. This process may take some time, depending on your system resources and the software selections you made. You can monitor the progress of the installation in the installer window.

  14. Installation Completion and Reboot: Once the installation is complete, you will see a “Complete!” message. Click the “Reboot” button to restart the virtual machine. The VM will reboot, and it will now boot from the installed Oracle Linux system on the virtual hard disk, not from the ISO image anymore.

  15. License Agreement and Setup Completion: After the reboot, Oracle Linux will start. You may be presented with a license agreement screen. Accept the license agreement to continue. Follow any on-screen prompts to complete the initial setup process, such as setting up initial user preferences or registering with Oracle (optional).

  16. Login: Finally, you will be presented with the login screen. Enter the username and password for the user account you created during the installation process. Click “Sign In” or press “Enter”.

Congratulations! You have successfully installed Oracle Linux on Oracle VirtualBox. You can now start exploring and using your Oracle Linux virtual machine for development, testing, or any other purpose you intended.

Feel free to share your experiences or ask any questions in the comments below!

Post a Comment