centos7でのsambaの設定
windows10とcentos7(Linux)のファイル共有メモ。
centos7の/shareフォルダを共有する。
windows10側
wifiの接続のプロパティよりprivateにする。
- centos7
前提条件
・centos7のネットワークの設定が済んでいる。
・sambaがインストールされているものとする。
yum
install
samba samba-client samba-common -y
・作業はsuで行う。
1."/etc/samba/smb.conf"の編集
※globalとshareの設定のところ
パラメータのチェック
[root@centos7 /]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[share]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
/shareの作成
# cd /
# mkdir share
# chmod -R 777 share/
# chown -R nobody:nobody share
sambaのrestart
再起動
[root@centos7 /]# systemctl restart smb.service
[root@centos7 /]# systemctl restart nmb.service
ファイアウォールの設定
# firewall-cmd --permanent --zone=public --add-service=samba
# firewall-cmd --reload
# chcon -t samba_share_t /share
sambaを次回から自動起動
# systemctl enable smb.service
# systemctl enable nmb.service
//設定が有効になっているか、再起動してみて
#reboot
//sambaの確認
[root@centos7 /]# systemctl is-active smb.service
active
[root@centos7 /]# systemctl is-active nmb.service
active
tmp
start.
テンプレート
end.
参考url:
https://www.atmarkit.co.jp/ait/articles/1612/01/news184.html
2."/etc/samba/smb.conf"の編集