zimbra 8.5.0 install on centos and linux 7
This
tutorial describes how to setup a local Yum repository on CentOS 7 system.
Also, the same steps should work on RHEL and Scientific Linux 7 systems too.
If you
have to install software, security updates and fixes often in multiple systems
in your local network, then having a local repository is an efficient way.
Because all required packages are downloaded over the fast LAN connection from
your local server, so that it will save your Internet bandwidth and reduces
your annual cost of Internet.
In this
tutorial, I use two systems as described below:
Yum Server
OS : CentOS 7 (Minimal Install)
Yum Server IP Address
: 192.168.0.53
Prerequisites
First,
mount your CentOS 7 installation DVD. For example, let us mount the
installation media on /mnt directory.
mount /dev/cdrom /mnt/
Now the
CentOS installation DVD is mounted under /mnt directory. Next install
vsftpd package and let the packages available over FTP to your local clients.
To do
that change to /mnt/Packages directory:
cd /mnt/Packages/
Now
install vsftpd package:
rpm -ivh
vsftpd-3.0.2-9.el7.x86_64.rpm
Enable
and start vsftpd service:
systemctl enable
vsftpd
systemctl start vsftpd
We need
a package called “createrepo” to create our local repository. So let us
install it too.
If you
did a minimal CentOS installation, then you might need to install the following
dependencies first:
rpm -ivh
libxml2-python-2.9.1-5.el7.x86_64.rpm
rpm -ivh
deltarpm-3.6-3.el7.x86_64.rpm
rpm -ivh
python-deltarpm-3.6-3.el7.x86_64.rpm
Now
install “createrepo” package:
rpm -ivh
createrepo-0.9.9-23.el7.noarch.rpm
Build Local Repository
It’s
time to build our local repository. Create a storage directory to store all
packages from CentOS DVD’s.
As I
noted above, we are going to use a FTP server to serve all packages to client
systems. So let us create a storage location in our FTP server pub directory.
mkdir
/var/ftp/pub/localrepo
Now,
copy all the files from CentOS DVD(s) i.e from /mnt/Packages/ directory
to the “localrepo” directory:
cp -ar
/mnt/Packages/*.* /var/ftp/pub/localrepo/
Again,
mount the CentOS installation DVD 2 and copy all the files to/var/ftp/pub/localrepo directory.
Once
you copied all the files, create a repository file called “localrepo.repo” under/etc/yum.repos.d/ directory and add the following lines into the file. You can
name this file as per your liking:
vi
/etc/yum.repos.d/localrepo.repo
Add the
following lines:
[localrepo]
name=Unixmen
Repository
baseurl=file:///var/ftp/pub/localrepo
gpgcheck=0
enabled=1
Note: Use three
slashes(///) in the baseurl.
Now,
start building local repository:
createrepo -v
/var/ftp/pub/localrepo/
Now the
repository building process will start.
Sample
Output:
Now,
list out the repositories using the following command:
yum repolist
Sample
Output:
repo
id
repo
name
status
base/7/x86_64
CentOS-7 -
Base
8,465
extras/7/x86_64
CentOS-7 -
Extras
30
localrepo
Unixmen
Repository
3,538
updates/7/x86_64
CentOS-7 -
Updates
726
Clean
the Yum cache and update the repository lists:
yum clean all
yum update
After
creating the repository, disable or rename the existing repositories if you
only want to install packages from the local repository itself.
Alternatively,
you can install packages only from the local repository by mentioning the
repository as shown below.
yum install
--disablerepo="*" --enablerepo="localrepo" httpd
Sample
Output:
Loaded plugins:
fastestmirror
Loading mirror speeds
from cached hostfile
Resolving Dependencies
--> Running
transaction check
---> Package
httpd.x86_64 0:2.4.6-17.el7.centos.1 will be installed
--> Processing
Dependency: httpd-tools = 2.4.6-17.el7.centos.1 for package:
httpd-2.4.6-17.el7.centos.1.x86_64
--> Processing
Dependency: /etc/mime.types for package: httpd-2.4.6-17.el7.centos.1.x86_64
--> Processing
Dependency: libaprutil-1.so.0()(64bit) for package:
httpd-2.4.6-17.el7.centos.1.x86_64
--> Processing
Dependency: libapr-1.so.0()(64bit) for package:
httpd-2.4.6-17.el7.centos.1.x86_64
--> Running
transaction check
---> Package
apr.x86_64 0:1.4.8-3.el7 will be installed
---> Package
apr-util.x86_64 0:1.5.2-6.el7 will be installed
---> Package
httpd-tools.x86_64 0:2.4.6-17.el7.centos.1 will be installed
---> Package
mailcap.noarch 0:2.1.41-2.el7 will be installed
--> Finished
Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================
Package
Arch
Version
Repository
Size
===============================================================================================================================================================
Installing:
httpd
x86_64
2.4.6-17.el7.centos.1
localrepo
2.7 M
Installing for
dependencies:
apr
x86_64
1.4.8-3.el7
localrepo
103 k
apr-util
x86_64
1.5.2-6.el7
localrepo
92 k
httpd-tools
x86_64
2.4.6-17.el7.centos.1
localrepo
77 k
mailcap
noarch
2.1.41-2.el7
localrepo
31 k
Transaction Summary
===============================================================================================================================================================
Install 1
Package (+4 Dependent packages)
Total download size:
3.0 M
Installed size: 10 M
Is this ok [y/d/N]:
Disable
Firewall And SELinux:
As we
are going to use the local repository only in our local area network, there is
no need for firewall and SELinux. So, to reduce the complexity, I disabled both
Firewalld and SELInux.
To
disable the Firewalld, enter the following commands:
systemctl stop
firewalld
systemctl disable
firewalld
To
disable SELinux, edit file /etc/sysconfig/selinux,
vi
/etc/sysconfig/selinux
Set
SELINUX=disabled.
[...]
SELINUX=disabled
[...]
Reboot
your server to take effect the changes.
Usually, i am always
using SUSE Linux Enterprise Server as operating system for Zimbra Mail Server.
But, starting from Zimbra 9.x.x, SLES has been deprecated (end of life) and may
be will not supported by Zimbra. Therefore, i attempt to using CentOS as
operating system for Zimbra. For easy understanding, this is my information
system
Domain : example.com
Hostname : mail
IP Address : 192.168.0.53
# Configure Network
First, we must
configure network on CentOS. Assuming name of your network interface is eth0
1.vi/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.0.53
NETMASK=255.255.252.0
DNS1=192.168.0.53
GATEWAY=192.168.0.1
DNS2=192.168.26.2
USERCTL=no
Restart network
service and setup for automatic boot
1.service network
restart
2.chkconfig network on
#
Configure Disable Selinux & Firewall
Open
file /etc/sysconfig/selinux and change SELINUX=enforcing
become SELINUX=disabled. Also disable some service such as iptables,
ip6tables and firewalld.
1.setenforce 0
2.service firewalld
stop
3.service iptables
stop
4.service ip6tables
stop
5.systemctl disable
firewalld
6.systemctl disable
iptables
7.systemctl disable
ip6tables
# Configure
/etc/hosts, /etc/resolv.conf and hostname
Open file /etc/hosts
and configure as follows
127.0.0.1 localhost
192.168.0.53 mail.example.com mail
Open file
/etc/resolv.conf and configure as follows
search example.com
nameserver 192.168.0.53
nameserver 192.168.26.2
nameserver 8.8.8.8
Do the following
command as root
1.hostname mail.example.com
2.echo "HOSTNAME=mail.example.com" >> /etc/sysconfig/network
# Disable service
sendmail or postfix
Do the following
command as root
1.service sendmail
stop
2.service postfix stop
3.systemctl disable
sendmail
4.systemctl disable postfix
# Update repo and
install package dependency by Zimbra
1.yum update
2.yum -y install perl perl-core wget screenw3m elinks
openssh-clients openssh-server bind bind-utils unzip nmap sednc sysstat
libaio rsync telnet
aspell
# Configure local
DNS Server
Zimbra needed lookup
to MX records on domain that used. For that purpose, we can configure dns
server on machine of Zimbra mail server
Open
file /etc/named.conf and add any on listen-on port 53
and allow-query as follows
listen-on port 53 { 127.0.0.1; 192.168.0.53; };
allow-query { localhost; 192.168.0.53; };
Create a zone on the
bottom of file named.conf as follows
zone "example.com" IN {
type master;
file "db.example.com";
allow-update { none; };
};
Create database for
new zone has been created on folder /var/named/
1.touch /var/named/db.example.com
2.chgrp named /var/named/db.example.com
3.vi /var/named/db.example.com
fill as follows
$TTL 1D
@ IN SOA mail.example.com. root.. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS
mail.example.com.
@ IN MX
0 mail.example.com.
mail IN A
192.168.0.53
# Restart Service
& Check results configuring DNS Server
1.service named
restart
2.systemctl enable named
3.nslookup mail.example.com
4.dig example.com mx
If results from above
command as follows, your configuration dns has been success
[root@mail opt]# nslookup mail.example.com
Server: 192.168.0.53
Address: 192.168.0.53#53
Name: mail.example.com
Address: 192.168.0.53
Preparation for
install Zimbra has been finished. Now we can install zimbra and will explained
on next section
1.cd /opt/
After finished download,
extract Zimbra, cd to folder result of extract and install Zimbra
1.tar -zxvf
zcs-8.5.0_GA_3042.RHEL7_64.20140828204420.tgz2.cd zcs-8.5.0_GA_3042.RHEL7_64.201408282044203.sh install.sh
type Y if asking license
agreement
Do you agree with the terms of the software license agreement? [N] Y
Select the packages to
install like follows
Install zimbra-ldap [Y] Y
Install zimbra-logger [Y] Y
Install zimbra-mta [Y] Y
Install zimbra-dnscache [Y] N
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
Type Y if asked The
system will be modified. Continue?
if get message like
follows, enter or type Yes and change domain name
DNS ERROR resolving MX for mail.example.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] Yes
Create domain: [mail.example.com] example.com
if you not change domain
name on above section, your domain name will become mail.example.com and email of account will become user@mail.example.com.
Type 6 and then press key enter to change password of admin account
and type again 4 and then press key enter. Insert your
password that you want
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-logger: Enabled
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: admin@example.com
******* +Admin Password UNSET
+Anti-virus quarantine user: virus-quarantine.dgnsq8ewc@example.com
......
......
Address unconfigured (**) items (? - help) 6
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: admin@example.com
** 4) Admin Password UNSET
5) Anti-virus quarantine user: virus-quarantine.dgnsq8ewc@example.com
......
......
Select, or 'r' for previous menu [r] 4
Password for admin@example.com (min 6 characters): [s8eNUeOms] Verys3cr3t
After insert password,
Select, or ‘r’ for previous menu. If all has been
configured, apply configuration and wait a moment until zimbra finished install
*** 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
Save config in file: [/opt/zimbra/config.24648]
Saving config in /opt/zimbra/config.24648...done.
The system will be modified - continue? [No] Yes
Operations logged to /tmp/zmsetup10052014-214606.log
Type Yes if
asked Notify Zimbra of
your installation? and
if has been appear Configuration
complete – press return to exit, your zimbra installation has been
finished. Check Zimbra status with this command su
– zimbra -c “zmcontrol status” and make sure all service running
well. You can also trying access webmail via browser on url
https://ZimbraServer
Congratulations, you have
been finished install Zimbra 8.5 on CentOS 7. After install, you can improve
anti spam
Nice post, I really like it..
ReplyDeleteRHCSA Certification Training online
RHCE Certification Training online