Oracle Linux 7 修改 hostname
发表于:2024-10-22 作者:千家信息网编辑
千家信息网最后更新 2024年10月22日,Linux修改hostname的常用操作方法是--手工在/etc/sysconfig/network中追加"HOSTNAME=xxxxx"并重启系统,这个方法在Oracle Linux 7中是不生效的
千家信息网最后更新 2024年10月22日Oracle Linux 7 修改 hostnameLinux修改hostname的常用操作方法是--手工在/etc/sysconfig/network中追加"HOSTNAME=xxxxx"并重启系统,这个方法在Oracle Linux 7中是不生效的。
那么在Oracle Linux 7中怎么配置hostname?
来源于:
How to Configure hostname in Oracle Linux 7 (Doc ID 2049221.1)
解决方案:
请使用如下三种方法的任意一种来修改Oracle Linux 7中的主机名
1. use hostname control utility: hsotnamectl
2. use NetworkManager command line tool: nmcli
3. edit /etc/hostname file directly (a reboot afterwards is required)
Static hostname: localhost.localdomain
Operating System: Oracle Linux Server 7.1
CPE OS Name: cpe:/o:oracle:linux:7:1
Kernel: Linux 3.8.13-55.1.6.el7uek.x86_64
Architecture: x86_64
[root@localhost ~]#
Static hostname: oraclelinux.oracle.com
Operating System: Oracle Linux Server 7.1
CPE OS Name: cpe:/o:oracle:linux:7:1
Kernel: Linux 3.8.13-55.1.6.el7uek.x86_64
Architecture: x86_64
localhost.localdomain
[root@localhost ~]# systemctl restart systemd-hostnamed
oraclelinux.oracle.com
localhost.localdomain
[root@localhost ~]# cat /etc/hostname
oraclelinux.oracle.com
oraclelinux.oracle.com
那么在Oracle Linux 7中怎么配置hostname?
来源于:
How to Configure hostname in Oracle Linux 7 (Doc ID 2049221.1)
解决方案:
请使用如下三种方法的任意一种来修改Oracle Linux 7中的主机名
1. use hostname control utility: hsotnamectl
2. use NetworkManager command line tool: nmcli
3. edit /etc/hostname file directly (a reboot afterwards is required)
1. Use hsotnamectl which is a command-line client to systemd-hostnamed service
Get current hostname status:
Static hostname: localhost.localdomain
Operating System: Oracle Linux Server 7.1
CPE OS Name: cpe:/o:oracle:linux:7:1
Kernel: Linux 3.8.13-55.1.6.el7uek.x86_64
Architecture: x86_64
Set hostname:
[root@localhost ~]#
Re-login terminal session:
Static hostname: oraclelinux.oracle.com
Operating System: Oracle Linux Server 7.1
CPE OS Name: cpe:/o:oracle:linux:7:1
Kernel: Linux 3.8.13-55.1.6.el7uek.x86_64
Architecture: x86_64
2. nmcli
Check current hostname:
localhost.localdomain
Modify hostname and restart ystemd-hostnamed service:
[root@localhost ~]# systemctl restart systemd-hostnamed
Re-login terminal session:
oraclelinux.oracle.com
3. Edit /etc/hostname
View current content:
localhost.localdomain
Replace file content with new hostname:
[root@localhost ~]# cat /etc/hostname
oraclelinux.oracle.com
Restart system and verify:
oraclelinux.oracle.com
方法
主机
常用
手工
方案
来源
系统
解决方案
配置
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
软件开发的企业愿景
广东第七城网络技术
软件开发非科班生
内蒙古亨达海天网络技术
在关系数据库中集合运算有哪些
混凝土公司软件开发
quartz数据库设置
网络安全标准措施
信息网络安全包括几个方面
微信APP用什么软件开发
网络安全进校园校长欢迎辞
自我鉴定计算机网络技术
企业网络安全培训通讯稿
北斗导航网络技术
广州圣山网络技术有限公司
世界网络安全企业排名
数据库建设是什么专业
江西流畅网络技术有限公司
上海库存网络技术卖价
网络技术手抄报该写什么字
赌博软件开发抓到
dell服务器查看raid
mssm编写数据库
工业网络技术就业前景及待遇
数学数据库基础
战地5ea服务器连接中断为什么
服务器安全事件日志
常用数据库怎么设置
服务器上安装什么系统
软件开发测试工程师基本工资