安装postfix前准备
首先查看本机有没有安装 sendmail
rpm -qa|grep sendmail 或者 alternatives --display mta
如果存在则删除或者停止
yum remove sendmail
安装postfix
yum -y install postfix*
vim /etc/postfix/main.cf
修改
myhostname = mail.flycoder.cn
mydomain = flycoder.cn
myorigin = $mydomain
inet_protocols = ipv4
启动服务
service postfix restart
chkconfig postfix on
alternatives --set mta /usr/sbin/sendmail.postfix 或者 alternatives --config mta 选择对应的/usr/sbin/sendmail.postfix
测试邮件
echo 'Hello world!' | mail -s 'Test Email' youremail@domain.com
监控脚本
nginx监控脚本,php mysql redis和此类似
vim nginx.sh
disk监控脚本
vim dish.sh
已有 0 条评论