天天看點

linux samba yum,linux上samba+本地yum源最簡單的配置

本地yum源配置:

1、以挂載CD光牒的形式配置yum源mkdir /mnt/cdrom

mount /dev/cdrom /mnt/cdrom

配置yum配置檔案vim /etc/yum.repos.d/rhel-debuginfo.repo

[rhel-debuginfo]

name=Red Hat Enterprise Linux $releasever - $basearch - Debug

baseurl=file:///mnt/cdrom/Server

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

2、以挂載ISO檔案的形式配置本地yum源mount ./rhel-server-5.8-x86_64-dvd.iso /mnt/cdrom  -t iso9660 -o loop

vim /etc/yum.repos.d/rhel-debuginfo.repo

[rhel-debuginfo]

name=Red Hat Enterprise Linux $releasever - $basearch - Debug

baseurl=file:///mnt/cdrom/Server

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

清除yum緩存yum clear all

yum update

samba配置:yum install samba –y

vim /etc/samba/smb.conf

security = user

guest account = smbdts

encrypt passwords = yes

smb passwd file =/etc/samba/smbpasswd

#添加一個smb賬戶為smbdts,并設定密碼,預設的samba共享目錄為smbdts的家目錄,賬号為smbdts

useradd smbdts

passwd smbdts

cat /etc/passwd | mksmbpasswd.sh >/etc/samba/smbpasswd

smbpasswd –a smbdts

service smb restart