In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install Samba on Linux system, which has certain reference value. Interested friends can refer to it. I hope you will have a lot of gains after reading this article. Let Xiaobian take you to understand it together.
Samba is a free software that implements SMB protocol on Linux and UNIX systems. It consists of server and client programs.
Samba is mainly used to achieve file sharing between Linux and Windows.
Samba is based on NetBios protocol, each samba host must have a unique NetBios Name, samba hosts communicate with each other through this NetBios Name;
Samba service starts at least two services, nmbd and smbd. nmbd is mainly used for NetBios Name resolution, and then all other operations are managed by smbd service.
Nmbd service uses UDP protocol, listening on ports 137 and 138, smbd service uses TCP protocol, listening on port 139;
Samba uses TDB database format;samba service also has the function that different samba users will get different data when accessing samba.
Second, Linux system installation Samba detailed steps: 1. Install Samba server:
yum install -y samba
2. backup configuration file
cp /etc/samba/smb.conf /etc/samba/smb.conf.bak
3. profile
vi /etc/samba/smb.conf
4. Change the users and groups to which a file belongs
The shared directories are: /tmp/samba and/tmp/sam shared directories
Set shared directory permissions: chown -R nobody:nobody /tmp/samba
chown -R nobody:nobody /tmp/sam
5. Start samba service. Please configure firewall and selinux for starter.
(Note: Refer to wjlkoorey's blog post link for the following comments: blog.chinaunix.net/uid-23069658-id-3142052.html
On the subject of iptables:
Ordinary youth: knock directly on the command line…
service iptables stop。
Literary youth: knock on the command line in turn…
iptables -I RH-Firewall-1-INPUT 5 -m state –state NEW -m tcp -p tcp –dport 139 -j ACCEPT
iptables -I RH-Firewall-1-INPUT 5 -m state –state NEW -m tcp -p tcp –dport 445 -j ACCEPT
iptables -I RH-Firewall-1-INPUT 5 -p udp -m udp –dport 137 -j ACCEPT
iptables -I RH-Firewall-1-INPUT 5 -p udp -m udp –dport 138-j ACCEPT
iptables-save
service iptables restart
Also, on the question of selinux: (This guy has screwed me badly)
Ordinary youth: knock directly on the command line…
setenforce 0
vi /etc/selinux/config
Change SELINUX=enforcing to SELINUX=disabled to save time by not executing setenfore after booting and restarting.
Literary youth: knock on the command line in turn…
setsebool -Psamba_enable_home_dirs on
setsebool -Psamba_export_all_rw on
After that: getsebool -a| Grep Samba, you know...
/etc/init.d/smb restart(start)
6. Set to self-start
chkconfig smb on
7. Test success
Linux: Enter the command # testparm to appear similar to the following figure;
window: Enter\192.168.1.3(the IP address of the server you configured) in the resource path column to see the file you created.
Thank you for reading this article carefully. I hope that the article "How to Install Samba on Linux System" shared by Xiaobian will be helpful to everyone. At the same time, I hope that everyone will support it a lot and pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.