Zimbra on EC2 tips: Difference between revisions

Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
my_hostname = os.popen("/bin/hostname -s").read().rstrip()
 
# replace the ubuntu hostname in /etc/hosts
mp = {'localipv4' : my_ip, 'hostname' : my_hostname, 'fqdn' : my_fqdn}
t = Template(file="/usr/local/etc/bind/templates/hosts.tmpl", searchList=[mp])
== セキュリティグループ ==
EC2 の Security Group で Zimbra に必要な port を設定します。
<syntaxhighlight lang="text" enclose="div">
SMTP 25
HTTP 80
HTTPS 443
IMAP 143
IMAP (Secure) 993143
IMAP (Secure) 993
POP3 110
POP3 (Secure) 995110
POP3 (Secure) 995
Custom で 7071 (Administration Console)
</syntaxhighlight>
もちろん、使わないサービスの port は閉じておくべきです。
 
[http://www.zimbra.com/community/downloads.html Zimbra のサイト]から、パッケージを EC2 の EBS ボリュームに持って展開しておきます。
 
<syntaxhighlight lang="bash" enclose="div">
cd /opt
wget http://files2.zimbra.com/downloads/7.1.0_GA/zcs-7.1.0_GA_3140.UBUNTU10_64.20110329151347.tgz
== コンフィグレーション ==
Zimbra のパッケージを展開したディレクトリで、
<syntaxhighlight lang="bash" enclose="div">
./install.sh
</syntaxhighlight>
インストーラーが起動します。
'''<RETURN>'''と書いてあるところで入力待ちがあります。
<syntaxhighlight lang="text" enclose="div">
<pre>
Operations logged to /tmp/install.log.9999
Checking for existing installation...
Main menu
 
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@aws.example.com
******* +Admin Password UNSET
+Anti-virus quarantine user: virus-quarantine.xxxxxxxxx@aws.example.com
+Enable automated spam training: yes
+Spam training user: spam.xxxxxxxxx@aws.example.com
+Non-spam(Ham) training user: ham.xxxxxxxxx@aws.example.com
+SMTP host: aws.example.com
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+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://aws.example.com: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@aws.example.com
+Version update source email: admin@aws.example.com
 
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) 1<RETURN>
Common configuration
 
1) Hostname: aws.example.com
2) Ldap master host: aws.example.com
3) Ldap port: 389
4) Ldap Admin password: set
5) Secure interprocess communications: yes
6) TimeZone: America/Los_Angeles
 
Select, or 'r' for previous menu [r] 6<RETURN>
Common configuration
 
1) Hostname: aws.example.com
2) Ldap master host: aws.example.com
3) Ldap port: 389
4) Ldap Admin password: set
5) Secure interprocess communications: yes
6) TimeZone: Asia/Tokyo
 
Select, or 'r' for previous menu [r] <RETURN>
Main menu
 
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@aws.example.com
******* +Admin Password UNSET
+Anti-virus quarantine user: virus-quarantine.xxxxxxxxx@aws.example.com
+Enable automated spam training: yes
+Spam training user: spam.xxxxxxxxx@aws.example.com
+Non-spam(Ham) training user: ham.xxxxxxxxx@aws.example.com
+SMTP host: aws.example.com
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: http
+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://aws.example.com: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@aws.example.com
+Version update source email: admin@aws.example.com
 
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) 3<RETURN>
Store configuration
 
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@aws.example.com
** 4) Admin Password UNSET
5) Anti-virus quarantine user: virus-quarantine.xxxxxxxxx@aws.example.com
6) Enable automated spam training: yes
7) Spam training user: spam.xxxxxxxxx@aws.example.com
8) Non-spam(Ham) training user: ham.xxxxxxxxx@aws.example.com
9) SMTP host: aws.example.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
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://aws.example.com: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@aws.example.com
24) Version update source email: admin@aws.example.com
 
Select, or 'r' for previous menu [r] 4<RETURN>
Store configuration
 
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@aws.example.com
4) Admin Password set
5) Anti-virus quarantine user: virus-quarantine.xxxxxxxxx@aws.example.com
6) Enable automated spam training: yes
7) Spam training user: spam.xxxxxxxxx@aws.example.com
8) Non-spam(Ham) training user: ham.xxxxxxxxx@aws.example.com
9) SMTP host: aws.example.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: http
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://aws.example.com: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@aws.example.com
24) Version update source email: admin@aws.example.com
 
Select, or 'r' for previous menu [r] 12<RETURN>
Store configuration
 
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@aws.example.com
4) Admin Password set
5) Anti-virus quarantine user: virus-quarantine.xxxxxxxxx@aws.example.com
6) Enable automated spam training: yes
7) Spam training user: spam.xxxxxxxxx@aws.example.com
8) Non-spam(Ham) training user: ham.xxxxxxxxx@aws.example.com
9) SMTP host: aws.example.com
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://aws.example.com: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@aws.example.com
24) Version update source email: admin@aws.example.com
 
Select, or 'r' for previous menu [r] <RETURN>
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<RETURN>
Save configuration data to a file? [Yes] <RETURN>
Save config in file: [/opt/zimbra/config.9999]
Saving config in /opt/zimbra/config.9999...done.
The system will be modified - continue? [No] Yes<RETURN>
 
Configuration complete - press return to exit <RETURN>
</syntaxhighlight>
</pre>
 
Zimbra が正常に稼働しているか確認します。
<syntaxhighlight lang="text" enclose="div">
<pre>
root@aws:/opt/zcs-7.1.0_GA_3140.UBUNTU10_64.20110329151347# su - zimbra
zimbra@aws:~$ zmcontrol status
stats Running
zmconfigd Running
</syntaxhighlight>
 
</pre>
 
= Zimbra Administration Console =
Zimbra Administration Console にログインします。
 
<nowiki>[https://aws.example.com:7071/< https://aws.example.com:7071/nowiki>]
 
証明書は「オレオレ証明書」になっているので、警告が出ますが、継続してください。
(これも古い ec2-init から流用して EC2 Instance Metadata から自動設定する script を書きました)
 
<syntaxhighlight lang="python" enclose="div">
#!/usr/bin/python
#
= OS からのメールを受け取る =
Sending Mail from Terminal (optional)
<syntaxhighlight lang="bash" enclose="div">
wget http://ubuntu.lnix.net/misc/mta-dummy/mta-dummy_1.0_all.deb
dpkg -i mta-dummy_1.0_all.deb
aptitude install bsd-mailx
# Add the following to /etc/mail.rc:
# set sendmail=/opt/zimbra/postfix/sbin/sendmail
</syntaxhighlight>
 

Navigation menu