In this article I will explain a hundreds virtualbox bridge mode. That is, how to install it so that it looks like a machine a local ip. You may need to make the machine available from the outside and then create a virtual server to redirect a particular router port to a specific ip of the virtual server.
Centos is a very widespread distribution because it is stable, fast and very up-to-date. We can say that it is part of the RedHat family. In fact, the Fedora project is the desktop equivalent, and the CentOS project is the desktop equivalent.
If youāre bored reading the whole article or if thereās a few steps you didnāt understand, you can watch the video at the bottom of the page or leave a comment anyway. Iāll answer you as soon as possible.
1. Download the ISO CentOS 7
First, you need to download the iso from the site you can find by searching on google, for convenience I enter the direct link. You can also use this procedure on a physical machine by burning the iso on a CD. In this case, go directly to step 3. If you do not know how to burn the iso of a CD, which does not mean simply copying the file to the cd, I recommend you read a guide on how to burn an iso file on cd.
2. Configuring the virtual machine
After you download the iso, you need to open VirtualBox. If you havenāt installed it yet, we recommend that you read an article about how to install virtualboxes.
You must click on the blue circular icon to start the wizard that will allow you to create your own virtual machine. Enter a name, I chose to enter a name that contains the word CentOS because in this way the system automatically chooses the template for the most similar operating system. If you want to enter a different name you can do it but you will have to choose from the drop-down menus the appropriate template, in this case the type must be Linux and the version must be RedHat (64bit).
I chose the 64-bit system because it is the best choice if we do not want to have problems related to memory management and file size. If you canāt see 64-bit operating systems in the drop-down menu, you havenāt enabled virtualization or your hardware doesnāt support it in your bios. So if you donāt know how to enable this option I recommend you read an article on how to enable virtualization in bios.
Then click on and choose the amount of ram, I recommend you to enter at least 512 MB, I have left the recommended setting that is 1024MB.
By clicking on, you will be asked to create a file system, you can choose from the various types of file system. I chose the (VirtualBox Disk Image) because I donāt need to share this file system with other virtualization platforms.
The next screen asks you if you want to dynamically allocate space or if you want a specified fixed size. The difference between dynamically allocated space and specified space is that with the first option it temporarily saves disk space because, although the virtual disk is set to reach a certain size at most, this space has not yet been allocated. The second option already allocates the space you set and generally increases performance.
After setting up the virtual hardisk, we return to the main virtualbox screen, we will display our virtual machine on the left. Right-click on the virtual machine and choose āsettingsā then select ānetworkā from the menu on the left and set network adapter 1 as active and connected in āTab with Bridgeā mode and make sure that the name of the card is that of the connected to the network of the computer hosting the virtual machine.
Now we have to mount the iso so that the virtual machine sees it as a CD. Select āAchiviationā from the left menu under IDE controller select the CD image and choose the CD icon on the right. I, having already tried this procedure, I already have in the quick selection menu the iso. If this is your first time doing this test, youāll need to select the iso file by entering the path to the image you downloaded in step 1.
Click the āOKā button and launch the virtual machine by pressing the green arrow to the right.
3. Installing the operating system
The virtual machine window will open and you will notice that you are proposed to choose. If you donāt touch anything, the system will check the image. You can still select the direct installation with the darts āupā and ādownā next to the numeric keypad. Donāt get confused with āpage upā and āpage down.ā The darts I say, theyāre 4 and they form a kind of triangle.
If youāve never used virtualboxes, youāll see messages informing you how to activate the mouse inside the virtual machine. In fact, what we are interested to know is that to act with the mouse inside the virtual machine, you have to click inside the window twice with the left mouse button. To exit and use our desktop normally, simply press the right āctrlā key on the keyboard. If you have trouble assimilating these concepts, we recommend that you read an article on how to move around within the virtualbox window.
After the installation has started, youāll see a window asking for your language after some time. Select your language and click the blue button at the bottom right. A window will open where you will have to choose the destination of the installation: our virtual hardisk. I have selected the āI want to make more space availableā option to select the entire file system. I then clicked on the blue confirmation button in the upper left and i chose ādelete allā in the lower right window that opened. To confirm then I clicked on the āRecover Spaceā button.
There are better ways to partition a disk, especially if you want a high-performance and secure system but in this article I wonāt talk about it. If you want to find out about this I recommend you read an article about the various types of configuration for partitioning a linux system.
Itās time to set up our network and then click on āNetwork & HostNameā. We activate our network adapter by simply clicking on the button next to āOFFā which will change color and label for switching to the status of āONā.
Theoretically, in this way, the system should automatically hook up to the DHCP server and configure itself but I much prefer to enter the data by hand. I then clicked on the button at the bottom left āConfigureā, I selected the āIPV4 settingsā tab in the window that opened, I selected it as a āmanualā method and I entered in the address list the local ip address 192.168.1.29 because it is not used by other machines. I chose the mask 255.255.255.0 and the Gateway 192.168.1.1 because it is the ip address of my router. As a DNS server I always prefer to enter the google one because it seems to me the fastest and most reliable, so I entered 8.8.8.8 .
When you click the āsaveā button, youāll notice that your virtual network adapter settings have changed. I have chosen the appropriate settings to the internet, I have an adsl router.
If you donāt know which settings to enter you can skip the manual configuration and leave everything automatically. The system, if a āDHCPā server is available, should automatically detect ip addresses. Itās not wise anyway. For this reason, if you feel the need to learn more and understand what you are doing, I recommend you read an article on the theory of networks (work networks).
To proceed, you need to click the blue button at the top left and you will return to the previous screen. Here, you will need to confirm everything by clicking on the blue button at the bottom right āStart Installationā.
During the unattended installation process, which can take several minutes, you will be asked to set a root password (the user administrator of linux systems). Click over the key icon and enter two identical and possibly complex passwords that you will confirm by clicking on the blue button on the top left.
If you donāt know how to choose a strong password I recommend you read an article on how to choose a strong password.
At this point, after some time, you will find that the procedure is finished when you see the blue ārestartā button in the bottom right that you will click.
The next time you restart, the system will start automatically, you will place in the linux shell ārootā as the username and password you have chosen. End.
If you follow the steps I described, you should not have any problems because I tested the whole step by step. I did this test with virtualbox installed on a windows 10 machine. If you donāt know the difference between these two things, I recommend you read an article that illustrates the differences between a development environment, a test environment and a production environment.
Never perform procedures that you donāt know perfectly in a production environment and never without a backup. In this video, you can see all the steps.