代码拉取完成,页面将自动刷新
setenforce 0
systemctl stop firewalld.service
#停止防火墙
systemctl disable firewalld
#关闭防火墙服务 重启不启动
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
yum -y install samba
mv /etc/samba/smb.conf /etc/samba/smb.conf.origin
gx="/etc/samba/smb.conf"
touch $gx
cat >> $gx <<EOF
[global]
workgroup = WORKGROUP
server string = Ted Samba Server %v
netbios name = TedSamba
security = user
map to guest = Bad User
passdb backend = tdbsam
[gxyl]
comment = project development directory
path = /home/gxyl
browseable = yes
public = yes
writeable = yes
create mask = 0644
directory mask = 0755
force user = web
force group = root
EOF
chmod -R 777 /home/gxyl
chmod +x /etc/init.d/smb
systemctl start smb
#服务启动成功
#加入服务
chkconfig --add smb
#开机启动
chkconfig smb on
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。