User Tools

Site Tools


настройка_сети_в_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
настройка_сети_в_linux [2022/05/26 10:27]
val [Файлы конфигурации Ubuntu >= 18]
настройка_сети_в_linux [2022/05/26 11:35]
val [Файлы конфигурации Ubuntu >= 18]
Line 219: Line 219:
 === Отключение cloud-init === === Отключение cloud-init ===
 <​code>​ <​code>​
-cat /​etc/​cloud/​cloud.cfg 
-</​code><​code>​ 
-... 
-preserve_hostname:​ true 
-... 
-</​code><​code>​ 
-# hostnamectl set-hostname ubuntu.corpX.un 
- 
-Еще проще: 
- 
 # apt purge cloud-init # apt purge cloud-init
-</​code><​code>​ 
-# echo '​network:​ {config: disabled}'​ > /​etc/​cloud/​cloud.cfg.d/​99-disable-network-config.cfg 
- 
-ubuntu18# rm /​etc/​netplan/​50-cloud-init.yaml 
- 
-ubuntu20# rm /​etc/​netplan/​00-installer-config.yaml 
 </​code>​ </​code>​
  
Line 259: Line 243:
  
 # netplan apply # netplan apply
 +</​code>​ 
 +=== systemd-resolved === 
 +<​code>​
 # cat /​etc/​resolv.conf # cat /​etc/​resolv.conf
 </​code><​code>​ </​code><​code>​
Line 277: Line 263:
 <​code>​ <​code>​
 # apt install ifupdown net-tools # apt install ifupdown net-tools
 +
 +# echo '​network:​ {config: disabled}'​ > /​etc/​cloud/​cloud.cfg.d/​99-disable-network-config.cfg
 +
 +ubuntu18# rm /​etc/​netplan/​50-cloud-init.yaml
 +
 +ubuntu20# rm /​etc/​netplan/​00-installer-config.yaml
 </​code>​ </​code>​
  
Line 285: Line 277:
 # systemctl disable systemd-resolved.service # systemctl disable systemd-resolved.service
 # systemctl stop systemd-resolved # systemctl stop systemd-resolved
 +
 +# rm /​etc/​resolv.conf ​   # this is link
 </​code>​ </​code>​
 ==== Файлы конфигурации CentOS/​SL/​RHEL ==== ==== Файлы конфигурации CentOS/​SL/​RHEL ====
настройка_сети_в_linux.txt · Last modified: 2024/03/16 05:13 by val