麒麟KYLINOS禁用IPV6地址

原文链接:麒麟KYLINOS操作系统上禁用IPv6的方法
hello,大家好啊!今天我要给大家介绍的是在麒麟KYLINOS操作系统上禁用IPv6的方法。IPv6是最新的网络通信协议,旨在解决IPv4地址耗尽的问题。然而,在某些特定的网络环境或测试场景中,可能需要禁用IPv6以确保兼容性或满足其他需求。本文将介绍通过图形化界面、修改配置文件、命令行添加禁用IPv6等三种方式来实现这一目的。让我们开始吧!

注意事项

  • 在进行任何系统配置更改之前,请确保您了解这些更改的影响,并考虑备份相关配置文件。
  • 禁用IPv6可能会影响您的网络连接和某些依赖IPv6的应用程序或服务。
  • 如果您不确定是否需要禁用IPv6,请咨询您的网络管理员或技术支持团队。

1.查看系统信息

pdsyw@pdsyw-pc:~/Desktop$ cat /etc/os-release 
NAME="Kylin"
VERSION="银河麒麟桌面操作系统V10 (SP1)"
VERSION_US="Kylin Linux Desktop V10 (SP1)"
ID=kylin
ID_LIKE=debian
PRETTY_NAME="Kylin V10 SP1"
VERSION_ID="v10"
HOME_URL="http://www.kylinos.cn/"
SUPPORT_URL="http://www.kylinos.cn/support/technology.html"
BUG_REPORT_URL="http://www.kylinos.cn/"
PRIVACY_POLICY_URL="http://www.kylinos.cn"
VERSION_CODENAME=kylin
UBUNTU_CODENAME=kylin
PROJECT_CODENAME=V10SP1
KYLIN_RELEASE_ID="2303"
pdsyw@pdsyw-pc:~/Desktop$ 
pdsyw@pdsyw-pc:~/Desktop$ uname -a
Linux pdsyw-pc 4.19.71-30-kr990 #27b1-KYLINOS SMP PREEMPT Thu Jun 8 05:57:15 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
pdsyw@pdsyw-pc:~/Desktop$ 

08.png

2.ping百度后发现默认使用ipv6地址

pdsyw@pdsyw-pc:~/Desktop$ ping www.baidu.com
PING www.baidu.com(240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f)) 56 data bytes
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=1 ttl=52 time=26.3 ms
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=2 ttl=52 time=20.1 ms
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=3 ttl=52 time=22.9 ms
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=4 ttl=52 time=31.7 ms
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=5 ttl=52 time=22.5 ms
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=6 ttl=52 time=24.7 ms
64 bytes from 240e:e9:6002:15c:0:ff:b015:146f (240e:e9:6002:15c:0:ff:b015:146f): icmp_seq=7 ttl=52 time=27.7 ms
^C
--- www.baidu.com ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6008ms
rtt min/avg/max/mdev = 20.101/25.109/31.654/3.543 ms
pdsyw@pdsyw-pc:~/Desktop$ 

02.png

3.查看ip地址信息,发现已经默认配置了ipv6地址

