Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of installing CentOs7 in VMware in win7 to build Linux Environment

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces the relevant knowledge of "the method of installing CentOs7 in win7 to build Linux environment". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

I. brief introduction of vmware and centos

1.vmware is a virtual pc software, which can virtualize a new hardware environment on the existing operating system, which is equivalent to simulating a new pc, so that it can really run two independent operating systems on one machine at the same time.

The main features of vmware:

You can use more than two operating systems on the same pc without distinguishing or rebooting.

The local system can communicate with the virtual machine system.

The hardware environment of the virtual machine operating system can be set and modified at any time.

Download address on the official website:

2.centos (community enterprise operating system) is one of the linux distributions, which is compiled from the source code released by red hat enterprise linux in accordance with open source regulations. Because it comes from the same source code, some servers that require high stability replace the commercial version of red hat enterprise linux with centos. The difference between the two is that centos does not contain closed source software.

Download address of centos:

Aliyun Open Source Mirror Station:

Introduction to the installation environment

Virtual machine version: vmware workstation_12.1.1 build-3770994

Linux system version: centos_7 (64-bit, to be consistent with the number of digits of the computer system, what I download here is: http://mirrors.aliyun.com/centos/7/isos/x86_64/centos-7-x86-64minimal-1511, mini version, no desktop system, pure command mode; you can download the corresponding version according to your own needs)

Physical machine version: win7 flagship version 64-bit

Next, let's cut the crap and start building a linux environment.

Third, build the linux environment

1. Install vmware

Vmware installation version: vmware-workstation_full_12.1.1.6932.exe

Serial number: 5a02h-au243-tzj49-gtc7k-3c61n

You can go to the official website to download, or Baidu can search and download on its own. Download is complete, follow the prompts to install the next step.

2. Install centos

First step, create a virtual machine

1) after starting the virtual machine, first click create a new virtual machine. Select a typical configuration as shown in the following figure, and click next:

2) choose to install the operating system later here. Then click next.

3) as shown in the following figure, select linux and click next.

4) set the name and location, which is the address you need to use when you turn on the virtual machine again, so please keep in mind. Click next.

5) default is 20g, and click next.

6) Click the custom hardware to configure the virtual machine hardware.

Go to the interface shown in the following figure:

At least 628mb should be selected for memory. 1g is recommended. Cpu recommends that you configure 2 cores.

The optical drive chooses to use the iso image file here, and select the storage path where we have downloaded iso; other configuration items are available by default. Once set up, click the close button.

At this point, our virtual machine hardware configuration has been completed, click finish.

Let's start installing the operating system.

Step 2: run the virtual machine and install centos

1) Click "enable this virtual machine"

Enter the following interface:

What needs to be done next is to wait patiently.

2) Select the language, here we pull the mouse to the bottom of the page, select Chinese, and click continue.

3) on the setup home page, swipe down to the system option and select the installation location

Select the disk, click "I want to configure partitions", and click finish

4) on the manual partition page, make the following settings

Click the plus button, pop up the select mount point box, first add a swap partition, enter 2048 capacity, and click add mount point.

Similarly, click the plus sign again, add the root partition, select the mount point, enter the available space capacity for the size (shown in the pink button, such as 16gb), and click to add the mount point.

Finally, add another / boot partition and set the device types of the three added partitions to the standard partition:

Click the finish button in the upper left corner, a page will pop up, and click to accept changes.

5) configure network and hostname

Settings page, click the network and hostname

Since our network is in nat mode, it automatically obtains ip through dhcp, so we turn on the network and click on the upper left corner to complete it.

After returning to the settings page, click start installation in the lower right corner.

6) set the user name and password and click the root password to set the password for the root user.

If the password is too simple, it will prompt us, and we need to click twice to finish.

Of course, we can also create an ordinary user. In the image above, click create user and enter the account number and password. The next time you log in, you can log in with the ordinary user account password. Here we do not create ordinary users, students with needs can create ordinary users on their own.

7) after the password is set, wait for installation

After the installation is complete, click restart and wait. No action is required.

8) installation success page

After rebooting, the above figure proves that centos has been installed successfully. Enter the newly configured user name root and password to log in to the built linux system.

IV. Virtual machine network configuration

Let's configure the network of our virtual machine. After shutting down the operating system, turn on the virtual machine on the home page again.

The open path of the virtual machine is the path set during installation, as shown in the path set during installation. Select .vmx to open it.

In the following interface, set the network adapter to bridging mode (because we need to connect to our virtual machine using xshell later, we need to let the virtual machine have its own separate LAN ip. Among them, nat mode and our native shared ip are not applicable. ), turn on the virtual machine again, and you can connect to the network.

If you want to use other network connection modes, you can also set them up here.

Fifth, download common linux software.

Since we install the smallest software package, we need to install a lot of software manually.

Install the ifconfig command

To view the virtual machine ip with the ifconfig command, you need to install the software package containing this command

Through the yum search command found that the ifconfig command is in the net-tools.x86_64 this package, we can install this package on the line. During installation, enter y by default and enter.

Installation of other commands, installation command: yum install "package name"

After the installation is successful, enter the ifconfig command to see if the installation is successful. In the following figure, the virtual machine ip address was checked successfully. In the next section, we will use this ip address to connect to the virtual machine using xshell for our follow-up practice.

VI. Summary of problems

1. In nat networking mode, when the virtual machine is used for the first time, you can get the ip when the ip; computer is shut down and the virtual machine is used again, as shown below:

Solution:

1) check whether the five services of vmware in windows task manager are shown in the figure below:

If there is a lack of services, just download a higher version of vmware to overwrite the previous security directory, or you can update directly to the latest version of vmware.

2) if the vmware installation is normal, check whether the dhcp and nat services are running, show that they have stopped, and then right-click to start them.

2. Enter the linux command and prompt that the command does not exist

Solution: enter yum install "command that does not exist", after installation can be used, sometimes a command is under a package name, which will prompt the command under which package, download the package.

3. In bridge mode, the virtual machine cannot get the ip

Solution: click Edit-Virtual Network Editor, set the automatic connection of vmnet0 to the physical network card connection, and then restart the virtual machine.

This is the end of the content of "how to install VMware in win7 to build a Linux environment with CentOs7". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report