Introduction linux and set up virtual machines

About a .linux

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

II. Creating a Virtual Machine

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The first step after the configured General, the second step to configure IPV4 settings

 

 

Configuration: address: 10.0.0.XXX, Netmask: 24, Gateway: 10.0.0.254 (gateway configuration before)

DNS Servers:114.114.114.114

 

 

 

 

 

 

 

 

 

 

Add some commonly used tools

 

 

 

 

 

 

 

 

 

 

NIC configuration file

Login: root 
Password: install a virtual machine when the password
if: ping baidu.com can not ping, or, ip a no ip address you set. That you network is disconnected. See Figure correctly
view the file directory: ls

 

 

The network is, how do we modify the network card file

How to modify? 
1 Run: vi / etc / sysconfig / network -scripts / ifcfg-ens33 ( note that there is a space behind vi)
2 commands: i (i knock keyboard to enter edit mode)
3 can then be changed to the following figure: how to save and exit? 4 press esc 5 shift plus ":" 6 Input: wq carriage 7 NIC restart command: systemctl restart network after the reboot card 8, the card status view: systemctl status network








 

 

xshell tools to connect the virtual machine, or connect to our server

1 Why tool virtual connection, or the server 
vm virtual machine interface nausea, convenient operation of
the company's server, or in the suburbs, or buy cloud server.
2 in connection to this tool, it comes in the end, is connected to the server service.
We have to open ports, turn off the firewall;
Operation Firewall command:
systemctl STOP firewalld # temporarily turn off the firewall (virtual machine to restart the machine will turn on the firewall)
systemctl permanently disable firewalld # turn off the firewall (restart will not open)
systemctl Status firewalld # Check the firewall status (as shown below) CentOS used in which services? sshd this service, which is enabled by default, and 22 from the port of view sshd service of state? Command is as follows: systemctl status sshd # sshd service is turned on to see if we find systemctl status sshd is turned off. systemctl start sshd # service sshd start systemctl stop sshd # service sshd stop systemctl restart sshd # restart sshd service









 

 

We xshell likened link service: large health Road

 

 

xshell is your virtual machine is a big health shop

1 great care to ensure that if the road through the store. 
To access the ip be someone else. To configure the network card that allows others to access
2 large health shop, whether big health services,
sshd, service it must be open.
3 large health care stores, with this service, can normally pick up, have not encountered crackdown? Means: Although I have this service, but management can not be made to provide this service.
The firewall must be turned off. 4 xsheel can directly enjoy great health. First: You go route, which is the ip virtual machines to go, you know, second: you want to enjoy is the service, to represent the port: 22 port Third: News about your member account and password, username linked virtual machine, the password to fill in for





Snapshot

1 What is a snapshot? 
Suppose you want to change a file, afraid changed later, before I do not know what? Backup look, or take pictures. If I make mistakes, we can say that revert to the previous state through photographs. Corresponds to our virtual machine: give current system status, to be a snapshot, so that later, even after no matter how we operate, able to
snapshots reply, the state before the change. 2 snapshots for a snapshot of three states? Snapshots in boot state. Snapshots in the off state. Snapshots in the hook.




 

 

clone

The inside of cloning, and organism is, to copy. All have a copy. 
After the future we create a virtual machine, the other, do not need to create a direct clone.
1 how cloning?
In the machine you want to clone, and then clone, we chose to complete cloning, in this way, even delete a model machine, other clones are not affected
2 Precautions cloning?
Snapshots can not suspend the power-on state or cloning, not the machine can be cloned in the boot or Suspend.
3 cloned virtual machine, must be modified to use normal IP;
  . 1 command: VI / etc / sysconfig / Network-scripts / ens33 the ifcfg-
  2 commands: I
  3 Review: the IPADDR = "10.0.0.201"
  . 4 press esc
  5 shift plus ":"
  6 enter: wq enter
  7 to restart the network card, the command: systemctl restart Network
  8 card after the restart, view the status of the card: systemctl status network

 

 

Modify the hostname

[root @ localhost ~] # hostnamectl set-hostname py13-1 
after restart the virtual machine provided #
[root @ localhost ~] # reboot -f
After connecting the new #
[root @ py13-1 ~] #

Mouse exit vm virtual machine, Ctrl + Atl

 

 

Guess you like

Origin www.cnblogs.com/jiangxianseng/p/12556478.html