通过主机名访问Linux主机

本文介绍了如何在CentOS7环境下通过主机名访问Linux主机的方法。主要包括安装samba、启动和配置服务,以及通过iptables进行相关设置。文章还概述了samba的功能和服务,包括其作为域控制器的能力。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

完成目标:通过主机名访问Linux主机

测试环境:CentOS 7

1,安装samba: yum install samba;

2,启动服务:

sudo systemctl start nmb //启动服务

sudo systemctl status nmb //查看状态

sudo systemctl enable nmb//开机自启动

3,执行iptables  -F


完成以上步骤后,运行命令:ping 主机名(如 ping centos-server, centos-server为我局域网的一主机名),即可ping通。


总结:这里主要用到samba提供的domain controller服务。samba简介如下:

Samba is the standard Windows interoperability suite of programs for Linux and Unix.
Samba is Free Software licensed under the GNU General Public License, the Samba project is a member of the Software Freedom Conservancy.
Since 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.
Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments. It can function both as a domain controller or as a regular domain member.

访问Samba:Samba官网



评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值