LoginSignup
8
9

More than 5 years have passed since last update.

Zimbra Open Source Edition を用いたグループウェア環境構築の覚書き

Last updated at Posted at 2014-04-22

いままで利用していた、Windows Live Admin Centerがサービス終了になることが決まったので、Zimbra に移行しようと思い、環境構築を行ったのでその記録です。
Zimbra Open Source Edition Ver.8.0.7では,IPv6の環境はBeta Releaseなので今回は触れないこととします.

1. Zimbra Community Editionのインストール

1.1. インストール環境

 今回は以下のような環境で,Zimbra Open Source Editionの構築を行いました.

  • サーバ構成 : ConoHa VPS 1GB プラン (詳しい構成はこちら)
  • OS : CentOS 6.4 x64
  • グループウェア : Zimbra Open Source Edition Ver.8.0.7

1.2. インストール準備

1.2.1. 競合サービスの停止

 Zimbraのインストールでは,Zimbra用のhttpサーバ,mailサーバ,ldapサーバなどがインストールされるため,競合されるサービスは,事前に停止しておく必要があります.
環境によってはこれ以外にも,停止するものがあるかもしれません.
ここは,自分の環境に合わせて行ってください.

sendmailの停止および自動起動OFF
# /etc/rc.d/init.d/sendmail stop
# /sbin/chkconfig sendmail off

postfixの停止および自動起動OFF
# /etc/rc.d/init.d/postfix stop
# /sbin/chkconfig postfix off

httpdの停止および自動起動OFF
# /etc/rc.d/init.d/httpd stop
# /sbin/chkconfig httpd off

1.2.2. iptablesの設定

パケットフィルタリングの設定を行います.
こちらも,各自の環境によって設定内容が違います.

SMTP
# iptables -I INPUT -p tcp --dport 25 -j ACCEPT
HTTP
# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
POP3
# iptables -I INPUT -p tcp --dport 110 -j ACCEPT
IMAP
# iptables -I INPUT -p tcp --dport 143 -j ACCEPT
LDAP
# iptables -I INPUT -p tcp --dport 389 -j ACCEPT
HTTPS
# iptables -I INPUT -p tcp --dport 443 -j ACCEPT
SMTPS
# iptables -I INPUT -p tcp --dport 465 -j ACCEPT 
IMAPS
# iptables -I INPUT -p tcp --dport 993 -j ACCEPT
POP3S
# iptables -I INPUT -p tcp --dport 995 -j ACCEPT
VMSVC-2
# iptables -I INPUT -p tcp --dport 7025 -j ACCEPT
Port for ZCS Web Administration
# iptables -I INPUT -p tcp --dport 7071 -j ACCEPT


設定の保存・再起動
# /etc/init.d/iptables save
# /etc/init.d/iptables restart

1.2.3. DNSサーバにAレコードとMXレコードの登録

 私は,お名前.comでドメインを取得しているので,お名前.comのサイトから自分の所有するドメインにAレコードとMXレコードを追加します.AレコードとMXレコードの追加例を以下に示す.
利用環境・サービスによって設定内容は異なります.

Host Name Type TTL Value
zimbra.example.com A 300 IPv4 Address
@example.com MX 3600 zimbra.example.com

IMAP4,POP3,SMTPを利用するときに専用のアドレスを用意したい場合は、以下の設定をしておくと良いかも。。。

Host Name Type TTL Value
imap.example.com CNAME 3600 zimbra.example.com
pop.example.com CNAME 3600 zimbra.example.com
smtp.example.com CNAME 3600 zimbra.example.com

1.2.4. Zimbra Open Source Edition Ver.8.0.7 インストールプログラムのダウンロードと展開

 Zimbra Open Source Edition Ver.8.0.7のインストールプログラムは,こちらよりダウンロードしてください.
今回は,こちらのファイル(zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz)をダウンロードします.
自分の環境に適したものをダウンロードしてください

 ダウンロード後は,適当なディレクトリに展開してください.

#wget http://files2.zimbra.com/downloads/8.0.7_GA/zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz
#tar zxvf zcs-8.0.7_GA_6021.RHEL6_64.20140408123911.tgz

