Linux installation in production environment

Most companies deploy services because of excessive services on Windows and excessive memory and CPU usage, the services may appear to be suspended, or hang up. Therefore, there is no special case. The first choice is to deploy services on Linux. Demonstrate the installation of Linux in the production environment with a VM.

First, create a virtual machine through VMware. If this is the first time or a newbie has just played a VM virtual machine, you can find other tutorials to learn how to create a virtual machine. Here is a direct demonstration of Linux installation.

After turning on the virtual machine, enter the installation interface, at this time there are two options as shown:

  The first option is to install directly, the second is to check and verify the integrity of Linux and then install, it will take a long time, so usually choose the first option to install, and then enter the language selection interface

 Usually default English, you can also choose Chinese

 Date is the time to set the time zone. China usually chooses Asia and Shanghai. The production environment is basically a command window operation, so SOFTWARE SELECTION chooses a minimal installation. The minimal installation only has a black window, which is the command window. There is no visual desktop. If you need a desktop, you can Select desktop option with GUI

   Click INSTALLATION DESTIBATION to enter the partition interface, perform disk partition, the system automatically partitions by default, we can manually partition according to our needs, here are divided into three areas, one is the boot partition, one is swap swap partition, and one is the root partition The boot partition is selected as the standard partition when selecting the type, and the other two are set as the expandable partition LVM. Secondly, the boot partition is enough for 1024MB. When the swap partition is usually 1-4GB, it is twice the memory, 4-8GB or more When the memory is large, the maximum is 16GB, and it is a waste if more. The swap partition is equivalent to the virtual memory of Windows. When the physical memory is not enough, a part of the disk space is used as the memory.

  

  You can turn on the network in NETWORK

  

  Then start the installation of Linux

  

  Click ROOT PASSWORD to set the root account password, simple password needs to click Done twice

  

  Wait for the installation to finish, then restart Linux

  

   After restarting, log in to Linux using the root account and the password you just set, enter ip addr to view the network IP, if the network is not turned on during installation, then the virtual machine's IP address will not be seen in ens32, and the virtual machine will not be able to connect, even during installation Choose to open the network connection. When you change to a network, you will find that the virtual machine can't connect to the Internet because the network obtains the IP address by DHCP. Let's start configuring a static IP address.

  

   Input

vi /etc/sysconf ig/network-scripts/ifcfg-ens32

  Enter configuration file

  When configuring the IP address, subnet mask, and gateway, some people do not know how to configure it. Baidu uses it for others to copy, but it is not found, mainly because we are not on the same network segment as others, so even if you configure it, it is Cannot connect normally, how to know how many IPs are configured, click VMware Edit-> Virtual Network Editor here

  

   Select VMnet8, click NET settings, you can see your IP network segment, subnet mask, gateway, and then configure the IP address

  

   Obtain IP method BOOTPROTU is changed to static, so no matter what environment, your virtual machine IP is fixed. ONBOOT is turned on and set to yes. If you need to connect to the Internet, you can configure domain name resolution DNS, but the name cannot be DNS , Can be DNS1, DNS2 will do, you are free, foreign network is "8.8.8.8", domestic is "114.114.114.144".

  After configuration, press the ESC key to quit editing, enter ": wq!" To save and exit. Then enter the command ip addr, in ens32 you can see the IP address you configured, you can connect to your virtual machine through this ip address.

  

 

 

 

 

 

 

 

 

 

   

Guess you like

Origin www.cnblogs.com/zhuifenglang/p/12683304.html