Install Zimbra Collaboration and a DNS Server with Script: Difference between revisions
No edit summary |
|||
Line 15: | Line 15: | ||
ff02::2 ip6-allrouters</pre> | ff02::2 ip6-allrouters</pre> | ||
===What is the | ===What is the ZimbraEasyInstall Script=== | ||
This Script install and configures bind9 with the domain and IP that is defined while invoke the command. After that the Scripts prepare the keystroke script with a default installation of Zimbra Collaboration 8.6 (without dnscache) and the config.defaults script, using the domain, IP and password that is defined while invoke the command. Once everything is ready the Script download the latest version of Zimbra Collaboration 8.6, uncompress it and install it using the keystrokes script and the config script. | This Script install and configures bind9 with the domain and IP that is defined while invoke the command. After that the Scripts prepare the keystroke script with a default installation of Zimbra Collaboration 8.6 (without dnscache) and the config.defaults script, using the domain, IP and password that is defined while invoke the command. Once everything is ready the Script download the latest version of Zimbra Collaboration 8.6, uncompress it and install it using the keystrokes script and the config script. | ||
Line 25: | Line 25: | ||
===Usage and Example=== | ===Usage and Example=== | ||
The ''' | The '''ZimbraEasyInstall''' Script is an easy way to install Zimbra Collaboration, without be worry of the DNS configuration, OS dependcies, etc. Just execute it and after a few minutes have Zimbra up and running. | ||
Run the Script '''adding the TLD domain''' for your Zimbra Collaboration server, '''the IP of the DNS server''' (usually will be the same of the server, but instead you are using different eth interfaces), '''and the password''' for the Zimbra Collaboration server. | Run the Script '''adding the TLD domain''' for your Zimbra Collaboration server, '''the IP of the DNS server''' (usually will be the same of the server, but instead you are using different eth interfaces), '''and the password''' for the Zimbra Collaboration server. | ||
'''Example:''' | '''Example:''' | ||
root@zimbramail:/home/oper# ./ | root@zimbramail:/home/oper# ./ZimbraEasyInstall zimbralab.local 192.168.211.40 Zimbra2015 | ||
===The Bash Script=== | ===The Bash Script=== | ||
* You can download it directly from [https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/ | * You can download it directly from [https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/ZimbraEasyInstall https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/ZimbraEasyInstall] | ||
<pre>#!/bin/bash | <pre>#!/bin/bash |
Revision as of 00:30, 15 May 2015
Article Information |
---|
This article applies to the following ZCS versions. |
Install Zimbra Collaboration and a DNS Server with Script
Purpose
Install Zimbra Collaboration and a DNS Server with Script, in Single-Server.
Resolution
Before start
It is really important to have the proper /etc/hosts file, be sure that you have the next in your /etc/hosts, in this case also using IPv6. Change the YOURIP and the hostname.example.com and hostname with your own values:
127.0.0.1 localhost.localdomain localhost YOURIP hostname.example.com hostname # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback ff02::1 ip6-allnodes ff02::2 ip6-allrouters
What is the ZimbraEasyInstall Script
This Script install and configures bind9 with the domain and IP that is defined while invoke the command. After that the Scripts prepare the keystroke script with a default installation of Zimbra Collaboration 8.6 (without dnscache) and the config.defaults script, using the domain, IP and password that is defined while invoke the command. Once everything is ready the Script download the latest version of Zimbra Collaboration 8.6, uncompress it and install it using the keystrokes script and the config script.
Advantages of use the Script
- Time saving
- Fully automated
- Easy to use
- Good for a quick Zimbra Preview
Usage and Example
The ZimbraEasyInstall Script is an easy way to install Zimbra Collaboration, without be worry of the DNS configuration, OS dependcies, etc. Just execute it and after a few minutes have Zimbra up and running.
Run the Script adding the TLD domain for your Zimbra Collaboration server, the IP of the DNS server (usually will be the same of the server, but instead you are using different eth interfaces), and the password for the Zimbra Collaboration server. Example:
root@zimbramail:/home/oper# ./ZimbraEasyInstall zimbralab.local 192.168.211.40 Zimbra2015
The Bash Script
- You can download it directly from https://raw.githubusercontent.com/jorgedlcruz/Zimbra/master/ZimbraEasyInstall
#!/bin/bash #Install a DNS Server and Zimbra Collaboration 8.6 echo "Installing DNS Server" sudo apt-get update && sudo sudo apt-get install -y bind9 bind9utils bind9-doc echo "Configuring DNS Server" sed "s/-u/-4 -u/g" /etc/default/bind9 > /etc/default/bind9.new mv /etc/default/bind9.new /etc/default/bind9 HOSTNAME=$(hostname) rm /etc/bind/named.conf.options cat <<EOF >>/etc/bind/named.conf.options options { directory "/var/cache/bind"; listen-on { $2; }; # ns1 private IP address - listen on private network only allow-transfer { none; }; # disable zone transfers by default forwarders { 8.8.8.8; 8.8.4.4; }; auth-nxdomain no; # conform to RFC1035 #listen-on-v6 { any; }; }; EOF cat <<EOF >>/etc/bind/named.conf.local zone "$1" { type master; file "/etc/bind/db.$1"; }; EOF touch /etc/bind/db.$1 cat <<EOF >/etc/bind/db.$1 \$TTL 604800 @ IN SOA ns1.$1. root.localhost. ( 2 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS ns1.$1. @ IN A $2 @ IN MX 10 $HOSTNAME.$1. $HOSTNAME IN A $2 ns1 IN A $2 mail IN A $2 pop3 IN A $2 imap IN A $2 imap4 IN A $2 smtp IN A $2 EOF sudo service bind9 restart echo "Download and install Zimbra Collaboration dependencies" sudo apt-get install -y netcat-openbsd sudo libidn11 libpcre3 libgmp10 libexpat1 libstdc++6 libperl5.18 libaio1 resolvconf unzip pax sysstat sqlite3 echo "Creating the Scripts files" mkdir /tmp/zcs && cd /tmp/zcs touch /tmp/zcs/installZimbraScript cat <<EOF >/tmp/zcs/installZimbraScript AVDOMAIN="$1" AVUSER="admin@$1" CREATEADMIN="admin@$1" CREATEADMINPASS="$3" CREATEDOMAIN="$1" DOCREATEADMIN="yes" DOCREATEDOMAIN="yes" DOTRAINSA="yes" EXPANDMENU="no" HOSTNAME="$HOSTNAME.$1" HTTPPORT="8080" HTTPPROXY="TRUE" HTTPPROXYPORT="80" HTTPSPORT="8443" HTTPSPROXYPORT="443" IMAPPORT="7143" IMAPPROXYPORT="143" IMAPSSLPORT="7993" IMAPSSLPROXYPORT="993" INSTALL_WEBAPPS="service zimlet zimbra zimbraAdmin" JAVAHOME="/opt/zimbra/java" LDAPAMAVISPASS="$3" LDAPPOSTPASS="$3" LDAPROOTPASS="$3" LDAPADMINPASS="$3" LDAPREPPASS="$3" LDAPBESSEARCHSET="set" LDAPHOST="$HOSTNAME.$1" LDAPPORT="389" LDAPREPLICATIONTYPE="master" LDAPSERVERID="2" MAILBOXDMEMORY="972" MAILPROXY="TRUE" MODE="https" MYSQLMEMORYPERCENT="30" POPPORT="7110" POPPROXYPORT="110" POPSSLPORT="7995" POPSSLPROXYPORT="995" PROXYMODE="https" REMOVE="no" RUNARCHIVING="no" RUNAV="yes" RUNCBPOLICYD="no" RUNDKIM="yes" RUNSA="yes" RUNVMHA="no" SERVICEWEBAPP="yes" SMTPDEST="admin@$1" SMTPHOST="$HOSTNAME.$1" SMTPNOTIFY="yes" SMTPSOURCE="admin@$1" SNMPNOTIFY="yes" SNMPTRAPHOST="$HOSTNAME.$1" SPELLURL="http://$HOSTNAME.$1:7780/aspell.php" STARTSERVERS="yes" SYSTEMMEMORY="3.8" TRAINSAHAM="ham.ttp7f9cwte@$1" TRAINSASPAM="spam.nltbo_u3@$1" UIWEBAPPS="yes" UPGRADE="yes" USESPELL="yes" VERSIONUPDATECHECKS="TRUE" VIRUSQUARANTINE="virus-quarantine.46arq7z7yi@$1" ZIMBRA_REQ_SECURITY="yes" ldap_bes_searcher_password="$3" ldap_dit_base_dn_config="cn=zimbra" ldap_nginx_password="$3" mailboxd_directory="/opt/zimbra/mailboxd" mailboxd_keystore="/opt/zimbra/mailboxd/etc/keystore" mailboxd_keystore_password="$3" mailboxd_server="jetty" mailboxd_truststore="/opt/zimbra/java/jre/lib/security/cacerts" mailboxd_truststore_password="changeit" postfix_mail_owner="postfix" postfix_setgid_group="postdrop" ssl_default_digest="sha256" zimbraFeatureBriefcasesEnabled="Enabled" zimbraFeatureTasksEnabled="Enabled" zimbraIPMode="ipv4" zimbraMailProxy="FALSE" zimbraMtaMyNetworks="127.0.0.0/8 $2/24 [::1]/128 [fe80::]/64" zimbraPrefTimeZoneId="America/Los_Angeles" zimbraReverseProxyLookupTarget="TRUE" zimbraVersionCheckNotificationEmail="admin@$1" zimbraVersionCheckNotificationEmailFrom="admin@$1" zimbraVersionCheckSendNotifications="TRUE" zimbraWebProxy="FALSE" zimbra_ldap_userdn="uid=zimbra,cn=admins,cn=zimbra" zimbra_require_interprocess_security="1" INSTALL_PACKAGES="zimbra-core zimbra-ldap zimbra-logger zimbra-mta zimbra-snmp zimbra-store zimbra-apache zimbra-spell zimbra-memcached zimbra-proxy" EOF touch /tmp/zcs/installZimbra-keystrokes cat <<EOF >/tmp/zcs/installZimbra-keystrokes y y y y n y y y y y y y EOF echo "Downloading Zimbra Collaboration 8.6" wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.UBUNTU14_64.20141215151116.tgz tar xzvf zcs-* echo "Installing Zimbra Collaboration just the Software" cd /tmp/zcs/zcs-* && ./install.sh -s < /tmp/zcs/installZimbra-keystrokes echo "Installing Zimbra Collaboration injecting the configuration" /opt/zimbra/libexec/zmsetup.pl -c /tmp/zcs/installZimbraScript
Access to the Web Client and Admin Console
The Script will take care of everything and after a few minutes you can go to the IP of your server and use the next URL:
- Web Client - https://YOURIP
- Admin Console - https://YOURIP:7071
Additional Content
- Go to the Github project and give your valuable feedback.