centos5

ユーザの存在を確かめ、削除する

//user test の存在を確認 grep test /etc/passwd//ホームディレクトリごと削除 /usr/sbin/userdel -r test

カーネルのバージョンを表示させる

# uname -r

CentOS5のホスト名(FQDN)を変更する

CentOSのホスト名(FQDN)を変更する# vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 1 localhost6.localdomain6 localhost6 xxx.xx…

postfixが自動起動設定になっているか調べる

# ./sbin/chkconfig --listサービスの一覧が表示されるので、postfixの行に「3:on」という記述があるかどうか調べる。もしoffになっていたら、「chkconfig postfix on」でサービスを追加する。

postfixエラーについて

postdrop: warning: unable to look up public/pickup: No such file or directorypostfixが開始されていないと上のようなエラーがでる# ./sbin/service postfix restart Shutting down postfix: [FAILED] Starting postfix: [ OK ]

通常使用するMTAを選択する

# ./usr/sbin/alternatives --config mta There are 2 programs which provide 'mta'. Selection Command ----------------------------------------------- * 1 /usr/sbin/sendmail.sendmail + 2 /usr/sbin/sendmail.postfix Enter to keep the current sel…

postfixが起動しているかどうか確認する

# mail root Subject: test This is test mail . Cc:# mail -n

メールログの見方

cat /var/log/maillog

php5-imap のインストール

アプリをいれたところ php5-imapがないと怒られたインストール # yum -y install php-imap再起動 # /etc/init.d/httpd reloadOK!

sendmailを停止して自動起動しないようにする

sendmailのサービスをストップ # /etc/rc.d/init.d/sendmail stop Shutting down sm-client: [ OK ] Shutting down sendmail: [ OK ] sendmailの自動起動を解除 # ./sbin/chkconfig --del sendmailsendmailを使わないなら以下のコマンドでアンインストールし…

postfixをインストールする

postfixをインストールする# yum install postfixpostfixを確認する# rpm -q postfix postfix-2.3.3-2.1.el5_2 # cd /etc/postfixバックアップのためコピーする#cp main.cf main.cf.090408.backup