zimbra郵件系統php
官網:http://www.zimbra.com/mysql
本文主要講:c++
zimbra的安裝
web
在安裝過程當中出現的錯誤及解決方法
sql
zimbra一些命令shell
zimbra默認安裝路徑是:/opt/zimbraapache
1、安裝zimbravim
(1)網絡架構圖 DNS server:10.10.54.88 mail server:10.10.54.85(/opt/zimbra >= 5GB) (2)設置DNS 即在主機10.10.54.88上: [root@nan88 ~]# vim /etc/named.conf zone "cat.com" IN { type master; file "named.cat.com"; }; [root@nan88 ~]# vim /var/named/named.cat.com $TTL 600 @ IN SOA cat.com. root (2014030401 1H 15M 1W 1D); @ IN NS cat.com. @ IN MX 10 mail.cat.com. --10表明優先級 cat.com. IN A 10.10.54.87 mail.cat.com. IN A 10.10.54.87 (3)設置郵件服務器的resolv.conf和hosts文件 即在主機10.10.54.85上: [root@nan85 ~]# hostname mail [root@nan85 ~]# vim /etc/resolv.conf nameserver 10.10.54.88 [root@nan85 ~]# vim /etc/hosts 10.10.54.85 mail.cat.com mail --IP FQHN HN [root@mail ~]# vim /etc/sysconfig/network NETWORKING=yes HOSTNAME=mail 注意: 若是你的/opt/zimbra不夠5G需作作這一步!!!!! (4)掛載磁盤 在mail server上操做 因爲/opt/zimbra/須要最少5G空間,因此先掛載一塊硬盤 ##關閉虛擬機 Settings-->Storage-->Controller:SATA-->Add Hard Disk-->Create new disk-->8.00GB(最少5GB)-->Create-->OK ##開啓虛擬機 ##新增一個硬盤: [root@mail ~]# fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0xa5a5f8f6. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n --寫入n,增長 Command action e extended p primary partition (1-4) p --寫入p Partition number (1-4): 2 --寫入2 First cylinder (1-1044, default 1): --回車 Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-1044, default 1044): --回車 Using default value 1044 Command (m for help): w --寫入w,保存退出 The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. ##格式化 [root@mail ~]# mkfs -t ext4 /dev/sdb2 ##掛載 [root@mail ~]# mkdir /opt/zimbra [root@mail ~]# mount /dev/sdb2 /opt/zimbra ##查看一下 [root@mail ~]# df -l Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 6192704 3957024 1921108 68% / tmpfs 961340 0 961340 0% /dev/shm /dev/sda1 198337 25833 162264 14% /boot /dev/sda3 5160576 2635984 2262448 54% /usr /dev/sdb2 8254240 149492 7685456 2% /opt/zimbra ##設置自動掛載 查看UUID [root@mail ~]# dumpe2fs /dev/sdb2 |grep UUID dumpe2fs 1.41.12 (17-May-2010) Filesystem UUID: cfd353cc-5e3a-4fed-bbf7-df298f1d0a04 [root@mail ~]# vim /etc/fstab [root@mail ~]# init 6 正式安裝!!!!! (5)安裝zimbra 安裝依賴包,不安裝會出現錯誤: [root@mail mail]# yum install nc.x86_64 [root@mail mail]# yum install sysstat.x86_64 正式安裝: [root@mail mail]# tar xvf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz [root@mail mail]# cd zcs-8.0.6_GA_5922.RHEL6_64.20131203103705 [root@mail zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh Do you agree with the terms of the software license agreement? [N] Y --輸入Y Do you agree with the terms of the software license agreement? [N] Y --輸入Y 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] Y --輸入Y Install zimbra-proxy [N] --回車 Checking required space for zimbra-core Checking space for zimbra-store Installing: zimbra-core zimbra-ldap zimbra-logger zimbra-mta zimbra-snmp zimbra-store zimbra-apache zimbra-spell zimbra-memcached The system will be modified. Continue? [N] Y --修改系統,輸入Y繼續 ...等幾分鐘 出現錯誤: DNS ERROR resolving MX for mail.cat.com It is suggested that the domain name have an MX record configured in DNS Change domain name? [Yes] 解決方法: 再開一個遠程登陸10.10.54.85/88查看 檢查DNS發現沒錯誤,輸入N 出現錯誤: Port conflict detected: 25 (zimbra-mta) Port conflict detected: 25 (zimbra-mta) Port conflicts detected! - Press Enter/Return key to continue 意思是端口衝突 解決方法: 再開一個遠程登陸10.10.54.85關閉postfix [root@mail ~]# /etc/init.d/postfix stop 敲擊任意鍵 Address unconfigured (**) items (? - help) 3 --輸入3更改admin密碼 Store configuration 1) Status: Enabled 2) Create Admin User: yes 3) Admin user to create: admin@mail.cat.com ** 4) Admin Password UNSET 5) Anti-virus quarantine user: virus-quarantine.uiwqbnk2ck@mail.cat.com 6) Enable automated spam training: yes 7) Spam training user: spam._e0guhokfu@mail.cat.com 8) Non-spam(Ham) training user: ham.plyayfna@mail.cat.com 9) SMTP host: mail.cat.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://mail.cat.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@mail.cat.com 24) Version update source email: admin@mail.cat.com Select, or 'r' for previous menu [r] 4 --輸入4 Password for admin@mail.cat.com (min 6 characters): [v9xLlup4Oo] 123456 --輸入密碼 Select, or 'r' for previous menu [r] 12 Please enter the web server mode (http,https,both,mixed,redirect) [https] mixed Select, or 'r' for previous menu [r] r --輸入r,回到主菜單 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 --輸入a應用 Save configuration data to a file? [Yes] --回車 Save config in file: [/opt/zimbra/config.8735] --回車 Saving config in /opt/zimbra/config.8735...done. The system will be modified - continue? [No] Yes --輸入Yes ...等幾分鐘 Notify Zimbra of your installation? [Yes] N --安裝通知zimbra,輸入N Configuration complete - press return to exit (6)重啓zimbra 先把本機的postfix關閉 #/etc/init.d/postfix stop #chkconfig --level 2345 postfix off #/etc/init.d/zimbra restart (7)測試 在客戶端上 修改 # vim /etc/resolv.conf nameserver 10.10.54.88 --DNS IP 瀏覽器中輸入「http://mail.cat.com/」 登陸 用戶名:admin 密碼:123456 --第5步輸入的密碼 注意:若是能重啓,瀏覽器出不來,重啓機器,把postfix關閉!!!!!!! #/etc/init.d/postfix stop (8)郵件管理 管理後臺 瀏覽器中輸入「https://mail.cat.com:7071/」 用戶名:admin 密碼:123456 --第5步輸入的密碼 新建用戶: home-->Add Account 管理用戶: home-->Manage Account
2、在安裝過程當中出現的錯誤及解決方法瀏覽器
出現錯誤: Checking for prerequisites... FOUND: NPTL MISSING: nc FOUND: sudo-1.8.6p3-7 FOUND: libidn-1.18-2 FOUND: gmp-4.3.1-7 FOUND: /usr/lib64/libstdc++.so.6 Checking for suggested prerequisites... FOUND: perl-5.10.1 MISSING: sysstat does not appear to be installed. FOUND: sqlite 解決方法: [root@mail ~]# yum install nc.x86_64 [root@mail ~]# yum install sysstat.x86_64
出現錯誤: Checking required space for zimbra-core Checking space for zimbra-store /opt/zimbra requires at least 5GB of space to install. 0GB is not enough space to install. Installation cancelled. 磁盤不足 解決方法: 若是不作第四步,就會出現這個問題 增長磁盤空間
3、zimbra一些命令服務器
查看mysql密碼
[root@mail bin]# /opt/zimbra/bin/zmlocalconfig -s |grep zimbra_mysqlzimbra_mysql_connector_maxActive = 100 zimbra_mysql_password = oY6zRTZhsfOv81YLzgWxAJQDuT7H zimbra_mysql_user = zimbra
查看端口
//查看端口 [root@mail bin]# ps -ef |grep mysql /data --plugin-dir=/opt/zimbra/mysql/lib/plugin --external-locking --log-error=/opt/zimbra/log/mysql_error.log --pid-file=/opt/zimbra/db/mysql.pid --socket=/opt/zimbra/db/mysql.sock --port=7306
查找mysql.sock
[root@mail bin]# find /opt/zimbra/ -name *.sock /opt/zimbra/db/mysql.sock
登陸mysql
/opt/zimbra/mysql/bin/mysql -uzimbra -poY6zRTZhsfOv81YLzgWxAJQDuT7H -P7306 --socket=/opt/zimbra/db/mysql.sock
刪除zimbra
./install.sh -u