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

Linux 7

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Echo westos | passwd-- stdin user name quickly create the user and give the password

Network connection nmcli connection show shows the connected network

Nmcli connection down device name stop connecting to this device

Nmcli connection up device name connects to this device

Configure files for ip

/ etc/sysconfig/network-scripts/ ip's file location is here to find the device and enter the change

Ifcfg- . . File name

File content

DEVICE=etho device name

BOOTPROTO=static | the protocol initiated by none boot protocol

The setting of ONBOOT=yes takes effect.

NAME=xxx connection name

IPADDR=xxx sets your ip

PREFIX=24 sets your network bits

Notice to restart the network systemctl restart network

Write set ip commands write content in / bin/set-ip then change permissions chmod + x / bin/set-ip and enter commands directly

Set-ip digit

Gateway: equivalent to mediation

1 / etc/sysconfig/network has a low priority in desktop

/ etc/sysconfig/network-scripts/ high priority to write ip in GATEWAY= network management in the same network segment as this machine.

2 same as above in server

3 both virtual machines must restart the network

4 and then ping

View the gateway: route-n

DNS

Files in / etc/hosts that manage the relationship between ip and domain names [priority is higher than domain name servers]

1 find the file in the settings dns / etc/sysconfig/network-scrpipts/ of the specified DNS server and set it in it

DNS1=** can set up to 3 permanent changes that must be restarted before the service takes effect.

2 in / etc/resolv. Conf will take effect without restarting the service.

Nameserver

Set local parsing and parsing priority files / etc/nsswitch.conf on the DNS server

#

# server Host Operation

1. Server must have an IP: 172.25.x.11/24

two。 Install dhcp software: yum install dhcp-y

3. View the configuration file of dhcp software: rpm-qc dhcp

4. Configure the dhcpd.conf file:

Cp/ usr/share/doc/dhcp-4.2.5/dhcpd.conf.example / etc/dhcp/dhcpd.conf

-delete the contents after 36 lines; dG

-Delete lines 27 and 28

`

1 option domain-name "westos.org"

2 option domain-name-servers 172.25.254.254

3 default-lease-time 600

4 max-lease-time 7200

5 log-facility local7

6 subnet 172.25.0.0 netmask 255.255.255.0 {

7 range 172.25.0.100 172.25.0.120

8 option routers 172.25.0.250

9}

`

5. Restart the dhcp service:

Systemctl start dhcpd

Systemctl status dhcpd

# # desktop Host Operation

Set the ip acquisition method to dhcp

# Management of virtual machines

Virt-manager # Open the virtual machine console

Virsh list # lists the running virtual machines

Virsh list-- all # lists all virtual machines

Virsh start virtual machine name # opens the specified virtual machine

Virsh shutdown virtual machine name # shut down the virtual machine normally

Virsh destroy virtual machine name # forcibly shut down the virtual machine

Virsh undefine Virtual Machine name # Delete virtual machines but do not delete disk files

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