---
title: "Samba源码安装与配置"
author: "yyjlinux"
date: "2013-05-19T18:03:50Z"
tags: []
categories: ["操作系统"]
slug: "samba"
draft: false
lastmod: "2013-05-19T18:09:54Z"
id: 1871826
url: "https://yyjlinux.iteye.com/blog/1871826"
---

**1. 获取源代码并解压**

    从官网http://www.samba.org/上，下载Tarball源码包samba-4.0.5.tar.gz，并解压：

```
#tar -xzvf samba-4.0.5.tar.gz
```

 

**2. 检查安装环境configure**

使用./configure检查安装环境，并生成makefile生成。

```
#cd /root/samba-4.0.5

#./configure
```

注：如果configure失败，如缺少依赖程序，则不能make & make install

 

**3. 编译与安装make & make install**

 

```
#make 

#make install
```

 make编译出二进制程序，make install用来安装软件。安装后samba的默认目录为/usr/local/samba