Changes

Jump to navigation Jump to search
revert back to zarafa version 7.0.13-41388
Line 1: Line 1:  
The below script will install the latest Zarafa 7.0, including dependencies and custom templates as per http://wiki.contribs.org/Zarafa_on_SME8. Please be aware that you read the how-to carefully to fully understand what the below script will install, remove or modify!!. The script will asume it runs on a fresh and updated SME8 setup connected to the internet. The main reason for this script is to reduce the installation time required of installing Zarafa 7.0 on SME8.
 
The below script will install the latest Zarafa 7.0, including dependencies and custom templates as per http://wiki.contribs.org/Zarafa_on_SME8. Please be aware that you read the how-to carefully to fully understand what the below script will install, remove or modify!!. The script will asume it runs on a fresh and updated SME8 setup connected to the internet. The main reason for this script is to reduce the installation time required of installing Zarafa 7.0 on SME8.
{{Note box|This script will only work with the Zarafa 7.0 series, it will fail on the 7.1 series due to changes in Zarafa 7.1 config files
+
{{Note box|<br>
 +
* This script will only work with the Zarafa 7.0 series, it will fail on the 7.1 series due to changes in Zarafa 7.1 config files
 
* The server must have internet access when te script is executed.
 
* The server must have internet access when te script is executed.
* This is not a 'point and click' installation. A thorough understanding of Zarafa, SME Server and DB entries is required. Please study [[Zarafa_on_SME8|this]] page carefully.}}
+
* This is not a 'point and click' installation. A thorough understanding of Zarafa, SME Server and DB entries is required. Please study [[Zarafa_on_SME8|this]] page carefully.
 +
* Adjusted script to auto detect architecture and SME Version.}}
    
What we actually need is a member that has RPM skills to create and maintain a SME8-Zarafa7 rpm. Interested anyone?
 
What we actually need is a member that has RPM skills to create and maintain a SME8-Zarafa7 rpm. Interested anyone?
Line 9: Line 11:  
1. Log in as root and create an installation directory and move to that directory
 
1. Log in as root and create an installation directory and move to that directory
   −
2. Copy the below script and paste it into the installation directory as install-zarafa7.sh
+
2. Copy the below script and paste it into the installation directory as install-zarafa7.0.sh
   −
3. Make install-zarafa.sh executable (chmod 755 install-zarafa7.sh)
+
3. Make install-zarafa7.0.sh executable (chmod 755 install-zarafa7.0.sh)
   −
4. Execute the script (./install-zarafa7.sh)
+
4. Execute the script (./install-zarafa7.0.sh)
    
The script will take care of all downloads, templates and custom templates (as per the how-to) and will leave you at the point where you have to select language (UTF) and zarafa mechanism db or unix.
 
The script will take care of all downloads, templates and custom templates (as per the how-to) and will leave you at the point where you have to select language (UTF) and zarafa mechanism db or unix.
Line 20: Line 22:       −
===install-zarafa7.sh===
+
===install-zarafa7.0.sh===
 
(credits forum user frifri)
 
(credits forum user frifri)
   Line 1,009: Line 1,011:  
fi
 
fi
 
fi
 
fi
 +
 +
#######################################
 +
# Z-Push
 +
#######################################
 +
 +
#
 +
#--- /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases ---
 +
#
 +
echo
 +
echo "Creating /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases ..."
 +
echo
 +
