Linux Basic One (Virtual Machine Installation and Configuration)

Resources

Vm installation resources and Centos6 mirrors for each version

One, vm installation

1. Turn off the firewall

  • Control Panel=》System and Security=》Check firewall status=》=》Enable or close the firewall=》Close=》OK

Search control panel
Insert picture description here

System and security
Insert picture description here
check the firewall status,
Insert picture description here
enable or disable the firewall,
Insert picture description here
select disable => OK
Insert picture description here

2. Find the location of vm download, double-click to install

Insert picture description here

Insert picture description here
Insert picture description here
Accept=》Next
Insert picture description here
installation location can be changed by yourself=》Next step
Insert picture description here
here, install it on Disk D
Insert picture description here
Next=》Next=》Install

Bold style
Insert picture description here
Insert picture description here
Insert picture description here
After the installation is complete, click on the license, enter the key of the corresponding version, in the matching text file
Insert picture description here
Insert picture description here

3. Test whether the installation is successful

After the installation is complete, open the command-side test as an administrator=》input ipconfig=》Enter key and the
Insert picture description here
following sign appears and the installation is successful
Insert picture description here

Two, install Linux

Centos is used here

1. Create a virtual machine

Click Next to create a new virtual machine
Insert picture description here

Insert picture description here

Install
Insert picture description here
later in the next step =》Next
Insert picture description here
select Centos 6 64=>
Insert picture description here
Change the name and installation location of the next step by yourself (it is recommended to name master)
Insert picture description here
Default=》Next
Insert picture description here
default=》Next
Insert picture description here
NAT=》Next
Insert picture description here
default=》Next
Insert picture description here
next
Insert picture description here
Create = "Next to
Insert picture description here
learn the direction of big data, it is recommended to complete the
Insert picture description here
next step for 50G
Insert picture description here

Insert picture description here

2. Edit the virtual machine

Insert picture description here
Select the downloaded Centos6 …iso image file=>OK
Insert picture description here

3. Start the virtual machine

Click the green arrow to turn it on and
Insert picture description here
click = "Mouse to the first line = "Enter
Insert picture description here

Insert picture description here
Click the right arrow on the keyboard=》select skip=》Enter
Insert picture description here

Press Enter to
Insert picture description here
switch the mouse = "next
Insert picture description here
select the language Chinese simplified,
Insert picture description here
select the keyboard, American English = "next
Insert picture description here
basic storage settings
Insert picture description here
ignore data
Insert picture description here
host name = "suggest to change to master
Insert picture description here
next = "next step, centos will automatically provide a root user as the highest authority, directly Just set the password, it is recommended to set the password to 123456
Insert picture description here
, use it anyway
Insert picture description here

Replace existing = "Next
Insert picture description here
Insert picture description here
default = "Next
Insert picture description here
wait (longer time )
Insert picture description here
Insert picture description here
to reboot
Insert picture description here

Go forward
Insert picture description here
agree=》Go forward
Insert picture description here

Create an ordinary user and customize it yourself.
Insert picture description here
Synchronize time forward on the network = "forward
Insert picture description here
confirmation =" complete the
Insert picture description here
installation is complete
Root user login (the highest authority)

Insert picture description here
Insert picture description here
Note: hang when not using the virtual machine

Virtual machine=》power=》suspend guest
Insert picture description here

4. Configure the network and synchronize the network with the host to establish a connection with the host later

