• Tools Online
    • Tạo CSR
    • SSL Checker
    • DNS Checker
    • View IP
    • Whois Domain
  • Diễn Đàn Hỏi Đáp
  • Profile
  • Ủng hộ
Đỗ Trung Quân
Banner
  • Home
  • Hướng dẫn chung
  • Linux
    • Linux Tricks
    • Distro Linux
      • CentOS/RedHat
      • CloudLinux
      • Ubuntu/Debian
      • AlmaLinux
      • Rocky Linux
    • WebServer
      • NGINX
      • Apache
      • LiteSpeed
      • Reverse Proxy
    • Virtualization
      • KVM
      • Proxmox
      • OpenVZ
    • Monitoring Tool
      • Prometheus
      • Zabbix
    • DevOPS
      • Ansible
      • Docker
      • Kubernetes
      • Jenkins
      • Cloud
        • GCP
        • AWS
        • Azure
    • Mail Server
    • Database
    • VPN
  • ControlPanel
    • cPanel
    • DirectAdmin
    • aaPanel
    • CyberPanel
    • VestaCP
    • FastPanel
    • CloudPanel
    • HestiaCP
    • Script VPS
  • DNS
    • Domain
  • CMS
    • WordPress
    • Laravel
  • Security
    • SSL
    • Firewall
  • Dịch Vụ
    • Thiết Kế Web
    • Dịch vụ cài đặt tối ưu VPS/Server
    • Cài đặt WordPress & Tối ưu WordPress
    • Dịch vụ xử lý mã độc trên WordPress
    • Xác minh cài đặt SSL
    • Dich vụ Backlink
  • Liên Hệ

Hướng dẫn cài đặt máy chủ email Zimbra trên CentOS 7

by ĐỖ TRUNG QUÂN 18 Tháng Mười Hai, 2019
written by ĐỖ TRUNG QUÂN Published: 18 Tháng Mười Hai, 2019Last Updated on 4 Tháng Tư, 2022 21 comments 3.738 views

NỘI DUNG

  • Bước 1: Cập nhật bản ghi mail
  • Bước 2:  Kiểm tra và cập nhật hệ thống
  • Bước 3: Kiểm tra và set hostname
  • Bước 4: Cài đặt Zimbra
  • Bước 5: Mở Port Firewall

Mail Server là một trong những Máy chủ quan trọng và quan trọng đối với mọi tổ chức vì hầu hết các giao tiếp kinh doanh chỉ được thực hiện qua email. Trong thế giới nguồn mở có một vài máy chủ email miễn phí nhưng Zimbra là một trong những máy chủ thư hàng đầu. Máy chủ thư Zimbra a.k.a ZCS (Bộ cộng tác Zimbra) có hai phiên bản, Nguồn mở và phiên bản doanh nghiệp.

Và bài viết này mình sẽ hướng dẫn bạn thực hiện cài đặt một máy chủ mail riêng cho công ty, doanh nghiệp của bạn.

zimbra

Bước 1: Cập nhật bản ghi mail

Để phục vụ cho việc cài đặt. Bạn hãy trỏ bản ghi mail như sau trước nhé. Bên dưới là 2 bản ghi và mẫu của mình.

TypeName ValueTTL
MX@ or domainmail.domainAuto
Amailip-serverAuto
Screenshot 2021 07 24 at 10.24.34

Bước 2:  Kiểm tra và cập nhật hệ thống

Bước đầu tiên bạn cần kiểm tra SELINUX xem có đang bật không, nếu đang bật thì bạn tắt đi.

# vi /etc/selinux/config
SELINUX=disabled
[root@mail ~]# sestatus
SELinux status: disabled

Screenshot 2021 07 24 at 10.13.35

Thực hiện stop postfix và remove postfix.

Postfix là một phầm mềm nguồn mở được dùng để gửi mail (Mail Transfer Agent-MTA). Được phát hành bởi IBM với mục tiêu thay thế trình gửi mail phổ biến là sendmail. Nó được trang bị trên hệ điều hành do đó bạn hãy xoá bỏ để sử dụng dịch vụ riêng của Zimbra.

[root@mail ~]# systemctl stop postfix
[root@mail ~]# yum remove postfix -y
Screenshot 2021 07 24 at 10.14.16

Sau đó bạn cập nhật hệ thống bằng lệnh sau và reboot lại máy chủ để áp dụng

