Zimbra 설치

1. 준비사항
– centos 7.4 minimal 설치
– /opt 파티션 최소 5GB 이상

– /etc/hosts 파일편집
127.0.0.1 localhost.localdomain localhost
192.168.1.254 mail.ycis.co.kr mail
– 메일 서비스를 위한 MX 레코드 DNS 설정

2. 기존서비스 중지, sysstat 외 설치
systemctl stop postfix
systemctl disable postfix
#기타 http, ldap 서비스 등을 중지 및 비활성화 합니다.
yum -y install perl-core unzip libaio nmap-ncat sysstat openssh-clients

3. zimbra 다운로드 및 설치
1) zimbra 다운로드 (참고 : https://zimbra.org/download/zimbra-collaboration)
cd /usr/local/src
wget https://files.zimbra.com/downloads/8.7.7_GA/zcs-8.7.7_GA_1787.RHEL7_64.20170410133400.tgz
tar zxvf zcs-8.7.7_GA_1787.RHEL7_64.20170410133400.tgz

## 최신버전 URL 참고 ##
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.6_GA_1906.RHEL7_64.20171130041047.tgz

cd /usr/local/src
wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.7.7_GA_1787.RHEL7_64.20170410133400.tgz
tar zxvf zcs-8.8.15_GA_1787.RHEL7_64.20170410133400.tgz

2) Install
cd /usr/local/src/zcs-8.7.7_GA_1787.RHEL7_64.20170410133400
./install.sh –platform-override
~
Do you agree with the terms of the software license agreement? [N] Y
Use Zimbra’s package repository [Y] Y
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-chat [Y] Y
Install zimbra-drive [Y] Y
~
The system will be modified. Continue? [N] y
~ 패키지 설치 ~
DNS ERROR resolving localhost.localdomain
It is suggested that the hostname be resolvable via DNS
Change hostname [Yes]
Please enter the logical hostname for this host [localhost.localdomain] orlinux.com
~
Main Menu
admin@orlinux.com 비번설정
Version update notification email 설정
Version update source email 설정
TimeZone 설정
~
Select from menu, or press ‘a’ to apply config (? – help) a
Save configuration data to a file? [Yes]
The system will be modified – continue? [No] Y
~
Notify Zimbra of your installation? [Yes] N
Configuration complete – press return to exit

cd /usr/local/src/zcs-8.7.7_GA_1787.RHEL7_64.20170410133400
./install.sh –platform-override
~
Do you agree with the terms of the software license agreement? [N] Y
Use Zimbra’s package repository [Y] Y
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-chat [Y] Y
Install zimbra-drive [Y] Y
~
The system will be modified. Continue? [N] y
~ 패키지 설치 ~
DNS ERROR resolving localhost.localdomain
It is suggested that the hostname be resolvable via DNS
Change hostname [Yes]
Please enter the logical hostname for this host [localhost.localdomain] orlinux.com
~
Main Menu
admin@ycis.co.kr 비번설정
Version update notification email 설정
Version update source email 설정
TimeZone 설정
~
Select from menu, or press ‘a’ to apply config (? – help) a
Save configuration data to a file? [Yes]
The system will be modified – continue? [No] Y
~
Notify Zimbra of your installation? [Yes] N
Configuration complete – press return to exit

4. zimbra both 모드(http, https) 설정

su – zimbra
zmprov ms mail.orlinux.com zimbraReverseProxyMailMode both
exit

5. Let’s Encrypt SSL 설치 (방법1. 무료 SSL)
1) epel 및 certbot 설치
yum install -y epel-release
yum install -y certbot

yum install -y epel-release
yum install -y certbot

2) zmproxyctl 외 중지 (zimbra 유저로)
su – zimbra
zmproxyctl stop
zmmailboxdctl stop
exit

su – zimbra
zmproxyctl stop
zmmailboxdctl stop
exit

