Statement
Welcome reprint, but please keep the original source of the article →_→
Life One number: http://www.cnblogs.com/smyhvae/
Article Source: http://www.cnblogs.com/smyhvae/p/3919940.html
Contact information: [Email protected]
Body
Virtual machine version: VMware workstation_10.0.3
Linux system version: centos_6.5 (64-bit)
First, preface:
A few days ago to do a small white, installed the latest version of CentOS 7 released last month, found that in the learning time there are many places and the old version of the CentOS is not so much the same, so many problems (of course, for me, the beginner), so now re-loaded back to the CentOS 6.5 for learning. Let's go straight to the chase.
When the CentOS installation succeeds in the VMware virtual machine, two virtual network cards are simulated in the Win7 system: VMnet1 and VMnet8, let's see, click Control Panel---> View network status and Tasks---> Change adapter settings, The following interface appears:
Open the virtual machine and select "Virtual Machine---> Settings" to bring up the following interface:
If you want to ensure that the virtual machine can communicate with the physical machine, or the normal Internet, make sure that the "Device status" in the upper right corner is: connected.
, there are three ways to connect to the network, and here are three ways to get a detailed look at these.
Two, bridge bridging mode, Nat mode, host-only only host mode:
- Bridge mode: The virtual machine uses the Real network card to communicate, the configuration is simple, as long as the real computer in the same network segment, you can communicate directly, if there are other computers in the LAN, you can also access. Disadvantage: It takes up an IP address in the network segment. (similar to a truly independent computer)
- Nat mode: Use the virtual network card to communicate with VMNET8, only communicate with the local computer, on this basis, the virtual machine can access the Internet through the host
- Host mode only: Use the virtual network card to communicate with VMnet1, only to communicate with the local computer;
Third, host-only only the configuration of the host mode:
(1) First check the VMware service situation:
Select Computer---> Manage---Services and applications---services, locate the VMware NAT service and VMware DHCPservice, and we start it:
(2) View the network segment of the virtual machine NIC:
Now that you're using a virtual NIC VMnet1, check out the VMNET1 network segment:
Shows that the IP address of the VMNET1 is 192.168.154.1, that is, the network segment is 192.168.154.X(the virtual machine automatically assigns the address, each person's computer may be different)
Then turn on the local Area Connection share: (Do not turn on the Virtual network card sharing)
Then we go into the VMware virtual machine and set the connection mode to Host-only mode:
Next, open the VMware Virtual Network editor and look at the configuration:
, you can see that the virtual network segment is also 192.168.154.X
If not, enter the reboot command in CentOS to reboot
(2) Configure in the virtual machine:
To open the CentOS terminal and enter the root user, enter the following command to view the current NIC information: (Note: If Yes is interface)
1. Ifconfig
The following information is displayed:
Shows no available network cards (LO is the native loopback network card, mainly used for native communication and testing, do not need to plug the network cable can ping themselves, not much meaning).
Enter the following command to assign an IP address to the NIC Eth0: (Must be guaranteed and VMnet1 for the same segment 192.168.154.X)
1. Ifconfig eth0 192.168.154.2
2. Ifconfig
The following information is displayed:
(3) Verify in Windows:
Open the CMD console in Win7 and enter the following command:
1. Ping 192.168.154.2
The display effect is as follows, received such a request reply packet, explained Ping Pass;
Third, the configuration of NAT mode:
The steps are the same as the host-only pattern above.
Note: To ensure that the virtual network card VMware8 and the virtual machine's IP address are in the same network segment:
The most critical commands are:
1. Ifconfig eth0 192.168.221.2
Four, bridge bridging mode configuration:
First check the VMware service situation, as in the previous two (1) steps. Then perform the following steps:
(1) To view the IP address of the local connection:
Since my local connection is automatically acquired by IP, you need to enter the following command in CMD to view:
1. ipconfig
The display results are as follows:
Shows that the IP segment of the local connection is: 192.168.1.X.
(2) Set the connection mode of the virtual machine:
First set the connection mode to bridging:
In the Virtual network editor, the network adapter that is connected to the bridge is recommended not to choose Automatic, but to select the network adapter that is needed locally:
(3) Enter the following command, set up the CentOS IP to ensure that the network segment is 192.168.1.X:
1. Ifconfig eth0 192.168.1.4
The effect is as follows:
At this point, you can ping the pass in Win7 cmd:
Special statement: After the restart, the above three methods of IP will be lost, in order to permanently save, must be written to the file.
V. SECURECRT Remote Connection tool: (Connect with virtual machine)
(1) Connection:
After opening the software, select "File--->quick Connect" and the following interface appears:
, enter the IP address of the virtual machine, and the user name: root, and then start the connection.
Note: In some other versions of Linux, it is forbidden to connect using root, which requires the identity of a normal user.
Then enter the root user's password on the line:
So, it's done.
(2) Set the SECURECRT software:
Because I installed the Chinese version of CentOS, so in order to prevent the use of software garbled, the following settings need to be:
Select the menu bar "Options--->session options" and the following dialog box appears:
As shown, first change the background color of the terminal (personal habits).
Then set the encoding to international standards:
VI. winscp File Copy tool:
Features are very powerful:
- Perfect integration with Windows (drag, URL, shortcut)
- Supports all common file operations
- Support for SFTP and SCP protocols based on SSH-1, SSH-2
- Support for batch scripts and command line methods
- Multiple semi-automatic and automated directory synchronization methods
- Built-in Text editor
- Supports SSH password, keyboard interaction, public key and Kerberos (GSS) authentication
- Support for various types of public key validation through integration with pageant (PuTTY Agent)
- Provides Windows Explorer with the Norton Commander interface
- Optionally store session information
- Can be set in a configuration file instead of in the registry, suitable for operation on mobile media
Once the software is open, enter the virtual machine's IP address and the root user's password to connect:
After running, the display interface is as follows: