我们有一个运行 CentOS 5.4 的机器,上面装有 Samba 3.0.33-3.14.el5。并且根据https://apple.stackexchange.com/questions/386924/my-smb-shares-wont-mount-under-catalina-whats-wrong,我刚刚发现 MacOS Catalina 无法连接到 SMB1,所以我需要将 Samba 至少更新到 3.5,最好是受支持的版本。
有人知道为什么最新的 Samba 无法在该版本的 CentOS 上运行吗?
我已经很久没有更新过这个机器了。有人能告诉我更新 Samba 服务器最简单的方法吗?
我尝试了“yum update samba”,结果
Loaded plugins: fastestmirror
Determining fastest mirrors
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/extras/mirrorlist.txt
Error: Cannot find a valid baseurl for repo: extras
基于https://www.faqforge.com/linux/distributions/centos/updating-samba-on-centos-5/,然后我尝试:
cd /etc/yum.repos.d
wget http://ftp.sernet.de/pub/samba/3.5/centos/5/sernet-samba.repo
并得到:
--2020-04-02 08:30:50-- http://ftp.sernet.de/pub/samba/3.5/centos/5/sernet-samba.repo
Resolving ftp.sernet.de... 185.199.217.240, 2a0a:a3c0:0:d2eb::1
Connecting to ftp.sernet.de|185.199.217.240|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://samba.plus/ [following]
--2020-04-02 08:30:51-- https://samba.plus/
Resolving samba.plus... 185.199.218.23, 2a0a:a3c0:0:d2d2::1
Connecting to samba.plus|185.199.218.23|:443... connected.
Unable to establish SSL connection.
答案1
CERN 镜像 Vault 不需要 TLS 1.2,因此仍可与旧版 CentOS 兼容
http://linuxsoft.cern.ch/centos-vault/
https://www.mark-gilbert.co.uk/fixing-yum-repos-on-centos-6-now-its-eol/
答案2
下载 samba repo:
<code>cd /etc/yum.repos.d/
wget http://ftp.sernet.de/pub/samba/3.5/centos/5/sernet-samba.repo</code>
[...] 更新 Samba:
<code>yum update samba</code>
可能你也需要 winbind:
<code>yum install samba3-winbind samba3-utils</code>
检查 rpm 版本:
<code>rpm -qa | grep samba</code>
重新启动 Samba:
<code>/etc/init.d/smb restart</code>