강좌
클라우드/리눅스에 관한 강좌입니다.
네트워크 분류

리눅스마스터1급 : 삼바(Samba) 서버 설정하기

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

리눅스마스터1: 삼바(Samba) 서버 설정하기

 

 




1) 삼바 서버 설치

 

 

리눅스에서 삼바를 설치하기 위해서는 RPM 패키지를 이용하거나 소스 컴파일을 하여 설치하는 방법이 있다.

 

 

 

 

 

먼저 자신의 시스템에 삼바가 설치되어 있는지 확인하기 위해서는 다음과 같이 확인한다.

 

 

 

[root@RockyLinux01 ~]# rpm -qa | grep samba

samba-common-4.16.4-103.el9_1.noarch

samba-client-libs-4.16.4-103.el9_1.x86_64

samba-common-libs-4.16.4-103.el9_1.x86_64

samba-libs-4.16.4-103.el9_1.x86_64

python3-samba-4.16.4-103.el9_1.x86_64

samba-client-4.16.4-103.el9_1.x86_64

[root@RockyLinux01 ~]#

 

 

 

rpm 패키지 명령 “i”를 사용하면 간단한 정보가 표시된다.

 

 

[root@RockyLinux01 ~]# rpm -qi samba

samba 패키지가 설치되어 있지 않습니다

[root@RockyLinux01 ~]#

[root@RockyLinux01 ~]# rpm -qi samba-common-4.16.4-103.el9_1.noarch

Name : samba-common

Epoch : 0

Version : 4.16.4

Release : 103.el9_1

Architecture: noarch

Install Date: 20230512() 오전 115042

Group : Unspecified

Size : 139854

License : GPLv3+ and LGPLv3+

Signature : RSA/SHA256, 20230505() 오전 010722, Key ID 702d426d350d275d

Source RPM : samba-4.16.4-103.el9_1.src.rpm

Build Date : 20230505() 오전 124439

Build Host : pb-a3d740a8-c661-4211-a37c-44d4bfa0f01c-b-x86-64

Packager : Rocky Linux Build System (Peridot) <releng@rockylinux.org>

Vendor : Rocky Enterprise Software Foundation

URL : https://www.samba.org

Summary : Files used by both Samba servers and clients

Description :

samba-common provides files necessary for both the server and client

packages of Samba.

[root@RockyLinux01 ~]#

 

 

 

 

 

 

 

만약 다음과 같이 설치되어 있지 않다면 설치한 배포판 CD-ROM에서 RPM으로 설치하거나 http://www.samba.org/ 에서 소스를 다운받아 설치한다.

 

 

 

 

 

7ce9390993b6024bf1a77eac34869b85_1686896070_4798.png
 

 

 

wget 명령어를 이용하여 삼바 최신 버전을 다운로드 한다.

 

 

[root@RockyLinux01 local]# wget http://www.samba.org/samba/ftp/samba-latest.tar.gz

--2023-06-16 15:07:59-- http://www.samba.org/samba/ftp/samba-latest.tar.gz

Resolving www.samba.org (www.samba.org)... 144.76.82.148, 2a01:4f8:192:486::2:3

Connecting to www.samba.org (www.samba.org)|144.76.82.148|:80... connected.

HTTP request sent, awaiting response... 301 Moved Permanently

Location: https://www.samba.org/samba/ftp/samba-latest.tar.gz [following]

--2023-06-16 15:07:59-- https://www.samba.org/samba/ftp/samba-latest.tar.gz

Connecting to www.samba.org (www.samba.org)|144.76.82.148|:443... connected.

HTTP request sent, awaiting response... 301 Moved Permanently

Location: https://download.samba.org/pub/samba/samba-latest.tar.gz [following]

--2023-06-16 15:08:00-- https://download.samba.org/pub/samba/samba-latest.tar.gz

Resolving download.samba.org (download.samba.org)... 144.76.82.148, 2a01:4f8:192:486::2:3