[root@mail ~]# yum update -y ; reboot

Bước 3: Kiểm tra và set hostname

Bạn thực hiện kiểm tra hostname và set lại hostname tương ứng

[root@mail ~]# hostnamectl set-hostname mail.dotrungquan.site
[root@mail ~]# exec bash
Screenshot 2021 07 24 at 10.18.11

Sau khi set hostname xong bạn thêm dòng sau vào file hosts bạn nhớ thay đổi IP bằng IP của bạn nha.

[root@mail ~]# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
103.221.220.187 mail.dotrungquan.site

Bước 4: Cài đặt Zimbra

Bạn thực hiệ chạy lệnh sau để install Zimbra & ZCS dependencies

[root@mail ~]# yum install unzip net-tools sysstat openssh-clients perl-core libaio nmap-ncat libstdc++.so.6 wget -y

Bước tiếp theo bạn cần Download Zimbra và cài đặt. Và bạn cần tạo một thư mục zimbra để cài vào đó. Bạn cũng có thể xem các phiên bản Zimbra ở trang chủ để download nhé.

[root@mail ~]# mkdir zimbra && cd zimbra
[root@mail zimbra]# wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz --no-check-certificate
Screenshot 2021 07 24 at 10.40.27

Sau khi download về hoàn tất bạn tiến hành giải nén file ra

[root@mail zimbra]# tar zxpvf zcs*.tgz

Truy cập vào thư mục vừa giải nén và chạy lệnh ./install

[root@mail zimbra]# cd zcs* && ./install.sh

Screenshot 2021 07 24 at 10.41.29

[root@mail zimbra]# cd zcs* && ./install.sh
Operations logged to /tmp/install.log.SJIMGleG
Checking for existing installation...
...
  zimbra-license-tools...NOT FOUND
...
Do you agree with the terms of the software license agreement? [N] y
Use Zimbra's package repository [Y] y
Importing Zimbra GPG key
Configuring package repository
Checking for installable packages
Found zimbra-core (local)
Found zimbra-ldap (local)
Found zimbra-logger (local)
Found zimbra-mta (local)
Found zimbra-dnscache (local)
Found zimbra-snmp (local)
Found zimbra-store (local)
Found zimbra-apache (local)
Found zimbra-spell (local)
Found zimbra-memcached (repo)
Found zimbra-proxy (local)
Found zimbra-drive (repo)
Found zimbra-imapd (local)
Found zimbra-patch (repo)
Select the packages to install
Install zimbra-ldap [Y] y
Install zimbra-logger [Y] y
Install zimbra-mta [Y] y
Install zimbra-dnscache [Y] y
Install zimbra-snmp [Y] y
Install zimbra-store [Y] y
Install zimbra-apache [Y] y
Install zimbra-spell [Y] y
Install zimbra-memcached [Y] y
Install zimbra-proxy [Y] y
Install zimbra-drive [Y] y
Install zimbra-imapd (BETA - for evaluation only) [N] y
Install zimbra-chat [Y] y
Checking required space for zimbra-core
Checking space for zimbra-store
Checking required packages for zimbra-store
zimbra-store package check complete.
Installing:
...
  zimbra-dnscache
  zimbra-snmp
  zimbra-store
  zimbra-apache
  zimbra-spell
...
The system will be modified.  Continue? [N] y
Beginning Installation - see /tmp/install.log.SJIMGleG for details...
...
                                   zimbra-snmp will be installed.
                       zimbra-store-components will be downloaded and installed.
                     zimbra-jetty-distribution will be downloaded and installed.
                              zimbra-mbox-conf will be installed.
...
Downloading packages (11):
 zimbra-core-components
 zimbra-ldap-components
 zimbra-mta-components
 zimbra-dnscache-components
 zimbra-snmp-components
 zimbra-store-components
 zimbra-jetty-distribution
 zimbra-apache-components
 zimbra-spell-components
 zimbra-memcached
 zimbra-proxy-components
    ...
Installing extra packages (3):
 zimbra-drive
 zimbra-patch
 zimbra-chat
    ...done
