Basic Environment Installation
Yum Install python-devel gnutls-devel libacl-devel openldap-devel
Samba compilation Installation
TarZXF Samba-latest.Tar. GZCD Samba-4.4.3./Configure Make&& Make Install# Once the installation is complete, you need to copy a configuration fileCP/tmp/samba-4.4.3/examples/smb.conf.default/usr/local/samba/etc/CD/usr/local/samba/etc/grep-V"^#"Smb.conf.default |grep-V"^;"|sed '/^$/d'> smb.conf
Samba configuration file Configuration
vim/usr/local/samba/etc/Smb.conf[global] Workgroup=WORKGROUP Serverstring=King of Samba server role=Standalone server logfile=/usr/local/samba/var/log.%m hosts allow=192.168.0.0/255.255.255.0# Specify Samba allows host max log size= -DNS proxy=No max connections= -# Set the maximum number of samba connections, mainly to prevent too much i/o affects system security=User # Only allow username password login to samba encrypt passwords=Yes # encrypt password [war_bak] Comment=Samba admin browseable=Yes path=/data/smb/War_bak # Specifies the shared login directory writable=Yes # whether to allow write #admin users=Eason Valid Users=Eason # Authorized User Public=No # Anonymous access create mask=0770# Create File permissions directory mask=0770# Create folder permissions
Configuring Shared Directories
mkdir -p/data/smb/war_bak
Configure startup
# start /usr/local/samba/sbin/nmbd-D/usr/local/samba/sbin/smbd--9/etc/ rc.local ... /USR/LOCAL/SAMBA/SBIN/NMBD-D/usr/local/samba/sbin/smbd-d
Configure Samba users
Useradd-s/sbin/nologin Eason # Create a system user /usr/local/samba/bin/smbpasswd-a Eason # Add Eason User /usr/local/samba/bin/smbpasswd-e Eason # in SMB to enable the SMB user
Test:
/usr/local/samba/bin/testparm
Finally, we can map samba to the Windows disk
Right-click on "Computer"-"Map Network Drive"
Samba compilation installation (Simplified)