完成目标:通过主机名访问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官网