RHCE6 Preperation (9) – SMTP,MTA, shell script, ftp

1, Configure SMTP mail service according to the following requiremnets:— Your mail server should accept mail from remote hosts and localhost— harry must be able to receive mail from remote hosts — Mail delivered to mary should spool into the default mail spool for mary /var/spool/mail/mary install the postfix, yum install -y postfix start the postfix and make it auto on when booting, service postfix start chkconfig postfix on modify the main.cf vim /etc/postfix/main.cf the original inet_interfaces is localhost, if needs to receive the internal and external mails, needs to switch on inet_interfaces = all, and comments off localhost, as following, inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost #inet_interfaces = localhost harry is local user, so he can receive the external mail, mary should spool into the default mail spool for mary /var/spool/mail/mary, this one also no need to do anything.

RHCE6 Preperation (8) – http, virtual host, http limited access

1, Implement a web server for the site http://serverX.example.com,then perform the following steps:— Download ftp://instructor.example.com/pub/rhce/server.html— Rename the downloaded file to index.html— Copy this index.html to DocumountRoot of your web server — Do NOT make any modifications to the content of index.html Install the http, yum install http* start the service and make it auto start when booting, service httpd start chkconfig httpd on download the server.html to the DocumentRoot cd /var/www/html/ lftp cd pub/rhce get server.html rename it to index.html mv server.html index.html copy to the DocumentRoot, cp index.html /var/www/html Restore the default SELinux security context, restorecon –RvF * restart the httpd service, service httpd restart Test it in the Firefox, input the server3.example.com, you will get the content of the index.html or test from the instructor computer, elinks server4.example.com 2, Extend your web server to include a virtual host for the site http://wwwX.example.com/,where X is your server number,then perform the