7 centos 源码安装samba_centos 7 安装 samba 服务
在centos 7 中安裝 samba 服務
1.samba軟件安裝:yum?-y?install?samba*
2.查看安裝好的samba服務的和客戶端及工具[root@localhost?~]#?rpm?-qa|grep?samba
samba-winbind-modules-4.4.4-14.el7_3.x86_64
samba-test-libs-4.4.4-14.el7_3.x86_64
samba-dc-4.4.4-14.el7_3.x86_64
samba-winbind-clients-4.4.4-14.el7_3.x86_64
samba-common-4.4.4-14.el7_3.noarch
samba-common-libs-4.4.4-14.el7_3.x86_64
samba-libs-4.4.4-14.el7_3.x86_64
samba-4.4.4-14.el7_3.x86_64
samba-dc-libs-4.4.4-14.el7_3.x86_64
samba-winbind-4.4.4-14.el7_3.x86_64
samba-python-4.4.4-14.el7_3.x86_64
samba-pidl-4.4.4-14.el7_3.noarch
samba-devel-4.4.4-14.el7_3.x86_64
samba-winbind-krb5-locator-4.4.4-14.el7_3.x86_64
samba-krb5-printing-4.4.4-14.el7_3.x86_64
samba-client-libs-4.4.4-14.el7_3.x86_64
samba-common-tools-4.4.4-14.el7_3.x86_64
samba-client-4.4.4-14.el7_3.x86_64
samba-test-4.4.4-14.el7_3.x86_64
samba-vfs-glusterfs-4.4.4-14.el7_3.x86_64
3.啟動samba服務:service?smb?restart
4.設置開機啟動samba服務chkconfig?smb?on
5.創建系統用戶給samba用useradd?-G?samba?-M?smb
6.備份并編輯samba的配置文件cd?/etc/samba/
cp?smb.conf?smb.conf.bak
7.創建samba用戶,用戶名需要時剛才建立的系統用戶smbpasswd?-a?smb
#提示設置密碼
8.配置samba的配置文件,在配置文件中指定用戶和權限vim?/etc/samba/smb.conf
#在配置文件末尾添加下面的代碼
[samba]
comment?=?samba?test????#說明
path?=?/mnt/samba??????#samba服務的路徑,文件存放目錄
write?list?=?smb???????#用戶
create?mask?=?0664??????#文件創建權限
directory?mask?=?0775?????#目錄權限
9.重啟samba(systemctl restart smb),測試samba(testparm),進行客戶端登錄(smbclient -L localhost -U smb)systemctl?restart?smb
testparm
[root@localhost?samba]#?smbclient?-L?localhost?-U?smb
Enter?smb's?password:
Domain=[WORKGROUP]?OS=[Windows?6.1]?Server=[Samba?4.4.4]
Sharename???????Type??????Comment
---------???????----??????-------
print$??????????Disk??????Printer?Drivers
samba???????????Disk??????samba?test
IPC$????????????IPC???????IPC?Service?(Samba?4.4.4)
smb?????????????Disk??????Home?Directories
Domain=[WORKGROUP]?OS=[Windows?6.1]?Server=[Samba?4.4.4]
Server???????????????Comment
---------????????????-------
Workgroup????????????Master
---------????????????-------
[root@localhost?samba]#
10.配置完成,windows可以通過運行中? \\IP 方式訪問了。
其他操作
1.檢查samba是否在運行ps?-ef?|?grep?smb
2.查看samba運行端口netstat?-tplnu?|?grep?smb
總結
以上是生活随笔為你收集整理的7 centos 源码安装samba_centos 7 安装 samba 服务的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 大数据python试卷_大数据起步--P
- 下一篇: c6011取消对null指针的引用_C+