Running Post Installation Configuration:
Operations logged to /tmp/zmsetup.20191218-041840.log
Installing LDAP configuration database...done.
Setting defaults...
DNS ERROR resolving MX for mail.dotrungquan.site
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [mail.dotrungquan.site] dotrungquan.site
MX: mail.dotrungquan.site (103.221.220.204)
Interface: 127.0.0.1
Interface: ::1
Interface: 103.221.220.187
done.
Checking for port conflicts
Port conflict detected: 25 (zimbra-mta)
Port conflict detected: 25 (zimbra-mta)
Port conflicts detected! - Press Enter/Return key to continue # Enter
Main menu
 1) Common Configuration:                                                  
 2) zimbra-ldap:                             Enabled                       
 3) zimbra-logger:                           Enabled                       
 4) zimbra-mta:                              Enabled                       
 5) zimbra-dnscache:                         Enabled                       
 6) zimbra-snmp:                             Enabled                       
 7) zimbra-store:                            Enabled                       
      +Create Admin User:                    yes                           
      +Admin user to create:                 admin@dotrungquan.site   
******* +Admin Password                        UNSET     ## Chưa set password nên hiện UNSET                    
      +Anti-virus quarantine user:           virus-quarantine.eu5lddmo4o@mail.dotrungquan.site
      +Enable automated spam training:       yes                           
      +Spam training user:                   spam.9zr3tkfgx@mail.dotrungquan.site
      +Non-spam(Ham) training user:          ham.xppyw1ac0x@mail.dotrungquan.site
      +SMTP host:                            mail.dotrungquan.site         
      +Web server HTTP port:                 8080                          
      +Web server HTTPS port:                8443                          
      +Web server mode:                      https                         
      +IMAP server port:                     7143                          
      +IMAP server SSL port:                 7993                          
      +POP server port:                      7110                          
      +POP server SSL port:                  7995                          
      +Use spell check server:               yes                           
      +Spell server URL:                     http://mail.dotrungquan.site:7780/aspell.php
      +Enable version update checks:         TRUE                          
      +Enable version update notifications:  TRUE                          
      +Version update notification email:    admin@dotrungquan.site   
      +Version update source email:          admin@dotrungquan.site   
      +Install mailstore (service webapp):   yes                           
      +Install UI (zimbra,zimbraAdmin webapps): yes                           
 8) zimbra-spell:                            Enabled                       
 9) zimbra-proxy:                            Enabled                       
10) zimbra-imapd:                            Enabled                       
11) Default Class of Service Configuration:                                
 s) Save config to file                                                    
 x) Expand menu                                                            
 q) Quit                                    
Address unconfigured (**) items  (? - help) 7
Store configuration
 1) Status:                                  Enabled                       
 2) Create Admin User:                       yes                           
 3) Admin user to create:                    admin@dotrungquan.site   
** 4) Admin Password                           UNSET                         
 5) Anti-virus quarantine user:              virus-quarantine.eu5lddmo4o@mail.dotrungquan.site
 6) Enable automated spam training:          yes                           
 7) Spam training user:                      spam.9zr3tkfgx@mail.dotrungquan.site
 8) Non-spam(Ham) training user:             ham.xppyw1ac0x@mail.dotrungquan.site
 9) SMTP host:                               mail.dotrungquan.site         
10) Web server HTTP port:                    8080                          
11) Web server HTTPS port:                   8443                          
12) Web server mode:                         https                         
13) IMAP server port:                        7143                          
14) IMAP server SSL port:                    7993                          
15) POP server port:                         7110                          
16) POP server SSL port:                     7995                          
17) Use spell check server:                  yes                           
18) Spell server URL:                        http://mail.dotrungquan.site:7780/aspell.php
19) Enable version update checks:            TRUE                          
20) Enable version update notifications:     TRUE                          
21) Version update notification email:       admin@dotrungquan.site   
22) Version update source email:             admin@dotrungquan.site  
23) Install mailstore (service webapp):      yes                           
24) Install UI (zimbra,zimbraAdmin webapps): yes                   
Select, or 'r' for previous menu [r] 4 
Password for admin@dotrungquan.site (min 6 characters): [n4JFxQ8fNn] n4JFxQ8fNn
1) Status:                                  Enabled                       
2) Create Admin User:                       yes                           
3) Admin user to create:                    admin@mail.dotrungquan.site   
 4) Admin Password                           set     # Đã set password                      
