om/2.修改主机名.md

23 lines
446 B
Markdown
Raw Normal View History

2023-09-19 10:11:14 -04:00
# 一网卡配置中修改(无效)
```shell
/etc/sysconfig/network-scripts/ifcfg-enp0s8
```
# 二网络配置中修改(无效)
```shell
cat /etc/sysconfig/network
```
# 三主机名
```shell
# 临时修改生效
hostname hy-node1
# 修改文件永久生效
vi /etc/hostname
# 绑定ip
vi /etc/hosts
192.168.1.116 hy-node1 hy-node1.com
192.168.1.117 hy-node2
192.168.1.118 hy-node3
192.168.1.119 hy-node4 harbor
192.168.1.120 hy-node5
```