pdsyw@pdsyw-pc:~/Desktop$ ifconfig 
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:45:2d:b1:1a:c9  txqueuelen 1000  (以太网)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 88  base 0xd000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (本地环回)
        RX packets 1019  bytes 61491 (61.4 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1019  bytes 61491 (61.4 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.149  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::1c87:9127:d39d:64cd  prefixlen 64  scopeid 0x20<link>
        inet6 240e:46c:8900:ca55:7958:d22b:b4a8:b895  prefixlen 64  scopeid 0x0<global>
        inet6 240e:46c:8900:ca55:b269:ce29:45fa:572b  prefixlen 64  scopeid 0x0<global>
        ether 74:45:2d:b1:51:a3  txqueuelen 1000  (以太网)
        RX packets 61819  bytes 84649969 (84.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12685  bytes 1005292 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

pdsyw@pdsyw-pc:~/Desktop$ 

01.png

方法一:图形化禁用
1.查看无线局域网
01.png

2.点击高级设置
02.png

3.选择当前连接的WiFi,点击设置
03.png

4.点击ipv6设置
04.png

5.方法选择已禁用,点击保存
05.png

6.再次查看ip地址,已经没有ipv6地址

root@pdsyw-pc:~# ifconfig 
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:45:2d:b1:1a:c9  txqueuelen 1000  (以太网)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 88  base 0xd000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (本地环回)
        RX packets 1237  bytes 73613 (73.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1237  bytes 73613 (73.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.149  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 74:45:2d:b1:51:a3  txqueuelen 1000  (以太网)
        RX packets 62122  bytes 84675309 (84.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12979  bytes 1027188 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@pdsyw-pc:~# 

[外链图片转存中…(img-5OWRvxE6-1704701360906)]

7.再次ping百度,默认使用ipv4地址

pdsyw@pdsyw-pc:~/Desktop$ ping www.baidu.com
PING www.a.shifen.com (180.101.50.188) 56(84) bytes of data.
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=1 ttl=50 time=24.5 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=2 ttl=50 time=84.5 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=3 ttl=50 time=114 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=4 ttl=50 time=51.8 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=5 ttl=50 time=121 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=6 ttl=50 time=79.7 ms
^C
--- www.a.shifen.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 24.546/79.156/120.706/33.358 ms
pdsyw@pdsyw-pc:~/Desktop$ 

12.png

方法二:编辑配置文件
1.修改sysctl.conf,添加禁用ipv6的内容

pdsyw@pdsyw-pc:~/Desktop$ sudo -i
输入密码
root@pdsyw-pc:~# 
root@pdsyw-pc:~# vim /etc/sysctl.conf 
root@pdsyw-pc:~# 
root@pdsyw-pc:~# cat /etc/sysctl.conf 
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438
#add by jianglinxuan
fs.file-max = 6553500
#kernel.core_pattern = /tmp/core-%p-%e-%t
net.core.netdev_budget_usecs=6000
net.ipv4.ipfrag_high_thresh=335544320
net.ipv4.ipfrag_time=10
net.core.netdev_budget_usecs=6000
net.ipv4.ipfrag_high_thresh=335544320
net.ipv4.ipfrag_time=10
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
root@pdsyw-pc:~# 

03.png
04.png
02.png

2.刷新配置,使配置生效

root@pdsyw-pc:~# sysctl -p /etc/sysctl.conf 
fs.file-max = 6553500
net.core.netdev_budget_usecs = 6000
net.ipv4.ipfrag_high_thresh = 335544320
net.ipv4.ipfrag_time = 10
net.core.netdev_budget_usecs = 6000
net.ipv4.ipfrag_high_thresh = 335544320
net.ipv4.ipfrag_time = 10
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
root@pdsyw-pc:~# 

05.png

3.再次查看ip地址,已经没有ipv6地址

root@pdsyw-pc:~# ifconfig 
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:45:2d:b1:1a:c9  txqueuelen 1000  (以太网)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 88  base 0xd000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (本地环回)
        RX packets 1237  bytes 73613 (73.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1237  bytes 73613 (73.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.149  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 74:45:2d:b1:51:a3  txqueuelen 1000  (以太网)
        RX packets 62122  bytes 84675309 (84.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12979  bytes 1027188 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@pdsyw-pc:~# 

[外链图片转存中…(img-nGenCVXc-1704701360908)]

4.再次ping百度,默认使用ipv4地址

pdsyw@pdsyw-pc:~/Desktop$ ping www.baidu.com
PING www.a.shifen.com (180.101.50.188) 56(84) bytes of data.
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=1 ttl=50 time=24.5 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=2 ttl=50 time=84.5 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=3 ttl=50 time=114 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=4 ttl=50 time=51.8 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=5 ttl=50 time=121 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=6 ttl=50 time=79.7 ms
^C
--- www.a.shifen.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 24.546/79.156/120.706/33.358 ms
pdsyw@pdsyw-pc:~/Desktop$ 

12.png

方法三:通过命令行修改
1.通过sed添加禁用ipv6的内容

pdsyw@pdsyw-pc:~/Desktop$ sudo sed -i '$anet.ipv6.conf.all.disable_ipv6 = 1' /etc/sysctl.conf 
输入密码
pdsyw@pdsyw-pc:~/Desktop$ 
pdsyw@pdsyw-pc:~/Desktop$ sudo sed -i '$anet.ipv6.conf.default.disable_ipv6 = 1' /etc/sysctl.conf 
pdsyw@pdsyw-pc:~/Desktop$ 

07.png

2.查看sysctl.conf已经添加完成

pdsyw@pdsyw-pc:~/Desktop$ cat /etc/sysctl.conf 
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438
#add by jianglinxuan
fs.file-max = 6553500
#kernel.core_pattern = /tmp/core-%p-%e-%t
net.core.netdev_budget_usecs=6000
net.ipv4.ipfrag_high_thresh=335544320
net.ipv4.ipfrag_time=10
net.core.netdev_budget_usecs=6000
net.ipv4.ipfrag_high_thresh=335544320
net.ipv4.ipfrag_time=10
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
pdsyw@pdsyw-pc:~/Desktop$ 

08.png
09.png

3.刷新配置,使配置生效

pdsyw@pdsyw-pc:~/Desktop$ sudo sysctl -p /etc/sysctl.conf 
fs.file-max = 6553500
net.core.netdev_budget_usecs = 6000
net.ipv4.ipfrag_high_thresh = 335544320
net.ipv4.ipfrag_time = 10
net.core.netdev_budget_usecs = 6000
net.ipv4.ipfrag_high_thresh = 335544320
net.ipv4.ipfrag_time = 10
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
pdsyw@pdsyw-pc:~/Desktop$ 

10.png

4.再次查看ip地址,已经没有ipv6地址

root@pdsyw-pc:~# ifconfig 
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 74:45:2d:b1:1a:c9  txqueuelen 1000  (以太网)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 88  base 0xd000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (本地环回)
        RX packets 1237  bytes 73613 (73.6 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1237  bytes 73613 (73.6 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.149  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 74:45:2d:b1:51:a3  txqueuelen 1000  (以太网)
        RX packets 62122  bytes 84675309 (84.6 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12979  bytes 1027188 (1.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@pdsyw-pc:~# 

11.png

5.再次ping百度,默认使用ipv4地址

pdsyw@pdsyw-pc:~/Desktop$ ping www.baidu.com
PING www.a.shifen.com (180.101.50.188) 56(84) bytes of data.
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=1 ttl=50 time=24.5 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=2 ttl=50 time=84.5 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=3 ttl=50 time=114 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=4 ttl=50 time=51.8 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=5 ttl=50 time=121 ms
64 bytes from 180.101.50.188 (180.101.50.188): icmp_seq=6 ttl=50 time=79.7 ms
^C
--- www.a.shifen.com ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5007ms
rtt min/avg/max/mdev = 24.546/79.156/120.706/33.358 ms
pdsyw@pdsyw-pc:~/Desktop$ 

12.png

通过在麒麟KYLINOS上禁用IPv6,您可以根据特定的网络需求或测试要求调整系统配置。无论是通过图形化界面、修改配置文件还是命令行,每种方法都有其适用场景。希望这篇文章能帮助到需要在麒麟KYLINOS上禁用IPv6的朋友们。如果你有任何问题或者更多的经验分享,请在评论区留言,我们一起讨论。
最后,如果你觉得这篇文章有用,请分享转发。点个关注和在看吧,让我们一起探索和学习更多关于Linux系统管理和网络配置的知识!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:/a/301916.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

MYSQL 索引使用规则

索引失效 最左前缀法则 where之后写的顺序不重要&#xff0c;存在就可以 范围查询后面的索引查询失效&#xff08;比如>&#xff09;,但是>或者<是不会失效的 不要在索引列上进行运算操作&#xff0c;否则索引失效。 字符串类型字段不加引号索引会失效 尾部模糊匹配…

ThreadLocalRandom类原理剖析

ThreadLocalRandom 类是JDK7在JUC包下新增的随机数生成器&#xff0c;它弥补了Random类在多线程下的缺陷。 Random 类及其局限性 在JDK7之前包括现在&#xff0c;java.util.Random都是使用比较广泛的随机数生成工具类&#xff0c;而且java.lang.Math中的随机数生成也使用的是…

网安面试三十到题(结束)

121 有文件上传了漏洞了&#xff0c;linux下怎么找xx.conf的文件 目录遍历,目录扫描 122 反序列化漏洞原理 ## 你要把别人序列化好的文件进行反序列化进行利用&#xff0c;但是在序列化的过程中&#xff0c;被别人注入了攻击代码、魔 法函数之类的&#xff0c;当你反序列化的时…

花为缘积萨伯爵名表工艺之美,传承卓越

腕表是时间的载体&#xff0c;也是品味的象征。在现代人眼中&#xff0c;它们不仅仅是时间的工具&#xff0c;更是一种艺术形式。在制表工艺的殿堂中&#xff0c;花为缘积萨伯爵名表以其独特的创造力和严谨缜密的要求&#xff0c;创作了一系列典范之作&#xff0c;将技术与美学…

伦敦银1盎司等于多少克?

1盎司的伦敦银大概等于31克&#xff0c;用于衡量伦敦银重量的“盎司”&#xff0c;是国际贵金属市场上专用的计量单位&#xff0c;它的全称是金衡盎司&#xff0c;英文的名字是troy ounce&#xff0c;它与西方日常用于计算重量的单位常衡盎司也不一样&#xff0c;一金衡盎司约等…

DTM分布式事务

DTM分布式事务 从内网看到了关于事务在业务中的讨论&#xff0c;评论区大佬有提及DTM开源项目[https://dtm.pub/]&#xff0c;开学开学 基础理论 一、Why DTM ​ 项目产生于实际生产中的问题&#xff0c;涉及订单支付的服务会将所有业务相关逻辑放到一个大的本地事务&#xff…

【性能测试入门】:压力测试概念!

压力测试可以验证软件应用程序的稳定性和可靠性。压力测试的目标是评估软件在极端负载条件下的鲁棒性和错误处理能力&#xff0c;并确保软件在紧急情况下不会崩溃。它甚至可以进行超出软件正常工作条件的测试&#xff0c;并评估软件在极端条件下的工作方式。 在软件工程中&…

简单介绍Java 的内存泄漏

java最明显的一个优势就是它的内存管理机制。你只需简单创建对象&#xff0c;java的垃圾回收机制负责分配和释放内存。然而情况并不像想像的那么简单&#xff0c;因为在Java应用中经常发生内存泄漏。 本教程演示了什么是内存泄漏&#xff0c;为什么会发生内存泄漏以及如何预防…

2024年第十届计算机与技术应用国际会议(ICCTA 2024)即将召开!

​ ​ 2024年第十届计算机与技术应用国际会议&#xff08;ICCTA 2024&#xff09; 会议时间&#xff1a;2024年5月15-17日 会议地点&#xff1a;奥地利维也纳 (线上线下会议) 会议官网&#xff1a; Home_ICCTA 2024 | Vienna, Austria 组织单位&#xff1a; 奥地利FH JOANN…

狂拿offer,这12道性能测试面试题你会多少?不要再被挖坑了

目录&#xff1a;导读 前言一、Python编程入门到精通二、接口自动化项目实战三、Web自动化项目实战四、App自动化项目实战五、一线大厂简历六、测试开发DevOps体系七、常用自动化测试工具八、JMeter性能测试九、总结&#xff08;尾部小惊喜&#xff09; 前言 1、性能测试包含了…

NFS 共享存储实验

一、服务器部署 第一步、安装nfs和rpcbind包 [rootserver ~]# yum install -y nfs-utils rpcbind截图&#xff1a; 第二步、这里选择一个 lvm 挂载点做 NFS 共享目录 [rootserver ~]# df -HT截图&#xff1a; 第三步、修改配置文件 [rootserver ~]# vi /etc/exports /home …

2024农历新年是什么时候?电脑如何设置农历新年提醒

元旦的钟声已经远去&#xff0c;2024年的阳历新年就这样悄无声息地开始了。但对于我们很多人来说&#xff0c;真正的“过年”氛围&#xff0c;还得等到农历新年的到来。那么&#xff0c;今年的农历新年究竟是什么时候呢&#xff1f;答案是2月10日。 每当想到农历新年&#xff…

【docker笔记】Docker容器数据卷

Docker容器数据卷 卷就是目录或者文件&#xff0c;存在于一个或多个容器中&#xff0c;由docker挂载到容器&#xff0c;但不属于联合文件系统&#xff0c;因此能够绕过Union File System提供一些用于持续存储或共享数据的特性 卷的设计目的就是数据的持久化&#xff0c;完全独…

Element-Puls Form表单内嵌套el-table表格,根据表格复选框多选或单选动态设置行的验证规则

需求 根据 Table 表格内的复选框来控制当前选中行是否添加必填校验规则 效果图 实现思想 我们需要设置一个 flag 来标识已勾选的行&#xff0c;el-table渲染数据结构是数组对象形式&#xff0c;我们可以在每个对象中手动加如一个标识&#xff0c;例如默认&#xff1a;selected …

密码输入检测 - 华为OD统一考试

OD统一考试&#xff08;C卷&#xff09; 分值&#xff1a; 100分 题解&#xff1a; Java / Python / C 题目描述 给定用户密码输入流input&#xff0c;输入流中字符 ‘<’ 表示退格&#xff0c;可以清除前一个输入的字符&#xff0c;请你编写程序&#xff0c;输出最终得到的…

fpmarkets盘点成功交易者的十个习惯(一)

在交易中能够盈利一次&#xff0c;fpmarkets认为这种情况100%的交易者都会做到&#xff0c;但是要做到每次交易都能盈利&#xff0c;即使是巴菲特也做到&#xff0c;我们只需要做到整体盈利就可以了&#xff0c;那么如何做到呢&#xff1f;今天fpmarkets就总结一下成功交易者的…

代码随想录算法训练营Day08|344.反转字符串、541. 反转字符串II、卡码网:替换数字、151.翻转字符串里的单词、卡码网:右旋字符串

文章目录 一、344.反转字符串1. 双指针法 二、541. 反转字符串II1. 字符串解法 三、卡码网&#xff1a;替换数字四、151.翻转字符串里的单词1.使用库函数2.自行编写函数3.创建字符数组填充3.双反转移位 五、卡码网&#xff1a;右旋字符串1. 自行编写函数 总结 一、344.反转字符…

【软件测试】白盒测试 / 逻辑覆盖法

《语句覆盖法》 使程序中的每个可执行语句至少执行一次 所有的可执行语句得到执行语句覆盖测试是较弱的一种测试发现错误能力最弱的逻辑覆盖 《判定覆盖法》 使每一个判定获得每一种可能的结果至少一次 每个判定得到真值和假值判断覆盖法满足了语句覆盖&#xff0c;因此比语…

【AI视野·今日Sound 声学论文速览 第四十期】Wed, 3 Jan 2024

AI视野今日CS.Sound 声学论文速览 Wed, 3 Jan 2024 Totally 4 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Sound Papers Auffusion: Leveraging the Power of Diffusion and Large Language Models for Text-to-Audio Generation Authors Jinlong Xue, Yayue De…

十一、工具盒类(MyQQ)(Qt5 GUI系列)

目录 ​编辑 一、设计需求 二、实现代码 三、代码解析 四、总结 一、设计需求 抽屉效果是软件界面设计中的一种常用形式&#xff0c;可以以一种动态直观的方式在有限大小的界面上扩展出更多的功能。本例要求实现类似 QQ 抽屉效果。 二、实现代码 #include "dialog.…