5) Anti-virus quarantine user:              virus-quarantine.eu5lddmo4o@mail.dotrungquan.site
6) Enable automated spam training:          yes                           
7) Spam training user:                      spam.9zr3tkfgx@mail.dotrungquan.site
8) Non-spam(Ham) training user:             ham.xppyw1ac0x@mail.dotrungquan.site
9) SMTP host:                               mail.dotrungquan.site         
10) Web server HTTP port:                    8080                          
Select, or 'r' for previous menu [r] r
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] yes
The system will be modified - continue? [No] yes
.......
The VERSION of zcs installed (8.8.10_GA_3039_RHEL7_64)
The ADMIN EMAIL ADDRESS created (admin@dotrungquan.site)
Notify Zimbra of your installation? [Yes] yes
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER=8.8.10_GA_3039_RHEL7_64&MAIL=admin@mail.dotrungquan.site
Notification complete
Checking if the NG started running...done. 
Setting up zimbra crontab...done.
Moving /tmp/zmsetup.20191218-041840.log to /opt/zimbra/log
Configuration complete - press return to exit 
[root@mail zcs-8.8.10_GA_3039.RHEL7_64.20180928094617]# 

Khi cài đặt xong bạn hãy khởi động lại dịch vụ Zimbra bằng lệnh sau

[root@mail ~]# su zimbra
[zimbra@mail root]$ zmcontrol restart
Screenshot 2021 07 24 at 11.04.21

Bước 5: Mở Port Firewall

Như vậy là đã hoàn tất rồi nhé, nếu máy chủ bạn có cài Firewall bạn cần mở các port sau ra để email hoạt động

  • Dưới đây là các Port bạn cần mở
25,80,110,143,443,465,587,993,995,5222,5223,9071,7071
firewall-cmd --permanent --add-port={25,80,110,143,443,465,587,993,995,5222,5223,9071,7071}/tcp
firewall-cmd --reload

Sau đó bạn truy cập admin zimbra bằng IP:port qua giao thức https nhé

  • VD: https://103.221.220.187:7071/
Screenshot 2021 07 24 at 11.07.05
Giao diện đăng nhập Zimbra mail
Screenshot 2021 07 24 at 11.07.45

Chúc bạn thực hiện thành công. Nếu cần triển khai hệ thống mail hãy liên hệ với mình nhé.

4.9/5 - (20 bình chọn)

Hãy tham gia Nhóm Hỗ Trợ VPS Hosting để cùng học hỏi và trao đổi kiến thức nhé. Chúc bạn thành công.

cài đặt zimbra trên centos 7zimbra
Share 0 FacebookTwitterPinterestTelegramEmail
ĐỖ TRUNG QUÂN

Mình tên là Đỗ Trung Quân, hiện đang công tác tại AZDIGI với vị trí là SysAdmin. Mình đam mê viết Blog. Vì viết Blog giúp mình trau dồi được nhiều kỹ năng. Học hỏi thêm nhiều kiến thức mới, từ đó mình có thể chia sẻ đến các bạn các bài viết tài liệu bổ ích hơn. Hiện tại mình là admin của Blog dotrungquan.info - linuxcanban.com - it.info.vn. Mới đây mình có tạo ra một Nhóm Hỗ Trợ VPS Hosting với mục đích gây dựng một cộng đồng nhỏ để mọi người trao đổi kinh nghiệm, kiến thức quản trị VPS. Các thủ thuật, mẹo vặt khi sử dụng VPS. Rất mong nhận được sự ủng hộ của các bạn.

Bạn sẽ thích bài viết này

Hướng dẫn đổi Hostname Zimbra Mail Server

8 Tháng Mười Hai, 2022

Hướng dẫn cấu hình PolicyD trên Zimbra Server

1 Tháng Mười Một, 2022

Hướng dẫn đăng nhập mail Outlook trên Windows

25 Tháng Mười, 2022

Hướng dẫn đăng nhập mail Outlook trên MacOS

24 Tháng Mười, 2022

Xử lý sự cố spam trên Zimbra

20 Tháng Bảy, 2022

Hướng dẫn cài đặt chứng chỉ SSL mail...

16 Tháng Năm, 2022

Hướng dẫn cấu hình Mail Relay trên Zimbra

15 Tháng Năm, 2022

Hướng dẫn phân quyền trong Zimbra Mail

24 Tháng Tư, 2022

Hướng dẫn cài ZeroSSL trên Zimbra Mail

