第一步下载:

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安装的更多相关文章

  1. Ubantu 16.4 samba安装配置

    本文总结了Ubantu 16.04 环境下的samba安装.配置及使用.本文为原创,也是我的第一篇博客,以后会经常写博客,记录自己的学习.总结及研究,让博客见证着我成长的轨迹. 下文中的所有命令均使用 ...

  2. Y1S001 ubuntu下samba安装配置以及使用vbs映射到驱动器

    我这边安装samba只用了两步 第一步 sudo apt-get install samba 第二步 sudo vi /etc/samba/smb.conf 主要修改点如下,去掉注释或者修改=右边的值 ...

  3. samba 安装运行

    samba 安装步骤 1.若之前有安装过相关软件包,先卸载之:sudo apt-get autoremove samba samba-commonsudo apt-get autoremove sys ...

  4. 03_ubuntu samba 安装配置

    03_ubuntu samba 安装配置 安装samba sudo apt install samba 修改samba配置文件 sudo vim /etc/samba/smb.conf [share] ...

  5. LDAP + Samba 安装配置流程

    LDAP + Samba 安装配置 基础环境:Ubuntu18.04 安装samba root@cky:~# apt install samba smbldap-tools -y 查看版本 root@ ...

  6. Samba安装配置

    Samba简介 Samba官网:http://www.samba.orgSMB(Server Messages Block,信息服务块)是一种在局域网上共享文件和打印机的一种通信协议,它为局域网内的不 ...

  7. linux共享文件samba安装与java读取外部文件夹方法

    测试环境RedHat 6.4 一.安装 samba组件安装: (1)首先用“rpm –qa |grep samba”命令检验系统samba服务是否安装. #rpm –qa |grep samba sa ...

  8. [置顶] linux学习之samba安装问题详解

    一.首先查看是否安装samba,命令为:rpm -qa | grep samba 出现如下包表示已经安装,否则没有安装 samba-winbind-clients-3.5.10-125.el6.i68 ...

  9. samba安装与配置

    1.安装软件包rpm -q samba samba-common samba-client cifs-utilsyum -y install samba samba-common samba-clie ...

随机推荐

  1. PowerDesigner基础使用 ---- 入门学习

    1:入门级使用PowerDesigner软件创建数据库(直接上图怎么创建,其他的概念知识可自行学习) 我的PowerDesigner版本是16.5的,如若版本不一样,请自行参考学习即可.(打开软件即是 ...

  2. vue 和 react 组件间通信方法对比

    vue 和 react 组件间通信方法对比: 通信路径 vue的方法 react的方法 父组件 => 子组件 props(推荐).slot(推荐).this.$refs.this.$childr ...

  3. 怎么用fiddler抓APP的包

    版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/liujingqiu/article/details/79387909Fiddler安装 此处略.我们 ...

  4. LB+nginx+tomcat7集群模式下的https请求重定向(redirect)后变成http的解决方案

    0. 环境信息 Linux:Linux i-8emt1zr1 2.6.32-573.el6.x86_64 #1 SMP Wed Jul 1 18:23:37 EDT 2015 x86_64 x86_6 ...

  5. [Windows Hook] 屏蔽键盘按键

    //该例程为在系统级屏蔽一些系统键.如WIN.TAB.CAP.POWER.SLEEP.HOME等! //屏蔽组合键下面例程不适用!(比如CTRL+ESC需要在钩子函数中用(p.vkCode = VK_ ...

  6. Azure Application Gateway (5) Application Gateway SSL Offload配置

    <Windows Azure Platform 系列文章目录> 之前有个客户提出了一个需求,他们的互联网访问的架构分为两种: 1.第一层是使用Azure Application Gatew ...

  7. 黄聪:移动应用抓包调试利器Charles

    一.Charles是什么?   Charles是在 Mac或Windows下常用的http协议网络包截取工具,是一款屌的不行的抓包工具,在平常的测试与调式过程中,掌握此工具就基本可以不用其他抓包工具了 ...

  8. 黄聪:bootstrapValidator验证成功,按钮变灰却无法提交的问题

    对于这个坑真心无语! 主要问题是按钮的id和name不能为submit! 改成别的就好了!

  9. Linux网路查看工具

    源自:http://mp.weixin.qq.com/s?__biz=MzA3OTgyMDcwNg==&mid=2650625758&idx=1&sn=856dda86869d ...

  10. vc++获取网页源码

    1. 获取网页源码的步骤: com组件的初始化 创建WinHttpRequest对象 创建并实例化WinHttpRequest组件 调用Open方法打开连接 调用Send方法发送请求 使用Respon ...