In this lesson, we will learn to use vbox to install centos7 and configure the network.
VirtualBox download address https://www.virtualbox.org/
New virtual computer
Choose red hat 64 bit
Set root password
Wait for the installation to succeed
Centos7 configuration network
Network selection bridge network card
After the installation is complete, our centos does not support network access
You can enter the command dhclient to automatically obtain an IP address, and then use the command ip addr to view the IP.
or
cd /etc/sysconfig/network-scripts/
Vi ifcfg-enp0s3
service network restart
firewall-cmd --list-ports
firewall-cmd --zone=public--add-port=22/tcp --permanent
firewall-cmd --zone=public--add-port=80/tcp --permanent
Command meaning:
--Zone #scope
--Add-port=80/tcp #Add port, the format is: port/communication protocol
--Permanent #Permanent effect, invalid after restart without this parameter
firewall-cmd --reload
Download xshell to install the student version
Recommended Posts