11 Tháng Tư, 2022

Hướng dẫn đăng ký Zoho miễn phí mãi...

23 Tháng Mười, 2021
Theo dõi
Đăng nhập
Thông báo của
guest

guest

21 Comments
Cũ nhất
Mới nhất Được bỏ phiếu nhiều nhất
Phản hồi nội tuyến
Xem tất cả bình luận
wpdiscuz   wpDiscuz

Nhóm Hỗ Trợ Hosting VPS

Nhóm Hỗ Trợ VPS Hosting

Tin Khuyến Mãi

Thông tin về tôi

Thông tin về tôi

Mình tên là Đỗ Trung Quân, hiện đang công tác tại AZDIGI với vị trí là SysAdmin. Mình đam mê viết Blog. Vì viết Blog giúp mình trau dồi được nhiều kỹ năng. Học hỏi thêm nhiều kiến thức mới, từ đó mình có thể chia sẻ đến các bạn các bài viết tài liệu bổ ích hơn.

Facebook Instagram Youtube Telegram

BÀI VIẾT PHỔ BIẾN

  • 1

    Hướng dẫn chuyển website WordPress bằng All in one Migration

  • 2

    Sử dụng Plugin Query Monitor để gỡ lỗi và tăng hiệu suất

  • 3

    Những tính năng mới trong WordPress 6.2

  • 4

    Khắc phục thông báo “utf8mb4 yêu cầu thư viện mới hơn” trên WordPress

Phản hồi gần đây

  • Minh trong Thiết lập nhiều website sử dụng chung một tài khoản MySQL
  • Lê Văn trong Hướng dẫn trỏ tên miền về Blogspot (blogger)
  • Quân trong Hướng dẫn cài đặt và cấu hình plugin W3 Total Cache cho website WordPress
  • Học Luật trong Sử dụng RSYNC để Clone một VPS hoàn chỉnh

Top Commentators

  • Anh Quân Anh Quân (133)
  • nghĩa nghĩa (8)
  • Bùi Đức Hiệp Bùi Đức Hiệp (7)
  • David Do David Do (7)
  • Bamboo Bamboo (5)
  • Bình Minh Bình Minh (5)
  • Cai Việt Hoàng Cai Việt Hoàng (5)
  • Duc Thuan Duc Thuan (5)

BẠN BÈ & ĐỐI TÁC

Thạch Phạm | aaPanel | Linux Căn Bản | Bảo Trần | Trương Quốc Cường | Đàm Trung Kiên | CaiSSL.com

Bạn được quyền sao chép lại nội dung trên website Đỗ Trung Quân, miễn là có dẫn nguồn.

Hosting/VPS được tài trợ bởi AZDIGI - Nhà cung cấp Server Hosting tốt nhất hiện nay

AZDIGI - Nhà cung cấp Server Hosting tốt nhất hiện nay


Back To Top
Đỗ Trung Quân
  • Home
  • Hướng dẫn chung
  • Linux
    • Linux Tricks
    • Distro Linux
      • CentOS/RedHat
      • CloudLinux
      • Ubuntu/Debian
      • AlmaLinux
      • Rocky Linux
    • WebServer
      • NGINX
      • Apache
      • LiteSpeed
      • Reverse Proxy
    • Virtualization
      • KVM
      • Proxmox
      • OpenVZ
    • Monitoring Tool
      • Prometheus
      • Zabbix
    • DevOPS
      • Ansible
      • Docker
      • Kubernetes
      • Jenkins
      • Cloud
        • GCP
        • AWS
        • Azure
    • Mail Server
    • Database
    • VPN
  • ControlPanel
    • cPanel
    • DirectAdmin
    • aaPanel
    • CyberPanel
    • VestaCP
    • FastPanel
    • CloudPanel
    • HestiaCP
    • Script VPS
  • DNS
    • Domain
  • CMS
    • WordPress
    • Laravel
  • Security
    • SSL
    • Firewall
  • Dịch Vụ
    • Thiết Kế Web
    • Dịch vụ cài đặt tối ưu VPS/Server
    • Cài đặt WordPress & Tối ưu WordPress
    • Dịch vụ xử lý mã độc trên WordPress
    • Xác minh cài đặt SSL
    • Dich vụ Backlink
  • Liên Hệ
wpDiscuz