rootで下記を実行する。
yum install samba samba-client samba-common -y
コンフィグファイルを編集する。
cd /etc/samba/
cp -prf smb.conf smb.conf.org
vi smb.conf
ファイル最下部に下記を追加する。
[Share]
path = /var/www/html
browsable =yes
writable = yes
guest ok = no
read only = no
ファイアウォールを通す。
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
下記を実行する。
systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service
下記コマンドでsamba用パスワードを設定する。
smbpasswd -a root
サーバのIPアドレスに対して、Windows側からアクセスする。
接続できない場合は、SELinuxを無効化する。
vi /etc/selinux/config
SELINUX=disabled
サーバを再起動する。
reboot
以上。