CentOS 6 samba install
1. 참고 레퍼런스 URL
: http://www.linuxfromscratch.org/blfs/view/cvs/basicnet/samba.html
: https://folgaizer.wordpress.com/2013/12/12/samba4-on-centos-6-4/
: http://nblog.syszone.co.kr/archives/6756 (centos6 samba ad 연동)
: https://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/install.html (samba 공식)
*** 사전 설치
python-devel (centos6, python 2.6 일경우)
2. samba 4.6.4 download 경로 : https://www.samba.org/samba/history/samba-4.6.4.html
cd /usr/local/src
wget https://download.samba.org/pub/samba/stable/samba-4.6.4.tar.gz
tar xvfz samba-4.6.4.tar.gz
cd samba-4.6.4.tar.gz
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-piddir=/run/samba --with-pammodulesdir=/lib/security --enable-fhs --without-ad-dc --without-systemd --enable-selftest && make
* error 발생 -1차
/usr/local/src/samba-4.6.4/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.
yum install libacl1-dev or libacl-devel -y
* configure 설정 초기화
make distclean
컴파일 재실행
* error 발생 - 2차
/usr/local/src/samba-4.6.4/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
yum install libldap2-dev openldap-devel
또는
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-piddir=/run/samba --with-pammodulesdir=/lib/security --enable-fhs --without-ad-dc --without-systemd --enable-selftest --without-ldap && make
* error 발생 - 3차
--enable-iprint=yes but cups support not sufficient
Active Directory support not available: LDAP support is not available.
/usr/local/src/samba-4.6.4/source3/wscript:813: error: Active Directory support not found. Use --without-ads for building without Active Directory support. ADS support improves communication with Active Directory domain controllers.
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --with-piddir=/run/samba --with-pammodulesdir=/lib/security --enable-fhs --without-ad-dc --without-systemd --enable-selftest --without-ldap --without-ads && make
(required by /usr/lib/samba/libsmbd-base-samba4.so)
smbd: /usr/lib64/libwbclient.so.0: no version information available (required by /usr/lib/libsamba-passdb.so.0)
smbd: /usr/lib64/libwbclient.so.0: no version information available (required by /usr/lib/samba/libauth-samba4.so)
smbd: /usr/lib64/libwbclient.so.0: no version information available (required by /usr/lib/samba/libgensec-samba4.so)
->
# yum install *samba4.so -y
컴파일 옵션을 줄 때 리눅스에서 프린터를 사용 한다면 다음 명령어를 사용해서 컴파일 한다.
# yum install -y cups*
# ./configure --prefix=/usr/local/samba --with-smbmount --with-automount --with-cups
에러 없이 끝난다면 컴파일이 완료 된 것이다.
# make && make install
5. samba 설정 파일 복사 및 링크
# cd ../examples
# cp smb.conf.default /usr/local/samba/lib/smb.conf
# mv /etc/samba/smb.conf /etc/samba/smb.conf.old
# ln -s /usr/local/samba/lib/smb.conf /etc/samba/smb.conf
6. 설정 파일 변경 및 실행 테스트
# vi /etc/samba/smb.conf
--------------------------------------------------------------- 테스트를 위한 설정 변경임!!
[global]
workgroup = workgroup
security = share
---------------------------------------------------------------
# /usr/local/samba/sbin/nmbd -D
# /usr/local/samba/sbin/smbd -D
만약 여기서 라이브러리 오류가 발생 한다면 다음 패키지를 설치 한다.
# yum install libwbclient.so.0
7. 구동 스크립트 복사 및 테스트
# cd ../packaging/RHEL/setup
# cp smb.init /etc/init.d/smb
# cp samba.pamd /etc/pam.d/samba
둘 다 overwrite 한다.
# service smb stop
# service smb start
===============================================================================================
CentOS 7 samba install
'Cyber Security' 카테고리의 다른 글
[Kali Linux] - Virtualbox 공유폴더 마운트 (우분투, Ubuntu 포함) (0) | 2017.05.31 |
---|---|
Metasploit & Searchsploit 스터디 (0) | 2017.05.31 |
SQL Injection 실습 ( Mysql ) - 진행중 (0) | 2015.07.25 |
[Kali Linux] - arp spoofing, dns spoofing (0) | 2015.07.20 |
Kali linux DVWA Install (0) | 2015.06.14 |