{"id":2780,"date":"2018-03-20T15:16:51","date_gmt":"2018-03-20T07:16:51","guid":{"rendered":"http:\/\/liyue.name\/blog\/?p=2780"},"modified":"2026-02-10T22:00:16","modified_gmt":"2026-02-10T14:00:16","slug":"centos7%e5%ae%89%e8%a3%85samba%ef%bc%88%e5%bf%ab%e9%80%9f%e5%90%af%e7%94%a8%ef%bc%89","status":"publish","type":"post","link":"https:\/\/liyue.name\/?p=2780","title":{"rendered":"CentOS7\u5b89\u88c5Samba\uff08\u5feb\u901f\u5b89\u88c5\uff09"},"content":{"rendered":"<p>\u7f51\u4e0a\u7684\u8d44\u6599\u914d\u7f6e\u8d77\u6765\u592a\u590d\u6742\u4e86\uff0c\u5982\u679c\u4f60\u53ea\u662f\u8981\u4e00\u4e2a\u5171\u4eab\u76ee\u5f55\u5b58\u653e\u6587\u4ef6\uff08\u793a\u4f8b\u4e3aimages\u76ee\u5f55\uff09\uff0c\u53c2\u8003\u672c\u6587\u5373\u53ef\u3002<br \/>\n1\u3001\u5173\u95ed\u9632\u706b\u5899<br \/>\n2\u3001\u5b89\u88c5Samba<br \/>\n3\u3001\u65b0\u589eCentOS\u7528\u6237<br \/>\n4\u3001\u65b0\u589eSamba\u7528\u6237<br \/>\n5\u3001\u5f00\u673a\u542f\u7528Samba\u670d\u52a1<br \/>\n<!--more--><br \/>\n<em>\u4f7f\u7528root\u7528\u6237\u4e0d\u5f71\u54cd\u547d\u4ee4\u7684\u6267\u884c<\/em><br \/>\n<strong>1\u3001\u5173\u95ed\u9632\u706b\u5899\u548cSELinux\uff1a<\/strong><br \/>\n\u6253\u5f00\u9632\u706b\u5899\u914d\u7f6e\u6587\u4ef6\uff1a<br \/>\n[liyue@rds ~]$<code>sudo vi \/etc\/selinux\/config<\/code><br \/>\n\u6539\u6210 SELINUX=<code>disabled<\/code><br \/>\n\u6309ESC\u952e\u540e\u8f93\u5165 <code>:wq!<\/code> \u56de\u8f66\u5b8c\u6210\u4fdd\u5b58<br \/>\n[liyue@rds ~]$ <code>sudo systemctl stop firewalld<\/code><br \/>\n[liyue@rds ~]$ <code>sudo systemctl disable firewalld<\/code><br \/>\n\u91cd\u542fCentOS[liyue@rds ~]$ <code>sudo reboot<\/code><br \/>\n<strong>2\u3001\u5b89\u88c5samba<\/strong><br \/>\n[liyue@rds ~]$<code>sudo yum install samba<\/code><br \/>\nIs this ok [y\/d\/N]: <code>y<\/code>\uff08\u8f93\u5165y\u540e\u56de\u8f66\uff0c\u76f4\u5230\u5b8c\u6210\uff09<br \/>\n<strong>3\u3001\u65b0\u589eCentOS\u7528\u6237\uff08\u4e0d\u7528\u8bbe\u7f6e\u5bc6\u7801\uff09<\/strong><br \/>\n[liyue@rds ~]$ <code>sudo adduser images<\/code><br \/>\n<strong>4\u3001\u65b0\u589eSamba\u7528\u6237<\/strong><br \/>\n[liyue@rds ~]$ <code>sudo smbpasswd -a images<\/code><br \/>\nNew SMB password:<code>123<\/code>\uff08\u4e0d\u9700\u8981\u5bc6\u7801\u5c31\u76f4\u63a5\u56de\u8f66\uff09<br \/>\nRetype new SMB password:<code>123<\/code>\uff08\u4e0d\u9700\u8981\u5bc6\u7801\u5c31\u76f4\u63a5\u56de\u8f66\uff09<br \/>\nAdded user images.\uff08\u5b8c\u6210\uff09<br \/>\n<strong>5\u3001\u5f00\u673a\u542f\u7528Samba\u670d\u52a1<\/strong><br \/>\n[liyue@rds ~]$ <code>sudo systemctl start smb<\/code><br \/>\n[sudo] password for liyue:<br \/>\n[liyue@rds ~]$ <code>sudo systemctl enable smb<\/code><br \/>\nCreated symlink from \/etc\/systemd\/system\/multi-user.target.wants\/smb.service to \/usr\/lib\/systemd\/system\/smb.ser<br \/>\nvice.<br \/>\n\u88c5\u597d\u4e86\uff0c\u53bb\u7528\u5427~<br \/>\n<em>\u8865\u5145\uff1a<br \/>\n1\u3001\u914d\u7f6eSamba\u201c\u65e5\u5fd7\u201d\u670d\u52a1<br \/>\n2\u3001\u5f00\u542f\u201c\u9632\u706b\u5899\u201d\u3001\u201cSELinux\u201d\u670d\u52a1<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7f51\u4e0a\u7684\u8d44\u6599\u914d\u7f6e\u8d77\u6765\u592a\u590d\u6742\u4e86\uff0c\u5982\u679c\u4f60\u53ea\u662f\u8981\u4e00\u4e2a\u5171\u4eab\u76ee\u5f55\u5b58\u653e\u6587\u4ef6\uff08\u793a\u4f8b\u4e3aimages\u76ee\u5f55\uff09\uff0c\u53c2\u8003\u672c\u6587\u5373\u53ef\u3002 1\u3001\u5173 &hellip; <a href=\"https:\/\/liyue.name\/?p=2780\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201cCentOS7\u5b89\u88c5Samba\uff08\u5feb\u901f\u5b89\u88c5\uff09\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[76,139,202,293],"class_list":["post-2780","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos","tag-linux","tag-samba","tag-293"],"_links":{"self":[{"href":"https:\/\/liyue.name\/index.php?rest_route=\/wp\/v2\/posts\/2780","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/liyue.name\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/liyue.name\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/liyue.name\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/liyue.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2780"}],"version-history":[{"count":1,"href":"https:\/\/liyue.name\/index.php?rest_route=\/wp\/v2\/posts\/2780\/revisions"}],"predecessor-version":[{"id":5737,"href":"https:\/\/liyue.name\/index.php?rest_route=\/wp\/v2\/posts\/2780\/revisions\/5737"}],"wp:attachment":[{"href":"https:\/\/liyue.name\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2780"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/liyue.name\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2780"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/liyue.name\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2780"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}