Getting started with linux-VMware installation, centOS7 installation and configuration

  • Introduction and characteristics of linux system
    Linux, the full name of GNU/Linux, its kernel was originally inspired by the idea of ​​Minix and Unix by Linus Torvalds (Linus Torvalds), a Finn, when he was studying at the University of Helsinki (22 years old). Inspired by , written out of personal interest. In addition, he has also developed git distributed code synchronization technology svn centralized code synchronization technology and other technologies that are popular all over the world.
    Linux is a free-to-use and freely disseminated Unix-like operating system. It is a multi-user, multi-tasking, multi-threading and multi-CPU operating system based on POSIX (Portable Operating System Interface) and UNIX.
    Linux can run major UNIX utilities, applications, and network protocols. It supports 32-bit and 64-bit hardware. Linux inherits Unix's network-centric design idea and is a multi-user network operating system with stable performance.

  • Features
    1. Multi-user, multi-task
    2. Support multiple platforms
    such as platforms with x86, SPARC, Alpha and other processors. In addition, Linux is an embedded operating system that can run on handheld computers, set-top boxes or game consoles.
    3. Abundant network functions, good portability

  • Compatible with standards, good user interface

  • Robust System Security, Outstanding Speed ​​Performance

  • open source, free

  • Linux distribution
    Technically speaking, Linux developed by Linus Torvalds is just a kernel. The kernel refers to a system software that provides functions such as device drivers, file systems, process management, and network communication. The kernel is not a complete operating system, but only the core of the operating system. Some organizations or manufacturers package the Linux kernel with various software and documents, and provide system installation interface and system configuration, setting and management tools, which constitute the Linux distribution.
    insert image description here

  • CentOS Introduction and Features
    CentOS (Community Enterprise Operating System, Chinese means community enterprise operating system) is one of the Linux distributions. It is compiled from the source code released by Red Hat Enterprise Linux in accordance with the open source code regulations. Because it comes from the same source code, some servers that require high stability use CentOS instead of the commercial version of Red Hat Enterprise Linux. The difference between the two is that CentOS is completely open source.
    tips:
    1.CentOS can be understood as the Red Hat AS series! It is completely released after the improvement of Red Hat AS! There is no difference between various operations and uses and RED HAT!
    2. CentOS is completely free, and there is no problem that RED HAT AS4 needs a serial number.
    3. The unique yum command of CentOS supports online upgrade, which can update the system in real time, unlike RED HAT, which needs to spend money to purchase support services!
    4. CentOS fixed many RHEL BUG!

  • vm and centos download and installation
    official website:
    https://www.vmware.com/cn.html
    latest version download address:
    https://www.vmware.com/cn/products/workstation-pro/workstation-pro-evaluation. htmlTake
    VMware-workstation-full-15.5.0-14665864 version as an example
    insert image description here
    insert image description here

    ![在这里插入图片描述](https://img-blog.csdnimg.cn/90f1cef42d1e491dabb616ebfa9a66e6.png)
    

insert image description here
insert image description here
insert image description here
insert image description here

insert image description hereinsert image description here
Here are a few license codes:
YG5H2-ANZ0H-M8ERY-TXZZZ-YKRV8
UG5J2-0ME12-M89WY-NPWXX-WQH88
UA5DR-2ZD4H-089FY-6YQ5T-YPRX6
GA590-86Y05-4806Y-X4PEE-ZV8E0
ZF582-0N W5N-H8D2P- 0XZEE-Z22VA
YA18K-0WY8P-H85DY-L4NZG-X7RAD
If you are using windows11, it may appear.
insert image description here
Installing a higher version of vm16 may solve the problem
after the VMware download is opened. The page is as follows:
insert image description here

The centOS image file will no longer show the download process here, download it by yourself, what I use here is:
insert image description here
Next, start the installation:
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
after the completion, click Start if there is an error similar to the following:
insert image description here
The solution is to enter the BIOS and enable the virtualization technology (generally Use F2 or F10, you can enter according to your computer model)
For example: insert image description here
after opening, it can start normally, enter
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
the set password to log in to the system

  • Introduction to virtual network cards vm0, vm1, and vm8
    vm 0:
    a virtual machine in bridge mode, like an adult who "registered" at the router "Civil Affairs Bureau", has its own separate residential address, although it lives in the same place as the host In the compound, but at least those who have registered permanent residence can directly communicate with the outside without any hesitation. Host IP: 192.168.31.173 Virtual machine IP: 192.168.31.110 It is the same as other hosts in this network segment, and cannot be configured the same, otherwise there will be IP conflicts.
    vm8:
    The virtual machine in NAT mode is purely a black account that has not registered. The router "Civil Affairs Bureau" has no idea that there is such a person, so naturally it will not take the initiative to communicate with it. Even if the virtual machine occasionally sends some letters to the outside, it has to be forwarded to the host in the name of the host. The host also specially invited an old man called NAT to be responsible for the sending and receiving of these virtual machines. Host IP: 192.168.31.173 Virtual machine IP: 192.168.170.10 After configuring this network segment, you can still access the Internet. This technology is called NAT (Network Address Translation Technology)
    .
    Not only did the black slaves have no household registration, and the router "Civil Affairs Bureau" did not know such a number, but they were also locked up in a small dark room by the host, and they were not even allowed to send out letters.
    Without IP settings, it is impossible to communicate with the outside world
  • NAT explained

NAT (Network Address Translation, Network Address Translation) was proposed in 1994. When some hosts in the private network have been allocated local IP addresses (that is, private addresses used only in this private network), but now want to communicate with hosts on the Internet (no encryption is required), NAT can be used method.

Editing of VM virtual machine---->virtual network editor----->vmnet8----->nat settings
insert image description here

  • Configure static ip
    to edit the network card file: vim /etc/sysconfig/network-scripts/ifcfg-ens33

Add the following content:
IPADDR=192.168.23.10
NETMASK=255.255.255.0
GATEWAY=192.168.170.2
DNS1=114.114.114.114 A DNS domain name service provided by a large network operator in China
DNS2=8.8.8.8 A DNS domain name service provided by Google worldwide Analysis
Modification:
ONBOOT=true or yes, the network card takes effect at startup
BOOTPROTO=static Static IP configuration, DHCP dynamic IP allocation is no longer used
After modification, the network needs to be restarted
systemctl restart network.service
service network restart
to check and test
ip addr
ping again www.baidu.com

  • Basic command
    Shutdown (used by root user):
    shutdown -h now
    poweroff
    init 0 (0-6 respectively represent startup state 6 restart)
    shutdown -h 5 //shutdown after 5 minutes
    shutdown -h 11:11 //scheduled shutdown
    restart:
    reboot
    shutdown -r now
    init 6
    shutdown -r 5 //restart after 5 minutes
    shutdown -r 11:11 //restart at 11:11
    shutdown -c //cancel restart

  • Introduction and use of SSH tools
    (the default port number of ssh protocol is 22) ftp 21 http 80 https 443
    SSH (Security Shell) is open source and the most reliable network protocol for remote login. System administrators use it to execute commands and transfer files to another computer on the network via the SCP =security copy protocol.
    By configuring SSH password-free login, you can enjoy the following conveniences:
    1. Use scripts to automate daily work.
    2. Enhance the security of Linux server. This is a recommended way to protect Virtual Private Servers (VPS) from brute force attacks, as SSH keys are virtually unbreakable by brute force alone.

  • Network and firewall related commands
    1. Restart, close, open, firewalld.service service
    View firewall status
    systemctl status firewalld
    service firewalld status
    restart firewall
    Service firewalld restart restart
    systemctl restart firewalld
    restart close firewall
    Service firewalld stop close
    systemctl stop firewalld close
    start firewall
    Service firewalld start open
    systemctl start firewalld open

    Set whether to start at boot:
    systemctl disable firewalld Set to not start at boot
    systemctl enable firewalld Set to start at boot
    systemctl disable firewalld Set to not start at boot
    systemctl enable firewalld Set to start at boot
    2. View the status of the firewall (the firewall comes with a simple display)
    firewall-cmd -- state
    3. Check the firewall rules
    firewall-cmd --list-all
    4, open and close the port of the firewall
    The following refers to the operation under the public zone. Different zones can be
    added by changing the value behind the zone:
    firewall-cmd - -zone=public --add-port=3306/tcp --permanent (-permanent stands for permanent
    effect, without this parameter, it will fail after restarting)
    According to the network location where it is located, the preset protection rule set
    – public: only allows access to this machine ssh dhcp ping service
    – trusted: allow any access
    – block: block any incoming request (clearly rejected, there is a response client)
    – drop: discard any incoming data packets (no response, save server resources)
    reload:
    firewall -cmd --reload
    view:
    firewall-cmd --zone=public --query-port=3306/tcp
    删除:
    firewall-cmd --zone=public --remove-port=3306/tcp --permanent

Guess you like

Origin blog.csdn.net/weixin_44834205/article/details/126394414