in Linux, rhce

RHCE6 Preperation (10) – SMTP,NFS, boot parameter

1, Configure smtp service, reject the mail from remote.test

install postfix, installed before.

copy from access,

cd /etc/postfix/
vim access

copy following lines,

#    /etc/postfix/main.cf:
#        smtpd_client_restrictions =
#            check_client_access hash: /etc/postfix/access

copy to /etc/postfix/main.cf, and switch on,

/etc/postfix/main.cf: smtpd_client_restrictions =  check_client_access hash: /etc/postfix/access

modify the access document, add one line,

192.168.0.254 REJECT

2, Configure the NFS service, make the share folder as masque folder,

create the folder,

Mkdir /data/{read,write} -p
Mkdir /export/{read,write} -p

modify the fstab

vim /etc/fstab
/data/read /export/read none bind 0 0
/data/write /export/write none bind 0 0

mount all,

mount -a

modify the export configuration,

Vim /etc/exports

add two lines,

/exports/read *.example.com(rw,sync)
/exports/write *.example.com(rw,sync)

map all users to anonymous user, add parameter as “all_squash”

allow root user to login as root, and own root user access right, add parameter  “no_root_squash”

3, edit the boot parameter, add kernctl=5,

vim /boot/grub/grub.conf

add the parameter kernctl=5

to test the result, reboot the system and use the command,

cat /proc/cmdline

Write a Comment

Comment