第一步下载:

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. FastAdmin 数据库备份插件更新到 v1.0.4

    FastAdmin 数据库备份插件更新到 v1.0.4 下载地址: https://www.fastadmin.net/store/database.html 更新如下: 修复了忽略列表无效的 Bug ...

  2. windows下尝试编写node模块

    1,首先参考http://www.cnblogs.com/yupeng/p/3469444.html写了一个模块 2,按照指引运行 F:\Program Files\nodejs\mymodule&g ...

  3. 关于Bagging

    Bagging分为两种:Bagging和Pasting,前者是概率中的放回随机采样,后者是不放回随机采样:默认是放回采样随机:设置bootstrap=False即设置为不放回采样:默认bootstra ...

  4. PHP 解压 ZIP 文件到指定文件夹

    本类实现参考 php manual 评论 [php] view plain copy /** * function: 解压zip 格式的文件 * author:friker * date:2015-1 ...

  5. 初次使用CentOs7遇到的问题

    初次使用CentOs7遇到的问题 1.XXX[用户名]不在sudoers文件中.此事将被报告 解决方案:CentOs自带命令visudo,其作用为调用vim来修改“/etc/sudoers”文件,从而 ...

  6. backgroud 应用减小资源大小和请求数

    一,一个典型的应用,利用小图的自动延伸,实现整个网页背景图,充分节约资源宽带.如:汽车之家的404页背景图就是这样 <div style="height: 3000px; backgr ...

  7. MinGW与Cygwin的一些杂谈

    引用:http://www.cnblogs.com/fancybit/archive/2012/07/08/2581590.html 首先MingW和cygwin都可以用来跨平台开发.  MinGW是 ...

  8. docker配置ftp服务器

    docker run --name ftp_server -d -v ~/Projects/ftp:/home/vsftpd -p : -p : -p -:- -e FTP_USER=ftp -e F ...

  9. Redis的5中数据类型

    Radis的作用相信既然然就就知道她的作用,但是对于刚开始对radis学习的初学者来说,理解起来比较费劲.这里就从开始一步步认识radis 首先要知道radis是存在内存中的数据,所以读取速度回更改, ...

  10. JS之滚动条效果2

    在前面一篇说的是滚动条效果,本篇继续在前面的基础上面针对滚动条进行操作.本次要实现的效果如下:拖动滚动条左右移动时,上面的图片内容也相对外层盒子做相对移动. 下面针对要实现的效果进行分析:首先是页面基 ...