Friday, June 26, 2026

Install Oracle Linux 6 or any version in VM Virtual Box

 1. Download & Install Oracle Linux from the Link:

https://www.oracle.com/in/virtualization/technologies/vm/downloads/virtualbox-downloads.html

Install Oracle Linux

2. Download any ISO file from the link:

https://yum.oracle.com/oracle-linux-isos.html
I have downloaded 6.8 version iso

Install Oracle Linux

3. Let’s create the Linux machine using the same ISO.
Click on New for creating new virtual machine.

Install Oracle Linux

4. Now Put Name and create a folder naming PROD or any other name as per your requirement.
In my case my system D drive has enough of space, so I created a folder naming PROD and download the ISO image in same drive. I have Selected ISO image which I downloaded.

Note: Make sure you select Skip Unattended Installation. Click Next.

Install Oracle Linux

5. I have 16 GB ram in my system so I am giving 4 GB(4096 MB), you can gives as per your system resources.
Click Next

Install Oracle Linux

6. Now give Hard disk size you want to assign to your machine. Select pre-allocate Full Size.
Click Next.

Install Oracle Linux

7. It will show the summary of machine click on finish.

Install Oracle Linux

8. It will take couple of minutes to create the machine. Progress will show as per below snap.

Install Oracle Linux

9. Once created it will show as below snap. Click on Start.

Install Oracle Linux

10. Now Select Install or upgrade an existing system. Press Enter

Install Oracle Linux

11. Select Skip and Press Enter

Install Oracle Linux

12. Select Next

Install Oracle Linux

13. Select English and Press Next

Install Oracle Linux

14. Press Next to go with default option highlighted.

Install Oracle Linux

15. Select Basic Storage Devices and press Next.

Install Oracle Linux

16. Select Yes, Discard any data.

Install Oracle Linux

17. Put hostname I am putting prod.infoinflux.com press Next.

Install Oracle Linux

18. Select Time Zone and Press Next.

Install Oracle Linux

19. Put root Password

Install Oracle Linux

20. Select Create Custom Layout and Press Next.

Install Oracle Linux

21. Press Create and Create Standard Partition

Install Oracle Linux

22. Select mount point /boot and give 512 mb size.

Install Oracle Linux

23. Create another standard partition

Install Oracle Linux

24. Select File System Type: swap.
Swap size taken double the size of RAM provided to the system. In our case RAM give to system was 4GB so swap size given here is 8GB.

Install Oracle Linux

25. Create another partition for root that is / and select fill to maximum allowable size.
This will assign allover left space to /

Install Oracle Linux
Install Oracle Linux

26. Click Next and Format Select Format and Press Enter. Select Write changes to disk.

Install Oracle Linux
Install Oracle Linux

27. Select Next and Press Enter.

Install Oracle Linux

28. Select Desktop option otherwise it will install without GUI. Press Next

Install Oracle Linux

29. Now it is installing the Oracle Linux 6 OS

Install Oracle Linux

30. Once installation is complete it will ask for reboot. Select Reboot and press Enter.

Install Oracle Linux

31. After Reboot this screen will come up and press forward.

Install Oracle Linux

32. Agree the License Information and press Forward.

Install Oracle Linux

33. Select No, I prefer to register at a later time and press forward.

Install Oracle Linux

34. Select No thanks, I’ll connect later.

Install Oracle Linux

35. In this Create user as per your requirement or you can add user afterwards.
I am proceeding without any user creation. Press Forward. Then Click Yes

Install Oracle Linux
Install Oracle Linux

36. Set Date & Time. Press Forward.

Install Oracle Linux

37. Unselect Kdump as it is not required. Click on Finish.
Click on Yes and it will reboot the system.

Install Oracle Linux
Install Oracle Linux

38. After reboot put username as root and put root password to log in the system.

Install Oracle Linux

39. Oracle Linux 6 is installed on VM Virtual Box.

Install Oracle Linux

40. Enjoy...!!

How to create local yum repository in linux from ISO image

