1. virtualbox
The operating systems on our computer are generally windows. If we want to learn about Linux, we can install a virtual machine on our computer and then install linux on it. Virtual machines can use virtualbox or VMware. We use virtualbox here.
: Https://www.virtualbox.org/wiki/Downloads
I chose virtualbox running in windows. After the download, double-click the installation and follow the Installation Wizard step by step. The installation process is relatively simple and will not be repeated here.
After installation, start up like this:
II,
Centos 7
The Linux version I selected here is centos 7.
: Http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-Everything-1804.iso
You do not need to decompress the package after the download.
III,
Build a Linux environment
(1) create a VM
1. Click Create in vbox
2. Fill in the relevant information in the pop-up box. The name is the name of the Virtual Machine and the type is Linux. The 64-bit centos 7 we downloaded is the branch of Red Hat, therefore, select Red Hat (64-bit) as the version ). Click Next.
3. allocate memory. I will allocate 2048 MB here. Click Next.
4. Create a virtual hard disk,
I don't want to occupy disk C space. I put the virtual machine files to the Elastic Block Storage (e.
After that, you can see the created virtual machine in the left column.
The file of the corresponding virtual machine is generated on the hard drive path just selected.
(2)
Install centos
1. Select the created virtual machine and click Start.
Select the downloaded package Without decompression
Click Start. On the displayed page, select test this Media & Install centos 7, and press Enter.
After the Select language interface is displayed, click the interface and select capture in the pop-up box. In this way, the mouse will stay on the VM and will not run out. If you want to release the mouse, press Ctrl on the right of the keyboard.
Click the installation location. The following page is displayed. Click Finish.
Click network and host name. The following page is displayed. Open the network and click Finish.
After setting the preceding two parameters, click Start installation.
Set the root password (if the password is too simple, click the "finish" button twice ):
Create a common user:
Wait until the installation is complete. Then click restart.
Enter the user name and password to log on to the system.
Run the following command to view the IP Address: ip addr.
We can see that the IP address is 10.0.2.15, and the network setting should be in the NAT mode. We will change it to the bridging mode. The bridging mode can be simply understood as that our virtual machine is another computer. The specific explanation can be Baidu.
Change Network Settings: click "control"> "Settings ".
Restart the system and run the following command: reboot or shutdown-R now.
Check the IP address again.
Run the ping command to check whether the network can be connected.
Press Ctrl + C to end
Then let's see if our computer can connect to this virtual machine.
OK. Now we have installed a virtual machine running centos 7.
Virtual Machine virtualbox and centos 7 Installation