これは書かなくても良かったんじゃ...

1.3. インストール

 上記まででした準備は完了です.あとはインストールするだけです.インストールは,下記のようにスクリプトを実行する.(ちゃんとディレクトリ移動しようね)

#./install.sh --platform-override

オプションに「--platform-override」を付けることで,RHELのパッケージをCentOSにインストールできる

 最初に, ソフトウェア使用許諾契約書の条項に同意するか 聞かれるので,きちんと読みましょう.読んだ上で,「y」を入力する.
[ ]内の値はデフォルト値を表します.

License Terms for the Zimbra Collaboration Suite:
  http://www.zimbra.com/license/zimbra_public_eula_2.4.html

Do you agree with the terms of the software license agreement? [N] y

 次に,インストールするパッケージを選びます.必要なら「y」,不要なら「n」と入力する.
基本的には,デフォルトで良いと思います.
こちらも, 自分の環境に合わせてインストールするパッケージを選んでください.

Select the packages to install
Install zimbra-ldap [Y] 
Install zimbra-logger [Y] 
Install zimbra-mta [Y] 
Install zimbra-snmp [Y] 
Install zimbra-store [Y] 
Install zimbra-apache [Y] 
Install zimbra-spell [Y] 
Install zimbra-memcached [N] 
Install zimbra-proxy [N]

インストールするパッケージを選択すると, システムが変更されます,続行しますか と聞かれますので「y」を入力します.

The system will be modified.  Continue? [N] y

パッケージインストール後に,DNSの設定によっては,以下のようなエラーが発生します.
ここも,自分の環境に合わせて変更を行ってください.
(Zimbra Serverのホスト名がドメイン名になるので,今回はホスト名を抜いた「example.net」を設定します.)

DNS ERROR resolving MX for zimbra.example.net
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] y
Create domain: [zimbra.example.net] example.net

ポート競合のチェックが行われた後,メニューが表示されるので,詳細な設定はそこで行います.

Main menu

   1) Common Configuration:                                                  
   2) zimbra-ldap:                             Enabled                       
   3) zimbra-store:                            Enabled                       
        +Create Admin User:                    yes                           
        +Admin user to create:                 admin@example.net          
******* +Admin Password                        UNSET                         
        +Anti-virus quarantine user:           virus-quarantine.kg1kfklk@example.net
        +Enable automated spam training:       yes                           
        +Spam training user:                   spam.djepduoqe@example.net 
        +Non-spam(Ham) training user:          ham.7_3iddyv@example.net   
        +SMTP host:                            zimbra.example.net         
        +Web server HTTP port:                 80                            
        +Web server HTTPS port:                443                           
        +Web server mode:                      https                         
        +IMAP server port:                     143                           
        +IMAP server SSL port:                 993                           
        +POP server port:                      110                           
        +POP server SSL port:                  995                           
        +Use spell check server:               yes                           
        +Spell server URL:                     http://zimbra.example.net:7780/aspell.php
        +Configure for use with mail proxy:    FALSE                         
        +Configure for use with web proxy:     FALSE                         
        +Enable version update checks:         TRUE                          
        +Enable version update notifications:  TRUE                          
        +Version update notification email:    admin@example.net          
        +Version update source email:          admin@example.net          

   4) zimbra-mta:                              Enabled                       
   5) zimbra-snmp:                             Enabled                       
   6) zimbra-logger:                           Enabled                       
   7) zimbra-spell:                            Enabled                       
   8) Default Class of Service Configuration:                                
   r) Start servers after configuration        yes                           
   s) Save config to file                                                    
   x) Expand menu                                                            
   q) Quit                                    

Address unconfigured (**) items  (? - help)

メニュー項目を見ると,Adminパスワードが設定されていないので設定を行います.

******* +Admin Password                        UNSET

Adminのパスワードを設定するので「3」を入力します.

Address unconfigured (**) items  (? - help) 3

入力すると,Store configurationが表示されるので「4」を入力しパスワードを設定します.

Store configuration

   1) Status:                                  Enabled                       
   2) Create Admin User:                       yes                           
   3) Admin user to create:                    admin@example.net          
