In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Environment:
CentOS release 6.8 (Final)
Microsoft Windows XP [version 5.1.2600]
1. Windows is the server side, and Centos mounts the samba service for the client
1. Share the samba folder
2. Whether local test sharing is enabled
3. Centos installs the software required by the client
Yum list | grep samba | wc-l # View the number of installation packages related to the samba keyword in the yum source yum install samba-client samba-common samba-winbind-y # the above three packages are necessary for centos as the client # samba-winbind is mainly used in conjunction with the domain in windows to use yum install cifs-utils.x86_64-y # which is the protocol for communication between samba
4. Check the IP address of windows
Win+R== > > cmd== > > ipconfig
5. Centos views and mounts the samba shared directory
Smbclient-L / / 192.168.199.238-U test#test means the user, because it has been set up in windows before, so the redundant operation of windows is not done. #-L--listsmbclient / / 192.168.199.238/ts-U testsmb:\ > lsexitdf-hFilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_kvm-lv_root 50G 5.4G 42G 12% / tmpfs 491m 72K 491m 1% / dev/shm/dev/sda1 477M 35M 418m 8% / boot/dev/mapper/vg _ kvm-lv_home 441G 71m 418G 1% / home# View the shared directory mount-t cifs-o username=test where samba is not currently mounted Password=123 / / 192.168.199.238/ts / mnt/# mounts the ts directory to / mnt Note that it is not recommended to directly use password unsafe df-hFilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_kvm-lv_root 50G 5.4G 42G 12% / tmpfs 491m 72K 491m 1% / dev/shm/dev/sda1 477M 35M 418m 8% / boot/dev/mapper/vg_kvm-lv_home 441G 71m 418G 1% / home//192.168.199.238/ts 40G 1.8G 39G 5% / mntll / mnt/# View shared content
6. Summary
As a client, samba must have several packages: samba-common, samba-client, cifs-utils.
Samba services generally have two versions of samba services in the yum source of centos6.8, one is version 3 and the other is version 4, do not conflict, if there is a conflict, the protocols may conflict, which may seriously lead to the normal use of samba.
It is not recommended to mount directly-o plus password when mounting, because safety comes first.
The sharename viewed by smbclient-L is the name used when mounting, not when creating the shared directory.
2. Centos as the server side
1. Build a samba server with Centos
Yum install samba-ycp / etc/samba/smb.conf / etc/samba/smb.conf.backupegrep-v "# |;" smb.conf.backup > smb.confsed-I'/ ^ [[: space:]] * $/ d' smb.confvim smb.conf# add content [smbone] comment=smbone path=/smbone writable=yes write list=@smbservice iptables stopuseradd smbsmbpasswd-a smbmkdir / smbonechown-R smb.smb / smboneservice smb start & & service nmb startnetstat-ntpul | grep smb
# the above simple samba server has been built.
Summary:
To set up samba service, be sure to turn off selinux and iptables, otherwise it is easy to make mistakes.
If you want to know more, be sure to summarize the smb.conf file.
The user added by smbpass must exist locally, but the password file is not local
When creating a shared directory, you must pay attention to the local permissions and owners.
2. Windows test
3. Use Centos to test
Yum install samba-client samba-common cifs-utils-ysmbclient-L / / 192.168.199.128-U smbsmbclient / / 192.168.199.128/smbone-U smblsexitdf-hmount-t cifs- o username=smb,password=123 / / 192.168.199.128/smbone / mnt/
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.