Linux服务器怎样进行配置samba(linux怎么配置samba服务器)

Linux服务器配置Samba

创新互联建站主营内江网站建设的网络公司,主营网站建设方案,app软件定制开发,内江h5重庆小程序开发搭建,内江网站营销推广欢迎内江等地区企业咨询

在Linux服务器上配置Samba,一个开源的文件共享和同步服务,可以提供类似于Dropbox的功能,以下是详细的步骤指南:

1. 系统更新与软件安装

确保你的Linux服务器是最新的,使用以下命令更新系统:

sudo apt update && sudo apt upgrade

安装必要的依赖包:

sudo apt install buildessential libssldev libdbdev libbz2dev libreadlinedev

2. 下载与编译Samba

前往Samba的GitHub仓库下载最新版本的源代码:

git clone https://github.com/sambaproject/samba.git
cd samba

编译Samba之前,需要安装Node.js和npm(Node.js包管理器):

curl sL https://deb.nodesource.com/setup_14.x | sudo E bash 
sudo apt install y nodejs

接着,运行下列命令来编译Samba:

./configure
make

3. Samba安装

将编译好的Samba安装到系统:

sudo make install

4. 配置Samba

创建Samba配置文件:

sudo nano /etc/samba/samba.conf

在配置文件中,你可以设置用户、权限、存储路径等选项。

[global]
workgroup = WORKGROUP
server string = Samba Server
log file = /var/log/samba/log.%m
max log size = 50
lock directory = /var/cache/samba/locks
pid file = /var/run/samba/sambad.pid
state directory = /var/cache/samba/volstate
config dir = /etc/samba/volumes.d
script directory = /etc/samba/scripts.d
hosts allow = 127.0.0.1 192.168.1.0/24
hosts deny = 0.0.0.0/0 ::0/0
logging = syslog @samba
strict locking = yes
map to guest = Bad User
guest account = nobody
name resolve order = hosts hosts.allow hosts.deny dns bcast
dns proxy = no
unix password server = no
printcap name = CUPS
load printers = yes
cups options = all
printing = CUPS
max open files = 1024
follow symlinks = yes
wide links = yes
unix extensions = yes
nfs case insensitive = yes
use sendfile = yes
aio support = yes
stat cache = yes
local master = yes
keepalive = 2
read only = no
oplocks = no
strict allocate = yes
crossvolume moves = yes
default case = lower
min receive file size = 1024000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
stream min write = no
stream max read = no
map archive = no
store dotfiles = yes
short filenames = yes
case sensitive = no
ignore case = no
dont descend = no
veto files = /.*~$|/#.*#$|\.(?:/|ah|co|lnk)$|/(?:~|NC|Th?umbs\.db)$|/(?:\.(?:tmp|swp|bak|bak2|swap|swo|orp)$)|/\.(?:(?:/dev/)?shm/l?ock|proc|sys|dev/pts)/$|/(?:.+/)?\.(?:aux|lnk)$|/(?:.+/)?\.(?:bmp|dds|gif|ico|jpe?g|jpg|png|ps|rle|ras?c)$|/(?:.+/)?\.(?:doc|rtf|xls|ppt)$|/(?:.+/)?\.(?:bin|exe|dll|lib|mdb|obj)$|/(?:.+/)?\.(?:zip|tar|gz|bz2|rar|7z)$|/(?:.+/)?\.(?:pdf)$|/(?:.+/)?\.(?:mp3|wma)$|/(?:.+/)?\.(?:avi|divx|m4v|mkv|mov|mp4|mpeg|mpg|rm|swf|vob|wmv)$|/(?:.+/)?\.(?:jar|war)$|/(?:.+/)?\.(?:torrent)$|/(?:.+/)?\.(?:txt)$|/(?:.+/)?\.(?:wav)$|/(?:.+/)?\.(?:xml)$|/(?:.+/)?\.(?:yml)$|/(?:.+/)?\.(?:json)$|/(?:.+/)?\.(?:apk)$|/(?:.+/)?\.(?:lzma)$|/(?:.+/)?\.(?:lzma2)$|/(?:.+/)?\.(?:lzma4)$|/(?:.+/)?\.(?:lzop)$|/(?:.+/)?\.(?:lz4)$|/(?:.+/)?\.(?:lz4hc)$|/(?:.+/)?\.(?:tar)$|/(?:.+/)?\.(?:tar\.gz)$|/(?:.+/)?\.(?:tar\.bz2)$|/(?:.+/)?\.(?:tar\.lzma)$|/(?:.+/)?\.(?:tar\.lzma2)$|/(?:.+/)?\.(?:tar\.lzma4)$|/(?:.+/)?\.(?:tar\.lzop)$|/(?:.+/)?\.(?:tar\.lz4)$|/(?:.+/)?\.(?:tar\.lz4hc)$|/(?:.+/)?\.(?:tar\.xz)$|/(?:.+/)?\.(?:tar\.Z)$|/(?:.+/)?\.(?:tar\.z)$|/(?:.+/)?\.(?:tgz)$|/(?:.+/)?\.(?:tbz2)$|/(?:.+/)?\.(?:tz2)$|/(?:.+/)?\.(?:tlz4)$|/(?:.+/)?\.(?:txz)$|/(?:.+/)?\.(?:tzo)$|/(?:.+/)?\.(?:tz2)$|/(?:.+/)?\.(?:tz4)$|/(?:.+/)?\.(?:tz4hc)$|/(?:.+/)?\.(?:tzo4)$|/(?:.+/)?\.(?:tzo5)$|/(?:.+/)?\.(?:tzo6)$|/(?:.+/)?\.(?:5z)$|/(?:.+/)?\.(?:ace)$|/(?:.+/)?\.(?:arc)$|/(?:.+/)?\.(?:arj)$|/(?:.+/)?\.(?:egg)$|/(?:.+/)?\.(?:exe)$|/(?:.+/)?\.(?:ipa)$|/(?:.+/)?\.(?:jar)$|/(?:.+/)?\.(?:war)$|/(?:.+/)?\.(?:wim)$|/(?:.+/)?\.(?:xpi)$|/(?:.+/)?\.(?:apk)$|/(?:.+/)?\.(?:dwg)$|/(?:.+/)?\.(?:dxf)$|/(?:.+/)?\.(?:odt)$|/(?:.+/)?\.(?:ods)$|/(?:.+/)?\.(?:odp)$|/(?:.+/)?\.(?:odb)$|/(?:.+/)?\.(?:ogg)$|/(?:.+/)?\.(?:svg)$|/(?:.+/)?\.(?:svgz)$
veto files = no
exclude = no
[example]
path = /sambadata/shared
description = Example shared folder
username = nobody
password = nobody
guest account = nobody
readonly = no
maxusers = 1
maxconcurrent = 1
maxreceive = 16mb
maxsend = 16mb
[homes]
comment = Home Directories
path = /homes
public = no
writable = yes
printable = no
write list = @wheel
[profiles]
comment = Profiles
path = /profiles
public = no
writable = yes
printable = no
write list = @wheel
[printers]
comment = Printers
path = /var/spool/sambadm
public = no
writable = yes
printable = yes
write list = @wheel
[print$]
comment = Printer Drivers
path = /var/lib/sambadm
public = no
writable = yes
printable = yes
write list = @wheel

新闻名称:Linux服务器怎样进行配置samba(linux怎么配置samba服务器)
标题路径:http://www.stwzsj.com/qtweb/news23/4223.html

网站建设、网络推广公司-创新互联,是专注品牌与效果的网站制作,网络营销seo公司;服务项目有等

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联