LoginSignup
1
6

More than 5 years have passed since last update.

CentOS7にsambaをインストールして使えるようにするまで

Last updated at Posted at 2016-09-10

サーバ上で下記を実行する。

yum install samba samba-client samba-common -y

cd /etc/samba/

smb.conf を編集する。

[global]
workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos7
security = user
map to guest = bad user
dns proxy = no

[Share]
path = /共有したい任意のディレクトリ/
browsable =yes
writable = yes
guest ok = yes
read only = no

共有フォルダの権限を変更する。

chmod -R 0777 /共有したい任意のディレクトリ
chown -R nobody:nobody /共有したい任意のディレクトリ

立ち上げる。

systemctl enable smb.service
systemctl enable nmb.service
systemctl restart smb.service
systemctl restart nmb.service

Windows側から、サーバのIPアドレス指定で、共有フォルダにアクセスできればOK。
なお、アクセスできない場合は、SELinuxとファイアウォールを疑う。

setenforce 0
firewall-cmd --permanent --zone=public --add-service=samba
firewall-cmd --reload
1
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
6