• Webmaster Tools
  • Diễn Đàn Hỏi Đáp
  • Profile
  • Ủng hộ
  • DNS Check
  • CheckIP
  • Liên Hệ
Đỗ Trung Quân
  • HƯỚNG DẪN
  • LINUX
    • Linux Tricks
    • Distro Linux
      • CentOS/RedHat
      • CloudLinux
      • Ubuntu/Debian
      • AlmaLinux
    • WebServer
      • NGINX
      • Apache
      • LiteSpeed
    • Virtualization
    • Monitoring Tool
      • Zabbix
    • DevOPS
      • Ansible
      • Docker
      • Jenkins
      • AWS
    • Mail Server
    • VPN
  • CONTROL PANEL
    • cPanel
    • DirectAdmin
    • aaPanel
    • FastPanel
    • CyberPanel
    • Easypanel
    • VestaCP
    • CloudPanel
    • HestiaCP
    • Plesk
    • Script VPS
  • DNS
    • Domain
  • CMS
    • WordPress
    • Laravel
  • SECURITY
    • SSL
    • Firewall
  • DỊCH VỤHOT
  • WEB MẪUHOT

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

by ĐỖ TRUNG QUÂN 18/12/2019
Tác giả: ĐỖ TRUNG QUÂN Date: 18/12/2019Last Update 04/04/2022 27 comments 6,1K lượt xem
Dịch vụ xử lý mã độc WordPress
WEB MẪU WORDPRESS
Share FacebookTwitterPinterestTelegramEmail
6,1K

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:                 [email protected]   
******* +Admin Password                        UNSET     ## Chưa set password nên hiện UNSET                    
        +Anti-virus quarantine user:           [email protected]
        +Enable automated spam training:       yes                           
        +Spam training user:                   [email protected]
        +Non-spam(Ham) training user:          [email protected]
        +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:    [email protected]   
        +Version update source email:          [email protected]   
        +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:                    [email protected]   
** 4) Admin Password                           UNSET                         
   5) Anti-virus quarantine user:              [email protected]
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      [email protected]
   8) Non-spam(Ham) training user:             [email protected].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:                    [email protected].site   
   4) Admin Password                           set     # Đã set password                      
   5) Anti-virus quarantine user:              [email protected].site
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      [email protected].site
   8) Non-spam(Ham) training user:             [email protected].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&[email protected].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)
cài đặt zimbra trên centos 7zimbra

Tham gia nhóm hỗ trợ WordPress

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay
ĐỖ 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 - CaiSSL.COM - QuantriVPS.COM. Mới đây mình có tạo ra nhóm Hỗ trợ Server - Hosting & WordPress | Hỗ Trợ Xử Lý Mã Độc WordPress 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ÀI VIẾT LIÊN QUAN

Sửa lỗi imapsync BAD maximum message size exceeded...

21/09/2024

Cài đặt Zimbra 10 Open Source Edition trên...

31/07/2024

Hướng dẫn thay đổi Favicon trên Webclient Zimbra

28/07/2024

Hướng dẫn thiết lập chính sách về mật...

27/07/2024

Hướng dẫn di chuyển Zimbra sang Zimbra

26/07/2024

Sửa lỗi system failure exception executing command trên...

26/07/2024

Cài đặt SSL cho nhiều tên miền trên...

25/07/2024

[Zimbra] Email bị chặn do thông báo VIRUS...

27/03/2024

Hướng dẫn Forward mail trên Zimbra

10/01/2024

Sửa lỗi “dnscache is not running” trên Zimbra

07/01/2024
Author Box
Author Image

ĐỖ TRUNG QUÂN

Chuyên viên quản trị hệ thống.

Tư vấn & triển khai dịch vụ

VPS | Hosting | SSL | Mailserver | Website | Sửa lỗi WordPress

Bài viết của tác giả

Hosting/VPS khuyên dùng

Phổ Biến

  • Hướng dẫn tạo SSH Key trên macOS

  • Hướng dẫn sử dụng SSH Key

  • Hướng dẫn cài đặt v2board trên AAPANEL

  • Vấn đề IP Public liên tục bị thay đổi vì sao và cách khắc phục

  • Khắc phục lỗi không hiện hình ảnh và mô tả khi share link lên Facebook

  • Hướng dẫn kích hoạt Theme Flatsome mới nhất.

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

Thạch Phạm | CỔ Ý CONCEPT | Trương Quốc Cường | Đàm Trung Kiên | Web An Tâm | Phong Đinh | Học Mò | PHUNG.VN | Đăng Đạt

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
  • HƯỚNG DẪN
  • LINUX
    • Linux Tricks
    • Distro Linux
      • CentOS/RedHat
      • CloudLinux
      • Ubuntu/Debian
      • AlmaLinux
    • WebServer
      • NGINX
      • Apache
      • LiteSpeed
    • Virtualization
    • Monitoring Tool
      • Zabbix
    • DevOPS
      • Ansible
      • Docker
      • Jenkins
      • AWS
    • Mail Server
    • VPN
  • CONTROL PANEL
    • cPanel
    • DirectAdmin
    • aaPanel
    • FastPanel
    • CyberPanel
    • Easypanel
    • VestaCP
    • CloudPanel
    • HestiaCP
    • Plesk
    • Script VPS
  • DNS
    • Domain
  • CMS
    • WordPress
    • Laravel
  • SECURITY
    • SSL
    • Firewall
  • DỊCH VỤHOT
  • WEB MẪUHOT