“This is the 28th day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”
preface
Samba is a piece of free software that implements the SMB protocol on Linux and UNIX systems. It consists of server and client programs. Server Message Block (SMB) is a communication protocol for sharing files and printers on a LAN. SMB provides file and printer sharing services between different computers on a LAN. SMB is a client/server protocol that allows clients to access shared file systems, printers, and other resources on servers. Setting NetBIOS over TCP/IP enables Samba to share resources not only with LAN hosts, but also with computers around the world.
So how do you configure Samba?
Install Linux Samba
1. Configure the yum source
Since Samba is an additional feature of Linux that requires an image to be installed, mount the image and configure the yum source!
# Mount disk mirror
mount /dev/cdrom /mnt
# configure local yum
echo "[local]" >> /etc/yum.repos.d/local.repo
echo "name = local" >> /etc/yum.repos.d/local.repo
echo "baseurl = file:///mnt/" >> /etc/yum.repos.d/local.repo
echo "enabled = 1" >> /etc/yum.repos.d/local.repo
echo "gpgcheck = 0" >> /etc/yum.repos.d/local.repo
Copy the code
2. Disable the firewall
When configuring Samba, you are advised to disable the firewall and then enable the corresponding port.
Make sure the firewall is off and port 445 is open
systemctl stop firewalld
systemctl disable firewalld
Copy the code
Install the Samba package
Install samba software with yum:
# install samba
yum install samba -y
Copy the code
4. SMB configuration
Configure the Samba server as follows:
Editing an SMB configuration file:
cat <<EOF>>/etc/samba/smb.conf [Share] comment = Shared Folder path = /oradata/rmanbak public = yes writable = yes available = yes browseable = yes EOF
Copy the code
Add root to SMB server and set password oracle:
Smbpasswd -a root Password: OracleCopy the code
Reload the restart service:
service smb reload
service smb restart
service nmb restart
Copy the code
Note: Path is the path of the file to be shared.
5. Windows accesses the Samba server
Windows accessing the Samba server:
Local mapping driver: \\10.211.55.101\share root/oracleCopy the code
If you feel the article is helpful to you, like, collect, pay attention to, comment, one key four support, your support is the biggest power of my creation, technical exchange can add public number: Lucifer think before you act ~