[실습6] 메일 클라이언트 프로그램 사용

* (GUI) evolution, thuderbird

* (TUI) mutt

* (CLI) mail/mailx

 

# yum install evolution

# evolution &

* 보내는 메일 서버 : mail.linux2XX.example.com 25

* 받는 메일 서버 : mail.linux2XX.example.com 110

 

 

 

 

 

 

[실습7] WebMail

* squirrelmail

 

# yum --enablerepo=epel install squirrelmail

 

# chown -R apache:apache /usr/share/squirrelmail

# chown apache:apache /etc/squirrelmail/config.php

# chown -R apache:apache /var/lib/squirrelmail

# chown -R apache:apache /var/spool/squirrelmail

 

# /usr/share/squirrelmail/config/config.pl

-> 설정 작업

# view /etc/httpd/conf.d/squirrelmail.conf

# systemctl restart httpd

 

# firefox http://www.linux2XX.example.com/webmail/src/login.php &

fedora 사용자로 로그인

 

 

 

 

 

 

 


 

 

 

 

 

 

 

7. NFS(Network File System)

 

 

 

 

 

■ NFSv4 Server on CentOS 7.X

---------------------------------

● Program: nfs-utils

● Daemon & Port & Protocol: nfsd(2049/tcp)

● Configuration File(s): /etc/exports

● Sub Configuration File(s): /etc/exports.d/*

● Service: nfs.service or nfs-server.service

---------------------------------

● 추가 정리 부분은 : 기능

---------------------------------

 

 

 

 

[참고] NFSv2 versus NFSv3 versus NFSv4

NFSv2 : UDP nfsd(2049), mountd(?)

NFSv3 : UDP/TCP nfsd(2049), mountd(?)

NFSv4 : TCP/UDP nfsd(2049)

 

 

 

 

 

NFS 서버 관련 데몬들

* nfsd

* mountd

 

 

 

NFS 서버 관련 파일들

* /etc/exports : /share 172.16.6.0/24(rw)

* /etc/fstab : 172.16.6.2XX:/share /mnt/share nfs defaults,soft,intr 0 0

 

 

 

NFS 서버 관련 명령어들

* exportfs CMD

# exportfs [-v]

# exportfs -ar

* showmount CMD

# showmount -e

# showmount -e 172.16.6.252

* mount CMD(mount.nfs, mount.nfs4)

# mount -t nfs 172.16.6.2XX:/share /mnt/share

# mount 172.16.6.2XX:/ /mnt/share

 

 

 

 

 

 

[실습1] NFS 공유 설정 하는 방법

# mkdir -p /share

# vi /etc/exports (# vi /etc/exports.d/sharedir.txt)

/share 172.16.6.0/24(rw)

# systemctl enable nfs (# systemctl enable nfs-server)

# systemctl restart nfs (# systemctl restart nfs-server)

# exportfs -v

 

 

 

 

 

 

[실습2] root 사용자의 서버 자원 마운트

* 일반 사용자 마운트 => UID/GID check

* root 사용자 마운트 => anonymous(nfsnobody) => no_root_squash

 

# vi /etc/exports

/share 172.16.6.0/24(rw,no_root_squash)

# systemctl restart nfs

 

 

 

 

 

 

[실습3] MAN Page 서버 구축

(Server)

# vi /etc/exports

/usr/share/man 172.16.6.0/24(ro)

# systemctl restart nfs

 

 

(Client)

# cd /usr/share

# mv man man.old

 

# mkdir man

# mount 172.16.6.2XX:/usr/share/man /usr/share/man

# man ls

 

 

 

 

 

 

[실습4] HOME Directory Server 구축

(Server)

# mkdir -p /export/home

# useradd -u 5000 -g 100 -d /export/home/nfsuser nfsuser

# passwd nfsuser

 

# vi /etc/exports

/export/home 172.16.6.0/24(rw)

# systemctl restart nfs

# exportfs -v

 

 

(Client)

# useradd -u 5000 -g 100 -M nfsuser

# passwd nfsuser

 

# mkdir -p /home/nfsuser

# mount 172.16.6.2XX:/export/home/nfsuser /home/nfsuser

# telnet localhost

nfsuser 사용자 로그인

 

 

 

 

 

 

[실습5] 원격 CD/DVD 공유하는 방법

(Server)

# umount /dev/sr0

# mkdir -p /mnt/cdrom ; mount -t iso9660 -o ro /dev/sr0 /mnt/cdrom

# vi /etc/exports

/mnt/cdrom 172.16.6.0/24(ro)

# systemctl restart nfs

 

(Client)

# mkdir -p /mnt/cdrom ; mount 172.16.6.2XX:/mnt/cdrom /mnt/cdrom

# ls /mnt/cdrom

 

 

 

 

 

 

[실습6] 원격 백업 서버 구축

(server)

# mkdir -p /backup/linux2XX

# vi /etc/exports

/backup/linux2XX 172.16.6.2XX(rw,no_root_squash)

# systemctl restart nfs

 

(client)172.16.6.2XX

# mkdir -p /backup ; mount 172.16.6.252:/backup/linux2XX /backup

# tar cvzf /backup/home.tar.gz /home

 

 

 

 

 

 

[실습7] DNS + WEB + NFS 연동 실습

DNS - www 도메인에 여러개의 IP를 설정한다.

NFS - 웹 소스 디렉토리 공유한다.

WEB - NFS 서버의 소스 디렉토리를 마운트

 

 

 

 

 


 

 

 

 

 

 

8. SAMBA

 

 

 

 

■ SAMBA(CIFS/SMB) Server on CentOS 7.X

---------------------------------

● Program: samba, samba-client

● Daemon & Port & Protocol: smbd(139/tcp, 445/tcp), nmbd(137/udp, 138/udp)

● Configuration File(s): /etc/samba/smb.conf

● Sub Configuration File(s): /etc/samba/*

● Service: smb.service

---------------------------------

● 추가 정리 부분은 : 기능

---------------------------------

 

 

 

(패키지 설치 초기 설정)

# yum install samba samba-client

# cd /etc/samba

# mv smb.conf smb.conf.old

# cp -p smb.conf.example smb.conf

# vi smb.conf

 

 

 

 

 

 

 

 

 

 

 

 

728x90

+ Recent posts