一. 更新yum的163源
备份配置文件
cp CentOS-Base.repo CentOS-Base.repo.bak
下载163的源
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
重新命名
mv CentOS6-Base-163.repo CentOS-Base.repo
编辑CentOS-Base.repo文件
vim CentOS-Base.repo
:%s/$releasever/6.4/g
执行最后的清理和更新
yum clean all
yum makecache
yum update
二. 配置简单共享的samba
安装samba
yum install samba
修改配置文件
cp smb.conf smb.conf.bak
vim smb.conf
#修改
security = share
#末尾增加
[share]
comment = Public Share
path = /home/share
public = yes
writable = yes
[root@localhost home]# 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 "[printers]"
Processing section "[share]"
WARNING: The security=share option is deprecated
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
security = SHARE
log file = /var/log/samba/log.%m
max log size = 50
idmap config * : backend = tdb
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
print ok = Yes
browseable = No
[share]
comment = Public Share
path = /home/share
read only = No
guest ok = Yes
[root@localhost home]#
[root@localhost home]# service smb restart
关闭 SMB 服务: [失败]
启动 SMB 服务: [确定]
关闭SeLinux(否则会出现没有权限访问的情况)
[root@localhost home]# sestatus -v
SELinux status: enabled
SELinuxfs mount: /selinux
.........
vim /etc/selinux/config
注释原有项, 新增项如下:
SELINUX=disabled
重启