samba安装

摘要:
步骤1下载:wgethttps://download.samba.org/pub/samba/stable/samba-4.6.7.tar.gz我没有看到任何有用的直接安装:/Configure--prefix=/usr/local/samba。事实上,默认情况下,它也安装在该目录中,并报告错误:Checkingforprogramxsltproc:notfoundCheckingforprogrampython:

第一步下载:

wget https://download.samba.org/pub/samba/stable/samba-4.6.7.tar.gz

看了下没看到啥有用的直接安装:

./configure --prefix=/usr/local/samba  ,其实默认也是安装到这个目录

报错:
Checking for program xsltproc                                                     : not found
Checking for program python                                                       : /usr/bin/python
Checking for program python                                                       : /usr/bin/python
Checking for program python                                                       : /usr/bin/python
Checking for Python version >= 2.6.0                                              : ok 2.7.5
Checking for library python2.7                                                    : not found
Checking for library python2.7                                                    : not found
Checking for library python27                                                     : not found
Checking for program python2.7-config                                             : not found
Checking for program python-config-2.7                                            : not found
Checking for custom code                                                          : Could not find the python development headers
/usr/local/src/samba-4.6.7/wscript:109: error: the configuration failed (see '/usr/local/src/samba-4.6.7/bin/config.log')

先安装 python-devel

yum -y install python-devel

报错:

/usr/local/src/samba-4.6.7/source4/lib/tls/wscript:51: error: Building the AD DC requires GnuTLS (eg libgnutls-dev, gnutls-devel) for ldaps:// support and for the BackupKey protocol

安装 libgnutls-dev, gnutls-devel
 
yum install -y libgnutls-devel  这个没有可用包,所以只安装下面一个

yum install -y gnutls-devel

再次安装报错:

/usr/local/src/samba-4.6.7/source3/wscript:507: error: ACL support not found. Try installing libacl1-dev or libacl-devel.  Otherwise, use --without-acl-support to build without ACL support. ACL support is required to change permissions from Windows clients.

安装 libacl-devel

yum install -y libacl-devel

再次报错:
/usr/local/src/samba-4.6.7/source3/wscript:703: error: LDAP support not found. Try installing libldap2-dev or openldap-devel. Otherwise, use --without-ldap to build without LDAP support. LDAP support is required for the LDAP passdb backend, LDAP idmap backends and ADS. ADS support improves communication with Active Directory domain controllers.

安装 openldap-devel

yum install -y openldap-devel


然后再次安装

make && make install


安装目录在/usr/local/samba

可以进去看下 cd /usr/local/samba

cd sbin

./smbd -V

Version 4.6.7

然后将samba安装目录下的bin和sbin目录添加到环境变量

vi /etc/profile  ....

source /etc/profile


复制配置文件到安装目录下的etc下

cp /usr/local/src/samba-4.6.7/packaging/LSB/smb.conf /usr/local/smaba/etc/

复制开机自启动所需文件到/etc/init.d/

cp /usr/local/src/samba-4.6.7/packaging/LSB/samba.sh /etc/init.d/samba

然后chkconfig --add samba 注意chkconfig 的配置 2345 64 36



service samba start 报错:

.lib/lsb/init-functions no such file or directory

yum install redhat-lsb  --比较大的一个东西

或者试试 yum install -y initscripts 这个命令

service samba start

报错:
The smb.conf file does not exist.                          [失败]


修改 /etc/init.d/samba 大概第21行

if /usr/local/samba/etc/smb.conf  --路径改为自己的配置路径


再次开启,报错:

The nmbd and/or smbd daemons are not installed.            [失败]

修改大概27行,文件路径改为自己的安装路径


再次开启,报错:

/bin/bash: nmbd: 未找到命令
/bin/bash: smbd: 未找到命令

修改大概35,36行,改为自己的安装sbin路径


[public]
    265    path = /share  --共享路径
    266    public = yes   --全员共享
    267    only guest = yes  --没明白
    268    writable = yes    --新建文件
    269    printable = no    --保存即替换文件
    270   create mask = 0777  --写文件权限
    271

免责声明:文章转载自《samba安装》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇AppScan 安装与详细使用教程linux如何在日志中查找关键字、前几行、结尾几行下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

arm 添加 samb 文件共享

编译环境: ubunto 12 arm-linux-gcc 4.3.2 arm linux 4.1.36 开发板 2440 测试上传速度,大文件 github源码 https://github.com/samba-team/samba 测试了几个版本,各有问题。 samba-4.6.2 ~ 3.6 需要安装 python 环境,才能编译。4.6 需要...

linux(centos8):安装分布式事务服务seata(file单机模式,seata 1.3.0/centos 8.2)

一,什么是seata? Seata:Simpe Extensible Autonomous Transcaction Architecture, 是阿里中间件,开源的分布式事务解决方案。 前身是阿里的Fescar 官方站: http://seata.io/zh-cn/ 官方代码地址: https://github.com/seata/seata 官方文档...

samba文件共享及账户映射

samba文件共享及账户映射 实验介绍:在虚拟机Linux系统上安装sanmba服务,并在另外一台虚拟机的win7系统上访问共享文件夹,主要分为:匿名访问、身份验证访问、以及添加白名单和为了保护服务器安全的账户映射功能。1、 在Linux系统上安装samba服务 2、修改samba服务的配置文件,在 /etc/samba/smb.conf中进行修改,由于...

Mac usr/bin 目录 权限问题

Mac进行 usr/bin 目录下修改权限问题,operation not permitted 一般情况下我们在使用mac系统过程中下载一些文件、新建一些项目之后,这些文件都会默认是只读状态,这时我们只需要简单的一句权限设置命令就可以解决 sudo chmod -R 777 你要修改文件上层目录的路径 但是我们在对 usr/bin 目录下的文件进行操作的时...

windows AD域安装及必要设置

一、安装AD域 运行dcpromo命令,安装AD域。 步骤:     1.win+R     2.dcpromo 图例:           百度百科关于“dcpromo”解释:       dcpromo命令是一个“开关”命令。如果Windows 2000 Server计算机是成员服务器,则 运行dcpromo命令会安装活动目录,将其升级为域控制器;如果...

Node.js躬行记(3)——命令行工具

一、自定义 创建一个空目录,然后通过npm init命令初始化package.json文件,并按提示输入相关信息或直接回车使用默认信息,生成的内容如下所示。 { "name": "pwct", "version": "1.0.0", "description": "命令行工具测试", "main": "index.js", "scrip...