Samba is a free software that implements the SMB protocol on Linux and UNIX systems, consisting of servers and client programs. SMB (Server Messages block, information service blocks) is a kind of communication protocol for sharing files and printers on LAN, which provides shared services of files and printers among different computers in LAN. The SMB protocol is a client/server protocol that allows clients to access shared file systems, printers, and other resources on the server. By setting up "NetBIOS over TCP/IP", Samba will not only share resources with local network hosts, but also share resources with computers around the world.
I. Installation of SAMBA services
1. Check to see if the Samba service is installed before installing: Rpm-q Samba
Confirm that no samba is installed, install Samba with yum-y
2. Modify the configuration file smb.conf:
Back up the following configuration files before modifying: Cp/etc/samba/smb.conf/etc/samba/smb.conf.bak
The simple configuration file is as follows:
[Global]
Workgroup = MyGroup
Server string = Samba Server Version%v
Log file =/var/log/samba/log.%m
Max log size = 50
Security = Share
Passdb backend = Tdbsam
Load printers = yes
Cups options = raw
[Temp]
Comment = Temporary file space
Path=/tmp
Read Only=no
Public=yes:
Guest OK = yes
Save and exit to share the Temp folder
Reverse selection of files using Grep-v
and ' | ' Pipe command, the output of the left side of the pipeline as input to the right
Grep-v ' # '/etc/samba/smb.conf.bak |grep-v '; ' >/etc/samba/smb.cfg
3. After the file is configured, restart the service:/ETC/INIT.D/SMB restart
You'll be able to access the shared file.
Linux Learning essay 7--linux setting up Samba server in the environment