cat <<HERE14 > /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29ZarafaAliases
 +
{
 +
    # vim: ft=perl:
 +
 +
    \$haveSSL = (exists \${modSSL}{status} and \${modSSL}{status} eq "enabled") ?  'yes' : 'no';
 +
    my \$zwebmailStatus = \$zarafa{'status'} || "disabled";
 +
    my \$zwebmailAccessType = \$zarafa{'access'} || "SSL";
 +
 +
    my \$dirs;
 +
    \$dirs{zarafa} = '/usr/share/zarafa-webaccess';
 +
    \$dirs{webaccess} = '/usr/share/zarafa-webaccess';
 +
    \$dirs{webmail} = '/usr/share/zarafa-webaccess';
 +
    if (\$imp{'status'} eq 'enabled') {\$dirs{webmail} = ''};
 +
    \$dirs{webapp} = '/usr/share/zarafa-webapp';
 +
    \$dirs{'Microsoft-Server-ActiveSync'} = '/usr/share/z-push/index.php';
 +
 +
    return "    # Zarafa is disabled in this VirtualHost\n"
 +
                unless \$zwebmailStatus eq 'enabled';
 +
 +
    foreach \$place ('zarafa','webmail','webaccess','webapp','Microsoft-Server-ActiveSync')
 +
    {
 +
        if ((\$port eq "80") && (\$haveSSL eq 'yes') && (\$zwebmailAccessType eq 'SSL'))
 +
        {
 +
            \$OUT .= "    RewriteRule ^/\$place(/.*|\\$)    https://%{HTTP_HOST}/\$place\\\$1 [L,R]\n";
 +
        } else {
 +
            if ((\$dirs{\$place}) ne '') {\$OUT .= "    Alias /\$place  \$dirs{\$place}\n"};
 +
        }
 +
    }
 +
}
 +
HERE14
 +
 +
#
 +
#--- /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias ---
 +
#
 +
echo
 +
echo "Creating /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias ..."
 +
echo
 +
cat <<HERE15 > /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86ZarafaAlias
 +
{
 +
    my \$zstatus = \$zarafa{'status'};
 +
 +
    if (defined \$zstatus && \$zstatus eq 'enabled')
 +
    {
 +
        \$OUT .= qq(
 +
#--------------------------------------------------------------------
 +
# Zarafa specific configuration files.
 +
#--------------------------------------------------------------------
 +
 +
Alias /zarafa /usr/share/zarafa-webaccess/
 +
<Directory /usr/share/zarafa-webaccess/>
 +
  Options -Indexes
 +
  AllowOverride All
 +
  order allow,deny
 +
  allow from all
 +
  AddType application/x-httpd-php .php
 +
  php_flag magic_quotes_gpc off
 +
  php_flag track_vars on
 +
</Directory>
 +
 +
Alias /webapp /usr/share/zarafa-webapp/
 +
<Directory /usr/share/zarafa-webapp/>
 +
  Options -Indexes
 +
  AllowOverride All
 +
  order allow,deny
 +
  allow from all
 +
  AddType application/x-httpd-php .php
 +
  php_flag magic_quotes_gpc off
 +
  php_flag track_vars on
 +
</Directory>
 +
 +
<Directory /usr/share/z-push/>
 +
  Options -Indexes
 +
  AllowOverride All
 +
  order allow,deny
 +
  allow from all
 +
  AddType application/x-httpd-php .php .php3
 +
  php_flag magic_quotes_gpc off
 +
  php_flag register_globals off
 +
  php_flag magic_quotes_runtime off
 +
  php_flag short_open_tag on
 +
</Directory>
 +
 +
);
 +
    }   
 +
    else
 +
    {
 +
      \$OUT .= "# Zarafa Webmail is not configured as it is disabled in the config db";
 +
    }
 +
}
 +
HERE15
 +
 +
######################################
 +
# Configuration of Z-push
 +
######################################
 +
 +
/bin/echo
 +
/bin/echo "Configuration of Z-push"
 +
/bin/echo
 +
FILE=/var/lib/z-push; if [ -d $FILE ]; then /bin/echo -e "** $FILE already exists, skipping **\n"; else /bin/mkdir $FILE; fi
 +
FILE=/var/lib/z-push; if [ -d $FILE ]; then /bin/chown -R www:www $FILE; fi
 +
FILE=/var/lib/z-push; if [ -d $FILE ]; then /bin/chmod 755 $FILE; fi
 +
FILE=/var/log/z-push; if [ -d $FILE ]; then /bin/echo -e "** $FILE already exists, skipping **\n"; else /bin/mkdir $FILE; fi
 +
FILE=/var/log/z-push; if [ -d $FILE ]; then /bin/chown -R www:www $FILE; fi
 +
FILE=/var/log/z-push; if [ -d $FILE ]; then /bin/chmod 755 $FILE; fi
 +
 +
/bin/echo
 +
/bin/echo "Expanding http.conf-template"
 +