3) 인증서 설치
certbot certonly –standalone
~
Enter email address (used for urgent renewal ane security notices) (Enter ‘c’ to cancel): yourid@yourdomain.com
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
(A)gree/(C)ancel: A
(Y)es/(N)o: y
Please enter in your domain name(s): mail.orlinux.com
~
인증서 파일확인
ls /etc/letsencrypt/live/mail.orlinux.com

certbot certonly –standalone
~
Enter email address (used for urgent renewal ane security notices) (Enter ‘c’ to cancel): yourid@yourdomain.com
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
(A)gree/(C)ancel: A
(Y)es/(N)o: y
Please enter in your domain name(s): mail.orlinux.com
~
인증서 파일확인
ls /etc/letsencrypt/live/mail.orlinux.com

4) /etc/letsencrypt/live/도메인/chain.pem 파일에 Root CA 추가
—–BEGIN CERTIFICATE—–
YOURCHAIN
—–END CERTIFICATE—–
—–BEGIN CERTIFICATE—–
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
—–END CERTIFICATE—–

5) commercial 인증서 Zimbra 복사
mkdir /opt/zimbra/ssl/letsencrypt
cp /etc/letsencrypt/live/mail.ycis.co.kr/* /opt/zimbra/ssl/letscnrypt/
chown zimbra.zimbra /opt/zimbra/ssl/letsencrypt/*
ls -al /opt/zimbra/ssl/letsencrypt/

mkdir /opt/zimbra/ssl/letsencrypt
cp /etc/letsencrypt/live/mail.ycis.co.kr/* /opt/zimbra/ssl/letscnrypt/
chown zimbra.zimbra /opt/zimbra/ssl/letsencrypt/*
ls -al /opt/zimbra/ssl/letsencrypt/

6) private key 를 Zimbra SSL 경로로 복사, ssl 배포 (zimbra 유저로)
su – zimbra
cd /opt/zimbra/ssl/letsencrypt
zmcertmgr verifycrt comm privkey.pem cert.pem chain.pem
~
Valid certificate chain: cert.pem: OK
~
cp /opt/zimbra/ssl/letsencrypt/privkey.pem /opt/zimbra/ssl/zimbra/commercial/commercial.key
/opt/zimbra/bin/zmcertmgr deploycrt comm cert.pem chain.pem
~ ssl 배포 ~
zmcontrol restart
exit

6. Comodo SSL 설치 (방법2. 상용 SSL)
* 서버에서 csr 키를 생성하지 않고 자동 생성값으로 Comodo SSL 신청하여 사용하는 방법 입니다. *
1) 4개의 인증서 서버에 다운로드
AddTrustExternalCARoot.crt
COMODORSAAddTrustCA.crt
COMODORSADomainValidationSecureServerCA.crt
mail_orlinux_com.crt
mail_orlinux_com_SHA256WITHRSA.key

2) CA 인증서 하나로 합치기
cat AddTrustExternalCARoot.crt COMODORSAAddTrustCA.crt COMODORSADomainValidationSecureServerCA.crt > /tmp/commercial_ca.crt
cp mail_orlinux_com_SHA256WITHRSA.key /opt/zimbra/ssl/zimbra/commercial/commercial.key

3) SSL 인증서 복사
cp mail_orlinux_com.crt /tmp/commercial.crt

4) 인증서 점검
su – zimbra
/opt/zimbra/bin/zmcertmgr verifycrt comm /opt/zimbra/ssl/zimbra/commercial/commercial.key /tmp/commercial.crt /tmp/commercial_ca.crt
~ 생략 ~
Valid Certificate: /tmp/commercial.crt: OK

5) 인증서 배포
su – zimbra
/opt/zimbra/bin/zmcertmgr deploycrt comm /tmp/commercial.crt /tmp/commercial_ca.crt

6) zimbra 재시작
zmcontrol restart

7. 서비스 점검
1) https://IP주소:7071 관리자 페이지 접속 합니다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다