Technology Sharing

Centos9 installation deployment and static ip configuration solution

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

1. Get the iso image of centos9

Go to the official website

Click download

Official Website

insert image description here

Click x86 and download centos9

insert image description here

insert image description here

insert image description here

2. Create a virtual machine

1. Click Create a new virtual machine

insert image description here

2. Select Custom Next

insert image description here

3. Click Next

insert image description here

4. Choose to install the operating system later

Click Next

insert image description here

5. Choose Linux

Select the centos version to install. Select centos7 here.
insert image description here

6. Set the virtual machine name and installation location

insert image description here

7. Configure the processor and use the default 1 processor 1 core

insert image description here

8. Change the virtual machine memory to 2048MB

insert image description here

9. Select the virtual machine network type, the default NAT is OK

insert image description here

10. IO operator takes the default path and click Next.

insert image description here

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

insert image description here

12. Click Finish to complete the installation of the virtual machine.

insert image description here

3. CentOS system configuration

1. Edit the virtual machine
insert image description here

2. Set up iso image file
insert image description here

3. Open the virtual machine to install the system
insert image description here

4. Press the up and down keys on the keyboard to select the first enter
If the keyboard cannot be operated, press ctrl + alt and then operate the keyboard
insert image description here

5. Step 5: After waiting for a while, the welcome to CENTOS 9 interface will pop up. Select Chinese, Simplified Chinese (China), and click Continue

insert image description here

6. On the installation information summary interface, click Software Installation to enter the software selection interface

insert image description here

7. On the software selection interface, select Server with GUI on the left, check Development Tools on the right, click Finish, and return to the installation information summary interface.

insert image description here

8. Enter the disk configuration page and click Done directly. No other changes are required. Just confirm to use automatic partitioning.

insert image description here

insert image description here

9. Click Network Configuration

insert image description here

insert image description here

10. Click User to set root password

insert image description here

insert image description here

11. Click to start installation
insert image description here

Wait for the progress bar to fill up
insert image description here

12. When the progress bar is full, it means the installation is complete. A restart button will appear in the lower right corner. Click Restart.

insert image description here

13. After restarting, click Start Settings

insert image description here

insert image description here

insert image description here

4. Configure static IP

No network, no internet connection

Go directly to edit

Note: switch to root account

vim /etc/sysconfig/network-scripts/ifcfg-ens33

Set the network mode to net mode

TYPE=Ethernet
BOOTPROTO=static
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.229.9
NETMASK=255.255.255.0
GATEWAY=192.168.229.2
DNS1=8.8.8.8
DNS2=114.114.114.114

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

Restart the network:

systemctl restart NetworkManager
  • 1

Turn off the firewall:

# systemctl stop firewalld
# systemctl disable firewalld

  • 1
  • 2
  • 3

Turn off selinux

setenforce 0


vim /etc/selinux/config 

SELINUX=disabled
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

5. Set to allow root remote login

#vim /etc/ssh/sshd_config
PermitRootLogin yes


#systemctl restart sshd

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

insert image description here

Snapshot Saving