顯示具有 CentOS 標籤的文章。 顯示所有文章
顯示具有 CentOS 標籤的文章。 顯示所有文章

2016年3月29日 星期二

Linux SentOS postfix access & aliases 設定備忘

main.cf 設定備忘 

[root@www ~]# vim /etc/postfix/main.cf
myhostname = www.mydomain.com         
myorigin = $myhostname                
inet_interfaces = all                  <==約在第 114 行,117 行要註解掉
inet_protocols = ipv4                 
mydestination = $myhostname, localhost.$mydomain, localhost,
  linux.centos.com, ftp.mydomain.com
mynetworks = 127.0.0.0/8, 192.168.100.0/24, hash:/etc/postfix/access <==約在269行
relay_domains = $mydestination        
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases    
# 其他的設定值就先保留預設值即可啊!

access 設定備忘

[root@www ~]# vim /etc/postfix/access
59.124.157.227        OK
.edu.tw            OK
abc.com            REJECT
192.168.2.          REJECT
# OK 表示可接受,而 REJECT 則表示拒絕。

[root@www ~]# postmap hash:/etc/postfix/access
[root@www ~]# ls -l /etc/postfix/access*
-rw-r--r--. 1 root root 19648 2011-08-09 14:05 /etc/postfix/access
-rw-r--r--. 1 root root 12288 2011-08-09 14:08 /etc/postfix/access.db
# postmap 執行後 access.db 的檔案才會同步更新!這才是 postfix 實際讀取的!

aliases 設定備忘

[root@www ~]# vim /etc/aliases
mailer-daemon:  postmaster
postmaster:     root
bin:            root
daemon:         root
....(省略)....
[root@www ~]# vim /etc/aliases
root:     james
# 左邊是額外所設定的,右邊則是實際接收這封信的帳號!

[root@www ~]# postalias hash:/etc/aliases
[root@www ~]# ll /etc/aliases*
-rw-r--r--. 1 root root  1535 2011-08-09 14:10 /etc/aliases
-rw-r--r--. 1 root root 12288 2011-08-09 14:10 /etc/aliases.db

Reference

2016年3月19日 星期六

Linux top 中的 load average

如果 CPU 有 4 顆, load average 超過 12 (CPU 個數的3倍) 的時候, 代表 CPU 的 loading 很重

  • load average/CPU數 <= 3, performance is good
  • load average/CPU數 > 5, performance is very bad
其他相關指令


2016年2月24日 星期三

Linux CentOS 7 2014年 7月份釋出

Redhat 在 2014年 7月份釋出了最新版本的作業系統 – Redhat Enterprise Linux 7,CentOS 也在當月不久釋出 CentOS 7。

RHEL7/CentOS7 已不包含 MySQL 資料庫,取而代之的是由原先 MySQL 開發團隊所維護的 MariaDB,其功能與函式使用均與 MySQL 相同,基本上若無使用特別的套件,大部份的應用程式應該都相容可以,無需修改程式。

PHP則升級到5.4.x以後的版本