Connecting to download.samba.org (download.samba.org)|144.76.82.148|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 41294739 (39M) [application/gzip]

Saving to: `samba-latest.tar.gz'

 

samba-latest.tar.gz 100%[=================================================>] 39.38M 8.62MB/s in 4.6s

 

2023-06-16 15:08:07 (8.62 MB/s) - `samba-latest.tar.gz' saved [41294739/41294739]

 

[root@RockyLinux01 local]#

 

 

 

 

다운로드한 파일의 합축을 해제하고 configure, make, make install를 실행한다.

 

 

[root@RockyLinux01 local]# tar xvfp samba-latest.tar.gz

samba-4.18.3/third_party/heimdal/lib/gssapi/netlogon/netlogon.h

samba-4.18.3/third_party/heimdal/lib/gssapi/netlogon/process_context_token.c

samba-4.18.3/third_party/heimdal/lib/gssapi/netlogon/regen.sh

samba-4.18.3/third_party/heimdal/lib/gssapi/netlogon/release_cred.c

samba-4.18.3/third_party/heimdal/lib/gssapi/netlogon/release_name.c

samba-4.18.3/third_party/heimdal/lib/gssapi/ntlm/accept_sec_context.c

samba-4.18.3/third_party/heimdal/lib/gssapi/ntlm/acquire_cred.c

samba-4.18.3/third_party/heimdal/lib/gssapi/ntlm/add_cred.c

samba-4.18.3/third_party/heimdal/lib/gssapi/ntlm/canonicalize_name.c

생략...

 

 

[root@RockyLinux01 local]# cd samba-4.18.3/

[root@RockyLinux01 samba-4.18.3]#

[root@RockyLinux01 samba-4.18.3]# ./configure --prefix=/usr/local/samba --sysconfdir=/etc/samba

Setting top to : /usr/local/samba-4.18.3

Setting out to : /usr/local/samba-4.18.3/bin

Checking for 'gcc' (C compiler) : /usr/bin/gcc

Checking for program 'git' : /usr/bin/git

Checking for c flags '-MMD' : yes

Checking for program 'gdb' : /usr/bin/gdb

Checking for header sys/utsname.h : yes

Checking uname sysname type : Linux

Checking uname machine type : x86_64

Checking uname release type : 5.14.0-162.23.1.el9_1.x86_64

Checking uname version type : #1 SMP PREEMPT_DYNAMIC Tue Apr 11 19:09:37 UTC 2023

Checking for header stdio.h : yes

Checking simple C program : ok

Checking compiler accepts ['-Werror'] : yes

Checking linker accepts ['-Wl,-rpath,.'] : yes

Checking for rpath library support : yes

Checking for -Wl,--version-script support : yes

Checking compiler accepts ['-fvisibility=hidden'] : yes

Checking for HAVE_VISIBILITY_ATTR : ok

Checking for library constructor support : ok

Checking for library destructor support : ok

Checking for __attribute__ : ok

Checking compiler accepts ['-fPIC'] : yes

Checking for inline : inline

Checking for program 'pkg-config' : /usr/bin/pkg-config

Checking for pkg-config version >= '0.0.0' : yes

Checking compiler accepts ['-D__STDC_WANT_LIB_EXT1__=1'] : yes

Checking compiler accepts [''] : yes

Checking for header sys/types.h : yes

Checking for header sys/stat.h : yes

Checking for header stdlib.h : yes

Checking for header stddef.h : yes

Checking for header memory.h : yes

Checking for header string.h : yes

Checking for header strings.h : yes

Checking for header inttypes.h : yes

Checking for header stdint.h : yes

Checking for header unistd.h : yes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[root@sulinux samba]# make && make install

 

 

 

 

 

 

 

 

 

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,034 명
  • 현재 강좌수 :  35,791 개
  • 현재 접속자 :  78 명