/bin/echo
 +
/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf
 +
 +
/bin/echo
 +
/bin/echo "Restarting httpd"
 +
/bin/echo
 +
/usr/bin/sv restart /service/httpd-e-smith
      Line 1,059: Line 1,186:  
  /bin/echo
 
  /bin/echo
 
  /bin/echo "You must perform a signal-event post-upgrade;signal-event reboot"
 
  /bin/echo "You must perform a signal-event post-upgrade;signal-event reboot"
   
fi
 
fi
 
fi
 
fi
 
}
 
}
   −
clear
+
###############################################
# Start of the actual script
+
# Subroutine to set epel repo's if required
# Setting up epel and epel-testing repo's
+
###############################################
 +
epelrepos ()
 +
{
 
/sbin/e-smith/db yum_repositories set epel repository \
 
/sbin/e-smith/db yum_repositories set epel repository \
 
Name 'Epel - EL5' \
 
Name 'Epel - EL5' \
Line 1,086: Line 1,214:  
Visible no \
 
Visible no \
 
status disabled
 
status disabled
   
signal-event yum-modify
 
signal-event yum-modify
 +
}
   −
mkdir -p /root/install/zarafa
+
clear
cd /root/install/zarafa
+
# Start of the actual script
wget http://download.zarafa.com/community/final/7.0/7.0.14-42060/zcp-7.0.14-42060-rhel-5-x86_64-free.tar.gz
+
# Setting Zarafa and Z-Push Version numbers, detect SME Server major version and architecture and set install directory
tar -zxvf zcp-*
+
ZVERSION=7.0.13-41388
cd zcp-7.0.14-42060-rhel-5-x86_64
+
PUSHVERSION=2.1.1-1788
 +
INSTALLDIR=/root/install/zarafa
 +
TEMPLATEDIR=/etc/e-smith/templates/etc/zarafa/
 +
###################################################################################
 +
# Init zarafa-array to simplify code and reduce possible (future) mistakes
 +
# http://tldp.org/LDP/abs/html/arrays.html
 +
# Not used yet, please ignore for this note is just a placeholder
 +
# zarafa-array=( unix licensed dagent gateway ical monitor spooler indexer server )
 +
# So zarafa-array ranges from 0 to 8
 +
###################################################################################
 +
if [ $(cat /etc/redhat-release | grep -o 8) = "8" ]; then
 +
  RHV=5
 +
else
 +
  RHV=6
 +
#  zarafa-array[7]=search # as per comment above, not used yet
 +
fi
 +
if [ `getconf LONG_BIT` = "64" ]; then
 +
  CPUARCH=x86_64
 +
else
 +
  CPUARCH=i386
 +
fi
 +
mkdir -p $INSTALLDIR
 +
cd $INSTALLDIR
 +
wget http://zarafa-deutschland.de/z-push-download/final/2.1/z-push-$PUSHVERSION.tar.gz
 +
wget http://download.zarafa.com/community/final/7.0/$ZVERSION/zcp-$ZVERSION-rhel-$RHV-$CPUARCH-free.tar.gz
 +
tar -zxvf $INSTALLDIR/z-push-$PUSHVERSION.tar.gz -C /usr/share
 +
mv /usr/share/z-push-$PUSHVERSION /usr/share/z-push
 +
tar -zxvf zcp-$ZVERSION-rhel-$RHV-$CPUARCH-free.tar.gz
 +
cd zcp-$ZVERSION-rhel-$RHV-$CPUARCH
 
rm -f *-dev*.rpm
 
rm -f *-dev*.rpm
 
yum -y localinstall *.rpm
 
yum -y localinstall *.rpm
rpm -e php-mapi --nodeps
+
if [ $RHV = "5" ]; then
yum -y install php53-mapi --enablerepo=epel,epel-testing
+
  epelrepos
 +
  rpm -e php-mapi --nodeps
 +
  yum -y install php53-mapi --enablerepo=epel,epel-testing
 +
fi
 +
yum -y install php-posix
 
zarafainstall
 
zarafainstall
 
config setprop zarafa-server GlobalForward enabled
 
config setprop zarafa-server GlobalForward enabled

Navigation menu