Understand the knowledge points

  • IP address: a total of 32 bits, one part of 8 bits, there are four parts, it is the unique identification of the computer in the network
  • Under the same gateway (that is, under the same router, the first three parts of the computer's ip address are the same, and the last part is the unique identifier)
  • Generally, the 1-10 of the last part is reserved for special identification. For example, the local router (gateway) ip address is 192.168.0.1, and the ordinary computers connected to it are identified by numbers after 10, such as 192.168.0.15 192.168.0.16...not To 255, 255.255.255.255 means global broadcast, sending a message can be received by all gateways.
  • Subnet mask: 255.255.255.0 fixed
  • The ip address and the subnet mask are bitwise operated, and the value obtained by the AND is the local routing ip address.

Click =》Left button
Insert picture description here
system0
Insert picture description here

After that, the red cross disappeared. Although connected to the host, I am not sure whether it is in the same route with the host. Also, because it is used more later, it is easy to remember the ip address when configuring an IP address. Here you need to configure the connection information to
Insert picture description here
edit the
Insert picture description here
automatic connection check, select iPV4, manual
Insert picture description here

Address=》Add: fill in one, easy to remember 192.168.149.110
subnet mask=》Add: 255.255.255.0
Gateway=》Add: 192.168.149.2 Since the gateway of the host is 1, here the gateway is 192.168.149.2
DNS server: used Analytical, fixed value, local nearest

Insert picture description here
The configuration is complete, but the network connection needs to be restarted to take effect.
Right-click on the desktop = "open terminal = "service network restart" to reset the network connection. At this time, the change takes effect.
Insert picture description here
Enter ifconfig and check the ip address to see if the
Insert picture description here
configuration is successful. To connect to Xshell, you need to turn off the firewall of the virtual machine
service iptables status to view the status of the firewall
chkconfig iptables off Here is the command to permanently turn off the firewall, which will take effect after restart

The installation and network configuration of this virtual machine is complete

Additional: After the installation is complete, a snapshot of the initial state will be saved, in case the virtual machine crashes and restores the
virtual machine=》snapshot=》take a snapshot
Insert picture description here

Three, virtual machine related knowledge

Computer = "File system
This is the root directory, you can enter the directory in the terminal cd / (cd is used to switch directories)
Insert picture description here
terminal demonstration (ls is to view the contents of the current directory) Insert picture description here
the role of each directory

  • File management system in Linux: distinguish different functions in the form of directories
    • bin: store commands for ordinary users to use
    • sbin: store super commands for super users to use
    • etc: linux configuration file
    • home: The directory where ordinary users are stored
    • root: Store root user
    • usr: Store user-defined installed software or uploaded data usually in /usr/local

Other basic instructions (first to understand the later demonstration)
ifconfig check ip
reboot restart
hostname get hostname
mkdir test create folder
cd directory switch directory
help understand the use
of basic instructions man understand the use of basic instructions

Four, summary

1. The minimum hard disk size is 40
2. Time synchronization

Network Configuration
	ip: divided into two parts, the first three parts are called gateways (follow the first three parts of the virtual network card allocated by the installation VM), usually the host number is 2-254
	Subnet mask: 255.255.255.0 Identify the gateway of the network through bit operation
	Gateway: Follow the first three parts of the virtual network card allocated by the installation VM, the host number in linux is 2,
	DNS server: 114.114.114.114 8.8.8.8 resolution
After the network configuration is over, it will not take effect immediately
	Need to restart
	Or reset the network card: service network restart
	Verification: ping www.baidu.com

File management system in Linux: distinguish different functions in the form of directories
	bin: store commands for ordinary users to use
	sbin: store super commands for super users to use
	etc: linux configuration file
	home: The directory where ordinary users are stored
	root: Store root user
	usr: Store user-defined installed software or uploaded data usually in /usr/local

View hostname: hostname
View network: ifconfig

Temporarily turn off the firewall (open automatically after restart): service iptables stop
Permanently turn off the firewall (effective after restart): chkconfig iptables off
View firewall status: service iptables status

Shut down and restart commands
	reboot It is recommended to use the first
	init 6

You can use the command (help man) to understand the basic commands
	Format: help basic command
	Format: man basic command
	
Basic commands
	cd: used to switch directories
		Shortcut tab key: automatic completion
				 If there are the same names with the same name, press tab again to list all files and directories with matching names
		.: indicates the current directory
		..: indicates the upper level directory
	ls [Options]: View the current content
		Option: -l: View detailed information can be abbreviated as ll
			 -a: View hidden content

Java
introductory basic learning (1)
Java introductory basic learning (2)
Java introductory basic learning (3)
Java introductory basic learning (4)
Java introductory basic learning (5)
Java introductory basic learning (6)
Java introductory basic learning (7)
Java introductory basic learning (8)
Java introductory basic learning (9)
Java introductory basic learning (10)
Java introductory basic learning (11)
Java introductory basic learning (12)
Java introductory basic learning (13)
Java introductory basic learning ( 14) Maven Git
java summary, topic + notes
Common objects of advanced java (1)
Common objects of
advanced java (2) Bubble sort of
advanced java, selection sort of
advanced java, advanced object-oriented (encapsulation) )
Java advanced object-oriented (code block, inheritance)
Java advanced object-oriented (polymorphism, abstraction, interface)
Java advanced anonymous inner class, access modifier, package
java advanced io stream (byte stream , Character stream)
Linux
Linux basic one
Linux basic two

Guess you like

Origin blog.csdn.net/qq_45798550/article/details/108553713