Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of installation and configuration of CentOS 8.0.1905 inux Server system

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the example analysis of CentOS 8.0.1905 inux server system installation and configuration, which is very detailed and has certain reference value. Interested friends must read it!

Description:

Up to now, the latest version of CentOS 8.x is CentOS 8.0.1905. The specific installation and configuration process of CentOS 8.0.1905 is described below.

Server-related settings are as follows:

Operating system: CentOS 8.0.1905

IP address: 192.168.21.130

Gateway: 192.168.21.2

DNS:8.8.8.8 8.8.4.4

Note:

1. The CentOS 8.x series only has 64-bit systems, not 32-bit systems.

2. CentOS 8.x has two versions: CentOS 8.x and CentOS Stream.

CentOS Stream is a developer-oriented distribution, a rolling release of Red Hat Enterprise Linux, and a continuous content stream that is updated several times a day, including the latest and maximum updates to RHEL.

Generally, it is recommended to install CentOS 8.x version on the server.

First, install CentOS 8.0.1905

After successfully booting the system, the following interface appears

Interface description:

Install CentOS Linux 8.0.1905 # install CentOS 8.0.1905

Test this media & install CentOS Linux 8.0.1905 # Test the installation files and install CentOS 8.0.1905

Troubleshooting # fix the fault

Select the first item here, install CentOS 8.0.1905, enter and enter the interface below

Language selection interface, the official production server is recommended to install the English version.

Continue, continue.

Select-system SYSTEM- installation location Installtion Destir, enter the disk partition interface

Select Storage Configuration storage configuration, customize Custom, and click "finish Done" in the upper left corner to enter the following interface.

The new mount point uses the following partition scheme: standard Standard Partition

Complete Done

Click the "+" sign in the lower left corner

Mount point: swap

Expected capacity: 2048

Add a mount point, as shown in the following figure

Plan before zoning

Swap # swap partition, generally set to 2 times memory

/ # all remaining space

Note: it is recommended to divide the production server into a separate / data partition to store data

Continue to click the "+" sign in the lower left corner.

Mount point: /

Expected capacity: leave blank # default to all remaining space

Add a mount point, as shown in the following figure

Click "finish Done" in the upper left corner to enter the following interface

Accept the change to Accept Changes and go to the following interface

Software SOFTWARE "-" Software Select Software Selection ", enter the following interface

Interface description:

1. Server with GUI, integrated and easy to manage server with graphical interface

2. Server, integrated and easy to manage server

3. Minimum installation, basic functions

Workstations are user-friendly notebook computers and PC desktop systems

5. Customize the operating system

6. Virtualized host, minimum virtualized host.

The server recommends that you choose the third option, minimum installation.

Start installing Begin Installation

Enter the interface below

Select-the user sets the USER SETTINGS-Root Password password and goes to the following interface

Set Root password

If the password length is too short, you will be prompted. Confirm twice after setting up, and the installation will continue.

After the installation is complete, you will enter the following interface

Enter the account number into root and enter enter.

Then enter the root password set above and enter enter.

System login succeeded

2. Set the IP address and gateway DNS

Description: CentOS 8.x does not automatically open the network connection after it is installed by default!

Cd / etc/sysconfig/network-scripts/ # enter the network profile directory

Vi ifcfg-ens160 # Edit the configuration file to add and modify the following

TYPE=Ethernet

PROXY_METHOD=none

BROWSER_ONLY=no

BOOTPROTO=static # enable static IP address

DEFROUTE=yes

IPV4_FAILURE_FATAL=no

IPV6INIT=yes

IPV6_AUTOCONF=yes

IPV6_DEFROUTE=yes

IPV6_FAILURE_FATAL=no

IPV6_ADDR_GEN_MODE=stable-privacy

NAME=ens160

UUID=6b61a7cb-e11d-491d-bb30-aad60721c6b1

DEVICE=ens160

ONBOOT=yes # enable automatically enable network connection

IPADDR0=192.168.21.130 # set IP address

PREFIXO0=24 # set the subnet mask

GATEWAY0=192.168.21.2 # set Gateway

DNS1=8.8.8.8 # set the main DNS

DNS2=8.8.4.4 # set backup DNS

: wq! # Save exit

Nmcli c reload # reload the network configuration

# Note: CentOS 8 does not support network.service service by default. You need to use the yum install network-scripts command to install this service.

Yum install network-scripts

Service network restart # restart the network service

Systemctl restart network.service # restart the network service

Ping www.baidu.com # Test whether the network is working

Ip addr # View IP address

3. Set the host name to www

Hostname www # set the hostname to www

Vi / etc/hostname # Edit configuration file

Www # change localhost.localdomain to www

: wq! # Save exit

Vi / etc/hosts # Edit configuration file

127.0.0.1 localhost www # modify localhost.localdomain to www

: wq! # Save exit

4. Change the name of the network card ifcfg-ens160 to ifcfg-eth0

In the CentOS 8.x system, the naming rules of the network card are redefined, which may be "ifcfg-ens160" and so on. Let's change the network card to ifcfg-eth0.

1 、 cd / etc/sysconfig/network-scripts/

Mv ifcfg-ens160 ifcfg-eth0 # change the name

Vi ifcfg-eth0 # Editing

NAME=eth0 # modification

DEVICE=eth0 # modification

: wq! # Save exit

2. Edit vi / etc/sysconfig/grub #

Add a "net.ifnames=0 biosdevname=0" to the "GRUB_CMDLINE_LINUX" variable

: wq! # Save exit

3. Run the command: grub2-mkconfig-o / boot/grub2/grub.cfg # regenerate the grub configuration and update the kernel parameters

4. Add rules for udev

Create a network card rule "70-persistent-net.rules" in the "/ etc/udev/rules.d" directory and write the following statement:

SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "00:0c:29:12:72:05", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth0"

# ATTR {address} = = "00:0c:29:12:72:05" is the MAC address of the Nic

Cd / etc/udev/rules.d

Vi 70-persistent-net.rules # add

SUBSYSTEM== "net", ACTION== "add", DRIVERS== "? *", ATTR {address} = = "00:0c:29:12:72:05", ATTR {type} = = "1", KERNEL== "eth*", NAME= "eth0"

: wq! # Save exit

Shutdown-r now # restart the system

The network card has been changed to eth0

The above is all the contents of the article "sample Analysis of CentOS 8.0.1905 inux Server system installation and configuration". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report