** 4) Admin Password                           UNSET                         
   5) Anti-virus quarantine user:              virus-quarantine.kg1kfklk@example.net
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      spam.djepduoqe@example.net 
   8) Non-spam(Ham) training user:             ham.7_3iddyv@example.net   
   9) SMTP host:                               zimbra.example.net         
  10) Web server HTTP port:                    80                            
  11) Web server HTTPS port:                   443                           
  12) Web server mode:                         https                         
  13) IMAP server port:                        143                           
  14) IMAP server SSL port:                    993                           
  15) POP server port:                         110                           
  16) POP server SSL port:                     995                           
  17) Use spell check server:                  yes                           
  18) Spell server URL:                        http://zimbra.example.net:7780/aspell.php
  19) Configure for use with mail proxy:       FALSE                         
  20) Configure for use with web proxy:        FALSE                         
  21) Enable version update checks:            TRUE                          
  22) Enable version update notifications:     TRUE                          
  23) Version update notification email:       admin@example.net          
  24) Version update source email:             admin@example.net          

Select, or 'r' for previous menu [r] 4


Password for admin@example.net (min 6 characters): [MDygBFeiiX] ここにパスワードを入力

パスワードを設定完了後,「r」を入力することでStore configurationから抜けることができます.再度,メニューが表示されるので,他の設定を行うならメニューから選択,設定を終了するなら「a」を入力します.

Main menu

   1) Common Configuration:                                                  
   2) zimbra-ldap:                             Enabled                       
   3) zimbra-store:                            Enabled                       
   4) zimbra-mta:                              Enabled                       
   5) zimbra-snmp:                             Enabled                       
   6) zimbra-logger:                           Enabled                       
   7) zimbra-spell:                            Enabled                       
   8) Default Class of Service Configuration:                                
   r) Start servers after configuration        yes                           
   s) Save config to file                                                    
   x) Expand menu                                                            
   q) Quit                                    

*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a

設定を終了すると,保存するか聞かれるので「y」を入力する.

Save configuration data to a file? [Yes]

保存が終了すると,システムの更新をしても良いか聞かれるので「y」と入力する.

The system will be modified - continue? [No] y

システムの更新が終わると,インストール作業をZimbraに通知するかを聞かれるので,通知の場合は「y」通知しない場合は「n」を入力する.

Notify Zimbra of your installation? [Yes] 

以下のようなメッセージが表示されたらインストールは終了です.お疲れ様でした.

Configuration complete - press return to exit

2. Zimbra Community Editionのセットアップ

 この章では,Zimbraのセットアップを行います.
Zimbraのアクセスは以下のアドレスでできます.

Zimbra Admin Console
https://zimbra.example.net:7071/

Zimbra Web Client Login
http://zimbra.example.net/

セットアップを行うために,WebブラウザからZimbra Admin Consoleにアクセスします.アクセスすると以下のような画面が表示されます.
スクリーンショット 2014-04-22 20.44.30.png

表示されたら,adminでログインします.ログインすると以下のような画面に遷移します.
スクリーンショット 2014-04-22 20.45.00.png

まず始めに,証明書のインストールを行います.画面中央ぐらいの「証明書のインストール」をクリックすると以下のような画面が表示されます.
サーバー名「zimbra.example.net」を選んで「次へ」をクリック.

スクリーンショット 2014-04-22 20.45.17.png

とりあえず今回は,自己署名入りの証明書をインストールを選択し,「次へ」をクリック
証明書を持っている場合は,それをインストールしてください.
スクリーンショット 2014-04-22 20.45.48.png

証明書情報を入力して「次へ」をクリック
スクリーンショット 2014-04-22 20.46.06.png

最後に,証明書の有効日数を入力して「インストール」をクリック
スクリーンショット 2014-04-22 20.46.14.png

インストール完了後にサーバを再起動して,終了です.

Zimbraのインストールと簡単なセットアップは以上です.

・・・・え,アカウントの追加とかとか説明していないって??

アカウントの追加は,・・・GUIだし分かるよねってことで...

参考資料&関連サイト

8
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
9