[Linux] 2 install Linux operating system (super detailed version)

Time:2021-7-26

Download from CentOS official website:
http://isoredirect.centos.org/centos/7/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso

Click create new virtual machine and selectCustom (Advanced), and then click next;

The default setting is good. Click “next”;

Select “install the operating system later” and click “next”;

Select “Linux” and “CentOS 7 64 bit” as the version. You can also select other versions according to your needs. Click “next” after selection;

Name the virtual machine, change the location, and then click “next”;

For processor configuration, you can set the number of processors to “2”, the number of cores of each processor to “2”, and click “next”;

Allocate the memory of the virtual machine, which is “1g” by default, and click “next”;

All the way to the specified disk capacity by default. The capacity can be set by default. Select “store virtual disk as a single file” and click “next”;

Click “customize hardware”“ Select “use ISO image file” in the “new CD / DVD” item, and select the downloaded CentOS file The printer “and” sound card “are temporarily unavailable and can be removed; Click “close” after customizing the hardware, and then click “finish” to complete the installation.

Open the CentOS with the installation completed.

Enter the system boot interface and selectInstall CentOS 7, enter;

PS: if you need to change the default network card name to eth0, eth1, etc., you need to selectInstall CentOS 7When finished, press tab, and enternet.ifnames=0 biosdevname=0, enter

System language setting (English by default), clickContine

Click “date & time”, select Asia / Shanghai as the time zone, and click “done” to confirm

Click “software selection”, select “minimum install” in “base environment”, select “debugging tools”, “compatibility libraries”, “development tools” and “system administration tools” on the right, and click “done” to confirm;

Move down and findSYSTEMMediumINSTALLATION DESTINATIONClick to finish the configurationDone

How to partition a Linux system:

  • General zoning scheme:
  • /Boot partition (200m)
  • Swap swap partition (use the space in the hard disk as memory when there is not enough memory),
    • Memory < 8g: recommended swap partition size = 1.5 times the memory size
    • Memory > = 8g: recommended swap partition size = 8g
  • /Root zone (all space remaining)
  • Partition scheme with important data information:
  • /Boot partition (200m)
  • Swap swap partition (use the space in the hard disk as memory when there is not enough memory),
    • Memory < 8g: recommended swap partition size = 1.5 times the memory size
    • Memory > = 8g: recommended swap partition size = 8g
  • /Root partition (20g ~ 200g according to the hard disk)
  • /Data partition (all space remaining)
  • Flexible zoning scheme (the leader said to divide freely):
  • /Boot partition (200m)
  • Swap swap partition (use the space in the hard disk as memory when there is not enough memory),
    • Memory < 8g: recommended swap partition size = 1.5 times the memory size
    • Memory > = 8g: recommended swap partition size = 8g
  • /Root partition (20g ~ 200g according to the hard disk)
  • The remaining space is not partitioned

The following zoning is carried out according to the general zoning scheme:

findSYSTEMMediumNETWORK & HOST NAME, clickConfigureConfigure the network and clickDone

Configure (turn off) the security of the system.

findSYSTEMMediumKDUMP, uncheck and clickDone

Also foundSYSTEMMediumSECURITY POLICY, uncheck and clickDone

Finally, click “begin installation”;

During installation, you can set the root password, click “root password” to set it, or add a new user, and click “user creation” to add a new user;

After setting, wait for the installation to succeed; After the installation is successful, click “reboot”;

After restart, log in to the account; CentOS installation is now complete.

Operation and maintenance workflow:

  • Prepare / check the environment
  • Backup before operation (fallback)
  • Pay attention to saving after configuration
  • The configuration is complete and needs to be checked
  • Write project documents

Therefore, let’s check the network configuration first:

ip address show
perhaps
ip a

Next, we test network connectivity:

ping lpgit.com

ctrl+c: interrupt the command execution process.

ctrl+l: screen clearing operation

Can passnmtuiCommand to reconfigure the network card address information. Use it after configurationsystemctl restart networkRestart the network card service.

Li peiguan blog

Welcome to my personal website:

Li peiguan’s blog:lpgit.com