Labels:

Create Local Yum Repository In Linux From ISO Image

 A local YUM repository in Linux is a collection of RPM (Red Hat Package Manager) packages stored on a local server or file system. YUM (Yellowdog Updater, Modified) is a package management tool commonly used in Red Hat-based Linux distributions like CentOS, Fedora, and Red Hat Enterprise Linux. It simplifies the process of installing, updating, and managing software packages on a Linux system. In this we'll try to create one.

Steps to follow:

  • Mount the iso image in virtual machine.
  • Install vsftpd rpm from the iso Packages.
  • Copy the packages from iso to /var/ftp/pub/Packages/
  • Install createrepo .rpm  from packages and Create repo in location /var/ftp/pub/
  • Create new repo file in location /etc/yum.repos.d/{any_name.repo} and add entry
  • Check and start the vsftpd and Clean & update the yum.

1. Mount the iso image in virtual machine.

In the virtual machine select iso image file option in devices. It will be mounted and you can see the icon on the desktop screen.

Local Yum Repository

Let’s connect to the virtual machine through Putty or Mobaxterm or you can open terminal inside the virtual machine as per your convenience. I personally prefer Mobaxterm.

2. Install vsftpd rpm from the iso Packages.

Local Yum Repository

Sometimes it is in location /run/media/root/

Install the vsftpd .rpm in iso Packages location. Just type rpm -ivh vsftpd[Press tab] it will take the full name automatically.

Local Yum Repository

When this rpm is installed it will create a blank directory named pub  in /var/ftp/pub

3. Copy the Packages from iso to /var/ftp/pub/Packages/

Local Yum Repository

Type cp -r /media/OL[press tab]/Packages/ /var/ftp/pub/
As the name is complex of iso image file so pressing the tab button will take name automatically.
All the packages have been copied to the location we mentioned i.e. /var/ftp/pub/

Local Yum Repository

4. Install createrepo .rpm  from packages and Create repo in location /var/ftp/pub/

Local Yum Repository

As you can see, when I tried to install createrepo .rpm from Packages directory it throws an error of dependency that means for installing this rpm we need to install another rpm which is mentioned in the error i.e. pyhton-deltarpm and for python it showed dependency of deltarpm.

So, I first installed the deltarpm then python-deltarpm and last createrepo.

Type the name of rpm and press tab it will take the full name automatically no need to type the whole thing.
Now we will create a new repo with command: createrepo -v /var/ftp/pub/

Below is the output:

Local Yum Repository
Local Yum Repository

5. Create new repo file in location /etc/yum.repos.d/{any_name.repo} and add entry

Local Yum Repository

Here, we will create a new repo file with any name and add entry. I am using yum.repo here. In baseurl you need to put your system IP address.

[Server]
name=Server
baseurl=ftp://192.168.1.57/pub
gpgcheck=0
enabled=1
Local Yum Repository

Note: You must rename the other files to .old except yum.repo because we will be using this.

Local Yum Repository

6. Check and start the vsftpd and Clean & update the yum.

/etc/init.d/vsftpd status
/etc/init.d/vsftpd start

#{OR some Linux system support systemctl}#

systemctl start vsftpd
systemctl status vsftpd


systemctl enable vsftpd

or

Chkconfig vsftpd on


Yum clean all
Yum update

VSFTPD started and its service will auto restart whenever we boot the system.

Local Yum Repository

Yum cleaned and updated.

Local Yum Repository

Now, we will try to install some packages that are required in oracle prerequisites installation. The benefit of yum is that it will install the dependent rpm’s automatically. We can use this yum repository to install rpm in other systems. We just need to copy the yum.repo file to different machine /etc/yum.repos.d/ directory.

As, you can see I tried installing gcc package it has successfully installed the packages and it checked & has installed the required dependent packages as well.

Local Yum Repository

Enjoy...!!
Let me know if you have any queries related how to create local yum repository in Linux.

Learn How to install Linux In Virtual Box

Labels: