Red Hat Certified Engineer

  • RedHat ๋ฆฌ๋ˆ…์Šค ์‹œ์Šคํ…œ ๊ด€๋ฆฌ, ๋„คํŠธ์›Œํฌ, ๋ณด์•ˆ์— ๋Œ€ํ•œ ์ „๋ฌธ์ง€์‹์„ ๋ณด์œ ํ•˜๊ณ  ์žˆ์Œ์„ ์ธ์ฆ
  • ๋ฆฌ๋ˆ…์Šค ์ „๋ฌธ์ง€์‹์— ๋Œ€ํ•œ ์ž๊ฒฉ์ฆ์œผ๋กœ๋Š” LPIC1๊ฐ€ ์žˆ์Œ

์˜ˆ์ƒ ๋ฌธ์ œ

selinux ํ™œ์„ฑํ™”

ip forwarding ์„ค์ •

/etc/sysctl.conf

cron ์„ค์ •

/etc/cron.deny

anonymous ftp

samba

  1. ์„ค์น˜
     $ yum install -y samba
    
  2. samba ์ „์šฉ ๊ทธ๋ฃน ์ƒ์„ฑ ๋ฐ ์‚ฌ์šฉ์ž ์„ค์ •
     $ groupadd project useradd -aG project guru
    
  3. ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ๋ฐ ๊ถŒํ•œ ์„ค์ •
     $ mkdir /project 
     $ chgrp project /project 
     $ chmod 2770 /project
    
  4. selinux ์„ค์ •
     $ selinux chcon -R -t samba_share_t /project getsebool -a | grep samba; setsebool -P samba_enable_home_dirs on
    
  5. ์„ค์ • ํŒŒ์ผ ์ˆ˜์ •(๋ฐ๋ชฌ ์žฌ๊ฐ€๋™ & ๋ถ€ํŒ…์‹œ ์„ค์ • ํฌํ•จ)
     # /etc/samba/smb.conf
     workgroup = HPEDU hosts allow = x.x.x. ; or ๋ฐฉํ™”๋ฒฝ ์„ค์ •
        
     [project] ; ๊ธฐ์กด ์„ค์ • ๋ณต์‚ฌ comment = hp-project path = /project writable = yes (browsable = yes) write list = +project ; or guru
    
  6. ์žฌ๊ตฌ๋™
     $ service smb restart 
     $ chkconfig smb on
    
  7. ๋ฐฉํ™”๋ฒฝ ์„ค์ •
     $ system-config-firewall โ†’ smb ์„ ํƒ
    
  8. samba ๊ณ„์ • ์„ค์ •
     $ smbpasswd -a guru
    
  9. test
     $ smbclient -L //IP -U guru 
     $ mount -t cifs -o user=gure //IP/project /mnt 
     $ df -h
    

nfs

  1. ์„ค์น˜
     $ yum install -y nfs-utils 
    
  2. ์„ค์ •
     # /etc/exports
     /common IP(ro,sync) 
    
  3. ์žฌ๊ตฌ๋™
     $ service nfs restart 
     $ chkconfig nfs on 
    
  4. ๋ฐฉํ™”๋ฒฝ
     $ system-config-firewall โ†’ NFS4 ์„ ํƒ
    

postfix

  1. ์„ค์น˜
     $ yum install -y postfix 
    
  2. ์„ค์ •
     # /etc/postfix/main.cf (or postconf -e "inet_interfaces = all")
     inet_interfaces = all
        
     inet_interfaces = localhost
    
  3. ์žฌ๊ตฌ๋™
     $ service postfix restart 
     $ chkconfig postfix on 
    
  4. ๋ฐฉํ™”๋ฒฝ
     $ system-config-firewall โ†’ Mail (SMTP) ์„ ํƒ 
    
  5. ailas ์„ค์ •
     # /etc/aliases
     guru: visitor
    
  6. alias ์ ์šฉ
     $ newaliases 
    
  7. test (๋‹ค๋ฅธ ์‹œ์Šคํ…œ)
     $ mailx guru@192.168.56.201 $ mailq 
    

httpd

  1. ์„ค์น˜ ๋ฐ ์„ค์ • (๋ฐ๋ชฌ ์žฌ๊ฐ€๋™ & ๋ถ€ํŒ…์‹œ ์„ค์ • ํฌํ•จ)
    • Apache ํ•ญ๋ชฉ ์ฐธ์กฐ
  2. selinux
     $ ls -ldZ /var/www/html 
     $ chcon -R -t httpd_sys_content_t /www 
     $ ls -ldZ /www 
    
  3. ๋ฐฉํ™”๋ฒฝ
     $ system-config-firewall โ†’ WWW(HTTP) ์„ ํƒ 
    
  4. httpd ๋””๋ ‰ํ† ๋ฆฌ ์ ‘๊ทผ ์„ค์ •
     <Directory "/var/www/virtual/security">
        
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from IP  ### ์ด ๋ถ€๋ถ„์ด ์ค‘์š”
     </Directory> 
    

httpd ๊ฐ€์ƒ ํ˜ธ์ŠคํŠธ

  1. ์„ค์ • (๋ฐ๋ชฌ ์žฌ๊ฐ€๋™ & ๋ถ€ํŒ…์‹œ ์„ค์ • ํฌํ•จ)
     # /etc/httpd/conf/httpd.conf
       
     NameVirtualHost *:80
        
     <VirtualHost *:80>
        
     ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot /www
        ServerName server.example.com
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
     </VirtualHost>
        
     <VirtualHost *:80>
        
     ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot /var/www/virtual
        ServerName www.example.com
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
     </VirtualHost> 
    
  2. ์žฌ๊ตฌ๋™
     $ service httpd restart 
     $ chkconfig httpd on 
    
  3. ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ๋ฐ ํŒŒ์ผ ๋‹ค์šด ๋กœ๋“œ
     $ mkdir /var/www/virtual 
     $ wget ftp://my.site.com/virtualpage.html 
     $ mv virtualpage.html index.html 
    
  4. selinux
     $ ls -lZ /var/www/virtual 
    
  5. test
     $ lynx http://server201.example.com 
     $ lynx http://www201.example.com 
    

iscsi

  1. ์„ค์น˜ ๋ฐ start(enable)
     $ yum install -y iscsi-initiator-utils 
     $ service iscsid start $ chkconfig iscsid on 
    
  2. iscsi ์„œ๋ฒ„ ์งˆ์˜ ๋ฐ ๋กœ๊ทธ์ธ
     $ iscsiadm -m discovery -t st -p {iSCSI Server IP}
     $ iscsiadm -m node -T iqn~~ -p {iSCSI Server IP} -l 
     $ iscsiadm -m node -T iqn~~ -p {iSCSI Server IP} -o update -n node.startup -v automatic
     $ dmesg | tail
    
  3. disk ์ž‘์—…
     $ fdisk -cu /dev/sde 
     $ mkfs -t ext4 /dev/sde1 
     $ mkdir /iscsi $ vi /etc/fstab 
     $ mount /iscsi
    

ssh ์ ‘๊ทผ์ œ์–ด

์Šคํฌ๋ฆฝํŠธ ์ž‘์„ฑ

๋ถ€ํŒ…์‹œ ์ปค๋„๊ฐ’ ์„ค์ •

์•„๋ž˜ ํŒŒ์ผ์„ ํŽธ์ง‘ํ•˜์—ฌ kernel ์ œ์ผ ๋’ค์ชฝ์— ์›ํ•˜๋Š” ๊ฐ’์„ ์„ธํŒ…ํ•˜์—ฌ ๋„ฃ์Œ ~~~shell $ vi /boot/grub/grub.conf ~~~

iso mount

~~~properties
iso9660 ro,loop
~~~

์ถ”๊ฐ€ ์˜ˆ์ƒ ๋ฌธ์ œ

