In this article I will explain to you centos virtualbox bridge mode. That is how to install it so that it looks like a machine a local ip. You may have the need to make available the machine from the outside, and then create a virtual server to redirect a certain port of the router to a specific ip of the virtual server.
Centos is a distribution very widespread because it is stable, fast, and very up to date. We can say that is part of the family of RedHat. In fact, the Fedora project represents the equivalent for the desktop and the project CentOS is the equivalent for the desktop.
If it bores you to read the whole article or if there is any step that you don't understand, you can watch the video at the bottom of the page or leave a comment. I'll answer as soon as possible.
First, you have to download the iso from the site that you can find by searching on google, for convenience I enter the direct link. You can adopt this procedure on a physical machine by burning the iso to a cd. In this case, passes directly to step 3. If you don't know how to burn the iso to a cd, that does not mean to simply copy the files on the cd, I recommend you read a guide on how to burn an iso file to a cd.
After you have downloaded the iso, you need to open VirtualBox. If you have not already installed we advise you to read an article on how to install virtualbox.
You have to click on the circular icon blue to start the wizard that will allow you to create your virtual machine. Enter a name, I have chosen to insert a name that contains the word CentOS because in this way, the system automatically chooses the template for the operating system that's more like it. If you want to enter a different name, you can do it but you will have to choose it from the menu, the template is appropriate, in this case, the type must be Linux and the version must be RedHat (64bit).
I chose the system to 64bit because it is the best choice if you do not want to have problems related to memory management and the size of the file. If you can not see in the drop-down menu, the 64-bit operating systems means that in your bios you've enabled the virtualization and / or your hardware does not support it. Then, if you do not know how to enable this option, I recommend you read an article about how to enable virtualization in the bios.
Then click next and choose the amount of ram, I advise you to enter at least 512 MB, I left the recommended setting which is 1024MB.
By clicking next, you will be asked to create a file system, you can choose among the various types of file system. I chose the (VirtualBox Disk Image) because I don't have the need to share this file system with other virtualization platforms.
The next screen asks you if you want to dynamically allocate the space, or if you want a fixed size specified. The difference between space allocated dynamically and specified space, lies in the fact that with the first option, the savings in space temporarily in the disk because, although the hadisk virtual is set to reach a maximum of a certain size, this space was still allocated. The second option, instead, allocates already have the space set and generally increases the performance.
After you set the hard disk virtual, let's go back to the main screen of virtualbox, we'll display our virtual machine on the left. Click with the right button of the mouse on the virtual machine and choose "settings", then select "network" from the menu on the left and set the network adapter 1 as active, and connected in a mode "Card " bridged" and make sure that the name of the card is the network adapter that is connected to the network of the computer that hosts the virtual machine.
Now we need to mount the iso so that the virtual machine sees it as if it were a cd. Select "sound storage" from the left menu under IDE controller, select the cd image, and choose on the right the icon of the cd. I have already tried this procedure, I have already in the menu selection of the speed of the iso. If this is the first time you do this test you will need to select the iso file by entering the path to the image that you downloaded in step 1.
Click on the "OK" button and start the virtual machine by pressing the green arrow to the right.
Opens the virtual machine window and you will notice that you are proposed to choose from. If you do not touch anything, the system will verify the image. You can, however, select the direct installation with the arrow keys "up" and "down" next to the numeric keypad. Do not be confused with "page up" and "page down". The darts that I say, I have 4 and form a kind of triangle.
If you've never used virtualbox, you will see messages that let you know about how to activate the mouse inside the virtual machine. In fact, what we want to know is that in order to act with the mouse inside the virtual machine, you have to click inside the window twice with the left button of the mouse. To get out and use the desktop normally, it is sufficient to press the "ctrl" key right of the keyboard. If you have difficulties to assimilate these concepts, we recommend that you read an article on how to move inside of the window virtualbox.
After that the installation started, you will see after some time a window that asks you for the language. Select the language and click on the blue button in the bottom right. A window will open in which you will have to choose the installation destination: our hard drives virtual. I have selected the option "I would like to make available more space" to select the entire file system. I then clicked on the confirm button in blue in the top left, and I chose "delete all" in the bottom right window that is open. To confirm I then clicked on the button "Recover Space".
There are better ways to partition a disk, especially if you want a system that is efficient and safe, but in this article I'll talk about it. If you want to inform you about I suggest you read an article on the various types of configuration for the partitioning of a linux system.
And now it is time to configure our network, and then click on "network & hostname". We activate our network card, by simply clicking on the button next to "OFF" which will change color and label for the transition to the status of "ON".
Theoretically, in this way, the system should automatically hook on to the DHCP server and configure itself, but I much prefer to enter the data by hand. I clicked then on the button in the bottom left "Configure", I selected the tab "IPV4 Settings" in the window that opened, I selected as the method to "manual" 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 DNS server I prefer to always place the one of google because it seems to me the faster and more reliable, so I entered 184.108.40.206 .
When you click on the "save" button, you will notice that settings of your virtual network adapter are changed. I have chosen the appropriate settings to the network internet, I have a router adsl.
If you don't know what settings to enter, you can skip the manual configuration and leave everything in automatic. The system, if there is a server that is "DHCP", it should automatically detect ip addresses. Is not wise anyway. For this reason, if you feel the need to learn more and understand what you're doing, I advise you to read an article on the theory of networks (business networks).
To proceed, you must click on the blue button in the top left, and return you to the previous screen. Here, you'll need to confirm all by clicking on the blue button in the bottom right of the "Start Installation".
During the automatic procedure of installation, which can last for several minutes, you will be asked to set a root password (the administrator user of linux systems). Click on the key icon and enter the two passwords the same and coincident, possibly complex, that you confirm by clicking on the blue button in the top left.
If you do not 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 button "restart" in the bottom right that you click.
At the next reboot, the system will automatically start, enter in the shell of the linux "root" as the user name and the password that you selected. The end.
If you follow the steps that I described to you, you should not have problems because I have tested everything step by step. I did this test with virtualbox installed on a windows machine 10. If you don't know the difference between these two things, I advise you to read an article that explains the differences between a development environment, a test environment and a production environment.
Never do procedures that you do not know to perfection in a production environment, and never without a backup. In this video you can see all the steps.