このブログは、旧・はてなダイアリー「檜山正幸のキマイラ飼育記 メモ編」(http://d.hatena.ne.jp/m-hiyama-memo/)のデータを移行・保存したものであり、今後(2019年1月以降)更新の予定はありません。

今後の更新は、新しいブログ http://m-hiyama-memo.hatenablog.com/ で行います。

続・サーバー設定

ゾーン設定

ドメインの基本情報は次のような形:

エントリ名 タイプ データ
@ NS ns1.dns.ne.jp.
NS ns2.dns.ne.jp.
MX 10 @
A 49.212.35.78
www CNAME @
mail CNAME @
ftp CNAME @

必要に応じてCNAMEにホスト名を追加する。commuworld.org は失効したらしい。まーいいや。daphniaとmicroapplicationsを使おう。

nginx

  • インストール先は /usr/local/nginx/
  • nginx -h でヘルプが出る。
  • 基本は、nginx & として起動しておけばOK。
  • Apacheが起動しているときは、service httpd status で止めてから、nginx & すればよい。


# service httpd status
httpd (pid 9368 9367 9366 9365 9364 9363 9362 9361 2204) is running...

# service httpd stop

postfix

postfixメールサーバーのことが http://d.hatena.ne.jp/m-hiyama-memo/20100426/1272274832 くらいしか書いてない。マズイな。

インストールは済んでいるとして、次のようにして調べることができる。


# which postconf
/usr/sbin/postconf

# ls -l /usr/sbin/post*
-rwxr-xr-x 1 root root 165108 Aug 15 2008 /usr/sbin/postalias
-rwxr-xr-x 1 root root 86900 Aug 15 2008 /usr/sbin/postcat
-rwxr-xr-x 1 root root 181428 Aug 15 2008 /usr/sbin/postconf
-rwxr-sr-x 1 root postdrop 132200 Aug 15 2008 /usr/sbin/postdrop
-rwxr-xr-x 1 root root 78644 Aug 15 2008 /usr/sbin/postfix
-rwxr-xr-x 1 root root 86676 Aug 15 2008 /usr/sbin/postkick
-rwxr-xr-x 1 root root 82612 Aug 15 2008 /usr/sbin/postlock
-rwxr-xr-x 1 root root 78548 Aug 15 2008 /usr/sbin/postlog
-rwxr-xr-x 1 root root 156884 Aug 15 2008 /usr/sbin/postmap
-rwxr-sr-x 1 root postdrop 161012 Aug 15 2008 /usr/sbin/postqueue
-rwxr-xr-x 1 root root 95124 Aug 15 2008 /usr/sbin/postsuper

# ls -l /etc/postfix/
total 272
-rw-r--r-- 1 root root 11942 Aug 15 2008 LICENSE
-rw-r--r-- 1 root root 1629 Aug 15 2008 TLS_LICENSE
-rw-r--r-- 1 root root 15647 Aug 15 2008 access
-rw-r--r-- 1 root root 10947 Aug 15 2008 canonical
-rw-r--r-- 1 root root 9622 Aug 15 2008 generic
-rw-r--r-- 1 root root 16393 Aug 15 2008 header_checks
-rw-r--r-- 1 root root 26778 Apr 25 2010 main.cf
-rw-r--r-- 1 root root 14332 Aug 15 2008 main.cf.default
-rw-r--r-- 1 root root 26719 Apr 25 2010 main.cf.saved
-rw-r--r-- 1 root root 26732 Apr 25 2010 main.cf~
-rw-r--r-- 1 root root 1244 Aug 15 2008 makedefs.out
-rw-r--r-- 1 root root 4185 Apr 1 2009 master.cf
-rwxr-xr-x 1 root root 22478 Aug 15 2008 post-install
-rw-r--r-- 1 root root 17298 Aug 15 2008 postfix-files
-rwxr-xr-x 1 root root 6366 Aug 15 2008 postfix-script
-rw-r--r-- 1 root root 6523 Aug 15 2008 relocated
-rw-r--r-- 1 root root 11033 Aug 15 2008 transport
-rw-r--r-- 1 root root 11732 Aug 15 2008 virtual

# service postfix status
master (pid 2329) is running...

# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, daphnia.org, commuworld.org, caty-sites.net, chimaira.org
mydomain = microapplications.net
myhostname = microapplications.net
mynetworks = 127.0.0.1
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
sample_directory = /usr/share/doc/postfix-2.2.10/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

#

postfixのインストールと運用はいずれメモしておかないとな。

vsftpdはうまく動かない。起動はするが繋がらない。[追記]iptablesの設定のせいだった。[/追記]

[追記]chimaira.orgのDNS情報がだいたい行き渡ったようだ。が、Webが死んでいた。nginxが落ちて、Apacheが起動していた。ってことは再起動があったらしい。とりあえず、chkconfig httpd off したが、起動でnginxが上がるように設定しないといけないな。[/追記]