본문 바로가기

ETC/자격증

[리눅스마스터]제1701회 리눅스마스터 1급 2차 시험 작업식 풀이 1

반응형

11. 다음은 웹서버 2.x 에 대한 설정 이다. ( 괄호 ) 안에 알맞은 내용을 넣으시오.

[root@ihd ~]# vi /etc/httpd.conf
( ① ) /www
Listen ( ② )
( ③ ) www.ihd.or.kr
( ④ ) /www/html
ServerAdmin ( ⑤ )
( ⑥ ) index.php index.html index.htm

<조  건>
- 웹서버의 설치 디렉터리는 /www 이며, 포트번호는 80 이다.
- 웹서버의 도메인 네임은 www.ihd.or.kr 이다.
- 웹문서의 디렉터리는 /www/html 이다.
- 관리자의 메일주소는 ihd@ihd.or.kr 이다.
- 클라이언트 요청에 대한 파일확장자는 index.php index.html index.htm 순이다.

 

/etc/httpd.conf : 리눅스 아파치 웹서버의 메인 설정파일

Listen : 사용할 포트를 지정
ServerName : 서버의 도메인을 입력
DocumentRoot : 웹 문서가 위치하는 디렉터리를 지정
ServerRoot : "/var/www/html", DocumentRoot "/webadmin" 으로 나눌 수도 있다.
ServerAdmin : 서버 관리자 이메일을 입력
DirectoryIndex : 클라이언트가 디렉토리를 요청할때 먼저 읽히는 파일들을 지정

 

[root@server1 ~]# find / -name httpd.conf
/etc/httpd/conf/httpd.conf
/usr/lib/tmpfiles.d/httpd.conf
/usr/local/src/httpd-2.4.12/docs/conf/httpd.conf
/usr/local/apache/conf/original/httpd.conf
/usr/local/apache/conf/httpd.conf

 

[root@server1 ~]# man httpd

 

① ServerRoot

② 80

③ ServerName

④ DocumentRoot

⑤ ihd@ihd.or.kr

⑥ DirectoryIndex

 

12. 다음은 SAMBA 서버 접속 클라이언트 접속 설정에 대한 내용이다. ( 괄호 ) 안에 알맞은 내용을 넣으시오.

[root@ihd ~]# smbclient ( ① ) IHD
[root@ihd ~]# smbclient ( ② )
smb: \>

<조  건>
- ➀ : 호스트이름은 IHD이고 공유 디렉터리명을 확인하는 과정으로 관련 옵션을 적는다.
- ➁ : 공유 디렉터리명이 ihd_share일 때 접근하는 인자값을 적는다.

 

smbclient : 삼바 클라이언트 명령으로 삼바 서버로 접근 사용

 

smbclient [옵션] [호스트]

<옵 션>

-L : 정보 조회
-U : 접속할 사용자 명 지정
-M : 메세지 전송

 

<호스트>

\를 사용하는 경우엔 \개수를 윈도우의 2배로 쓴다.
/를 사용하는 경우엔 호스트명 앞에는 2개, 디렉터리 구분은 1개를 쓴다.

 

[root@server1 ~]# man smbclient

 

SYNOPSIS
       smbclient [-b <buffer size>] [-d debuglevel] [-e] [-L <netbios name>] [-U username] [-I destinationIP]
        [-M <netbios name>] [-m maxprotocol] [-A authfile] [-N] [-C] [-g] [-i scope] [-O <socket options>]
        [-p port] [-R <name resolve order>] [-s <smb config file>] [-t <per-operation timeout in seconds>] [-k]
        [-P] [-c <command>]

       smbclient {servicename} [password] [-b <buffer size>] [-d debuglevel] [-e] [-D Directory] [-U username]
        [-W workgroup] [-M <netbios name>] [-m maxprotocol] [-A authfile] [-N] [-C] [-g] [-l log-basename]
        [-I destinationIP] [-E] [-c <command string>] [-i scope] [-O <socket options>] [-p port]
        [-R <name resolve order>] [-s <smb config file>] [-t <per-operation timeout in seconds>]
        [-T<c|x>IXFqgbNan] [-k]

 

① -L

② \\ihd\ihd_share

 

13. 다음은 vsftp 서버 설정에 대한 내용 이다. ( 괄호 ) 안에 알맞은 옵션을 넣으시오.

[root@ihd ~]# vi /etc/vsftpd/vsftpd.conf
anonymous_enable=( ① )
local_enable=( ② )
( ③ )=120
( ④ )=YES

<조  건>
- anonymous 사용자의 접속을 제한한다.
- 로컬 사용자의 ftp 사용을 허가 한다.
- 데이터 전송 관련 타임아웃 시간은 120초 이다.
- 접속한 사용자의 홈디렉터리를 최상위 디렉터리로 지정한다.

 

/etc/vsftpd/vsftpd.conf : vsftpd의 설정 파일

anonymous_enable=[YES | NO] : 익명 사용자가 접속을 허용여부
local_enable=[YES | NO] : 설치된 서버의 사용자 계정으로 접속을 허용할지 여부
data_connection_timeout=[NUMBER] : FTP 전송시 시간 설정
chroot_local_user=[YES | NO] : 사용자 계정을 상위 폴더로 이동할 수 없도록 하는 기능

 

[root@server1 ~]# vi /etc/vsftpd/vsftpd.conf
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
# When SELinux is enforcing check for SE bool ftp_home_dir
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
# When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/xferlog
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=YES

 

① NO

② YES

③ data_connection_timeout

④ chroot_local_user

반응형