httpd ์ธ์ฆ ์„ค์ • (File)

  1. ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ๋ฐ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ
     $ cd /var/www/virtual 
     $ mkdir security 
     $ wget ftp://my.site.com/security.html
    
  2. ์ธ์ฆ
     $ htpasswd -c -m /var/www/.userlist guru
    
  3. ์„ค์ •(๋ฐ๋ชฌ ์žฌ๊ฐ€๋™ & ๋ถ€ํŒ…์‹œ ์„ค์ • ํฌํ•จ)
     # /etc/httpd/conf/httpd.conf
        
     <VirtualHost *:80>
    
     ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot /var/www/virtual
        ServerName www201.example.com
            <Directory "/var/www/virtual/security">
                Options Indexes FollowSymLinks
                AllowOverride None
                    AuthName "Security"
                    AuthType basic
                    AuthUserFile "/var/www/.userlist"
                    Require vaild-user
                Order allow,deny
                Allow from all
            </Directory>
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
     </VirtualHost>
    
  4. ์žฌ๊ตฌ๋™
     $ service httpd restart
     $ chkconfig httpd on
    
  5. ๊ฒ€์ฆ
     $ lynx http://IP/security/security.html
    

httpd ์ธ์ฆ์„ค์ •(LDAP)

  1. ๋””๋ ‰ํ† ๋ฆฌ ์ƒ์„ฑ ๋ฐ ํŒŒ์ผ ๋‹ค์šด๋กœ๋“œ
     $ cd /var/www/virtual
     $ mkdir security
     $ wget ftp://my.site.com/security.html 
    
  2. ์ธ์ฆ์„œ ํŒŒ์ผ ์„ค์น˜
     $ cd /etc/httpd
     $ wget http://my.site.com/server.crt 
    
  3. ์„ค์ •(๋ฐ๋ชฌ ์žฌ๊ฐ€๋™ & ๋ถ€ํŒ…์‹œ ์„ค์ • ํฌํ•จ)
     # /etc/httpd/conf/httpd.conf
        
     LDAPTrustedGlobalCert CA_BASE64 /etc/httpd/server.crt <VirtualHost *:80>
        
     ServerAdmin webmaster@dummy-host.example.com
        DocumentRoot /var/www/virtual
        ServerName www201.example.com
            <Directory "/var/www/virtual/security">
                Options Indexes FollowSymLinks
                AllowOverride None
                    AuthName "Security"
                    AuthType basic
                     AuthBasicProvider ldap <<<<<
                    AuthLDAPUrl "ldap://xxx/dc=example,dc=com" TLS
                    Require vaild-user
                Order allow,deny
                Allow from all
            </Directory>
     ErrorLog logs/dummy-host.example.com-error_log
     CustomLog logs/dummy-host.example.com-access_log common
     </VirtualHost> 
    
  4. ์žฌ๊ตฌ๋™
     $ service httpd restart 
     $ chkconfig httpd on 
    

caching name server

  1. ์„ค์น˜
    $ yum install -y bind
    
  2. ์„ค์ • ~~~conf /etc/named.conf listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; allow-query { localhost; 192.168.56.0/24; }; forwarders { 192.168.56.201; }; dnssec-validation no;

(rndc-confgen -a) service named restart chkconfig named on ~~~

log ์„œ๋ฒ„

  1. ์„ค์ • (ํด๋ผ์ด์–ธํŠธ)
     /etc/rsyslog.conf
     .info @rhce
    
  2. ์„ค์ • (์„œ๋ฒ„)
     /etc/rsyslog.conf
     Provides UDP syslog reception
     $ModLoad imudp $UDPServerRun 514
        
     Provides TCP syslog reception
     $ModLoad imtcp $InputTCPServerRun 514
    
  3. ์žฌ๊ตฌ๋™
     $ service rsyslogd restart
    
  4. ๋ฐฉํ™”๋ฒฝ ์„ค์ •
     $ service iptables save
     $ vi /etc/sysconfig/iptables
     $ iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 514 -j ACCEPT 
     $ iptables -A INPUT -p udp -m state --state NEW -m udp --dport 514 -j ACCEPT 
     $ service iptables restart $ iptables -L
    
  5. ํ…Œ์ŠคํŠธ
     $ tail /var/log/messages
    
  1. Linux Professional Instritute Certifiedย