Upgrade to Zentyal 5

Fonte: ARDITI - WIKI
Saltar para a navegação Saltar para a pesquisa

Before upgrade

  1. close port 25 on the firewall and maybe also the access to samba shares
  2. do a snapshot
  3. create the file /etc/udev/rules.d/70-persistent-net.rules to make interface name persistent
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:40:b0:e8", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0"
  4. make a copy of the stubs
     cp -ra /usr/share/zentyal/stubs /usr/share/zentyal/stubs.beforeupgrade 
  5. make a copy of the zentyal config
     cp -ra /etc/zentyal /etc/zentyal.beforeupgrade 
  6. backup dchpd conf just in case
    cd /etc/dhcp; newcp dhcpd.conf

Upgrade

  1. click on the upgrade button in the web ui
  2. wait until in the console it's written that the upgrade is done
  3. reboot the VM

Post upgrade

Fix webmail

Enable Vacation

<syntaxhighlight lang="bash"> mkdir /etc/zentyal/stubs cp -r /usr/share/zentyal/stubs/sogo /etc/zentyal/stubs/ cd /etc/zentyal/stubs/sogo/ newcp sogo.conf.mas sed -i "s/SOGoVacationEnabled = NO/SOGoVacationEnabled = YES/" sogo.conf.mas </syntaxhighlight>

Fix url

This has to be inserted in /etc/zentyal/stubs/sogo/SOGo.conf.mas

ProxyPass /sogo http://127.0.0.1:20000/SOGo

next to

ProxyPass /SOGo http://127.0.0.1:20000/SOGo retry=0

These lines have to be set in /etc/zentyal/stubs/sogo/SOGo.conf.mas after IfModule headers_module

RequestHeader set "x-webobjects-server-name" "mail.arditi.pt"
RequestHeader set "x-webobjects-server-url" "https://mail.arditi.pt"

and this lines needs to be commeted out:

RequestHeader set "x-webobjects-server-name" "%{HTTP_HOST}e" env=HTTP_HOST

# Modified by Zentyal
# RequestHeader set "x-webobjects-server-url" "https://%{HTTP_HOST}e" env=HTTP_HOST
RequestHeader set "x-webobjects-server-url" "https://%{REQUEST_HOST}e:443"

Fix certificates and https

cd /etc/apache2/sites-available
mv default-ssl.conf.dpkg-dist default-ssl.conf

Edit the file /etc/apache2/sites-available/default-ssl.conf by adding:

SSLCertificateFile       /etc/ssl/certs/mail_arditi_pt_bundle.crt
SSLCertificateChainFile  /etc/ssl/certs/mail_arditi_pt_bundle.crt
SSLCertificateKeyFile    /etc/ssl/private/mail_arditi_pt.key

and remove the default one.

After that:

a2ensite default-ssl.conf
service apache2 reload

mail changes

main.cf

copy the default config:

cp /usr/share/zentyal/stubs/mail/main.cf.mas /etc/zentyal/stubs/mail/

Modify as follows:

#CA20160510 - use COMODO PositiveSSL certificate
#my $certFile = '/etc/postfix/sasl/postfix.pem';
#my $keyFile  = '/etc/postfix/sasl/postfix.pem';
my $certFile = '/etc/ssl/certs/mail_arditi_pt_bundle.crt';
my $keyFile  = '/etc/ssl/private/mail_arditi_pt.key';

archivemail.mas

cd /etc/zentyal
cp stubs.50upgrade.bak/mail/archivemail.mas stubs/mail/

dovecot.conf.mas

copy the default config:

cp /usr/share/zentyal/stubs/mail/dovecot.conf.mas /etc/zentyal/stubs/mail/

replace these lines:

#CA20160510 - use COMODO PositiveSSL certificate
#ssl_cert =</etc/dovecot/private/dovecot.pem
#ssl_key =</etc/dovecot/private/dovecot.pem
ssl_cert =</etc/ssl/certs/mail_arditi_pt_bundle.crt
ssl_key =</etc/ssl/private/mail_arditi_pt.key

samba changes

Add this line at the end of the [global] section of /etc/zentyal/stubs/samba/smb.conf.mas

#CA20160406 try solution for owncloud repeated synchronisation
dos filetime resolution = yes

dhcpd

I think there's no need to change anything.

Fix DNS

Bind startup

Disable bind startup service, because Zentyal starts this service.

# systemctl disable bind9.service
Synchronizing state of bind9.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable bind9
insserv: warning: current start runlevel(s) (empty) of script `bind9' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `bind9' overrides LSB defaults (0 1 6).

Fix DNS updates

Try to fix the problem where DNS updates stopped working

Reference: https://tracker.zentyal.org/issues/5257 post #12

chgrp bind /var/lib/samba/private/dns.keytab

named.conf.options.mas

Enable more detailed logging

mkdir /etc/zentyal/stubs/dns
cp /etc/zentyal.beforeupgrade-5/stubs/dns/named.conf.options.mas /etc/zentyal/stubs/dns/

Fix some services startup

Samba startup

Disable some default samba startup services, because its interfering with Zentyal Samba startup

# systemctl disable smbd.service
Synchronizing state of smbd.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable smbd
insserv: warning: current start runlevel(s) (empty) of script `smbd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `smbd' overrides LSB defaults (0 1 6).
# systemctl disable winbind.service
Synchronizing state of winbind.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable winbind
insserv: warning: current start runlevel(s) (empty) of script `winbind' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `winbind' overrides LSB defaults (0 1 6).

LXDM startup

Disable default startup service

# systemctl disable lxdm.service
Synchronizing state of lxdm.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install disable lxdm
insserv: warning: current start runlevel(s) (empty) of script `lxdm' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `lxdm' overrides LSB defaults (0 1 6).

and enable Zentyal LXDM startup service.

# systemctl enable zentyal.lxdm.service
Created symlink from /etc/systemd/system/multi-user.target.wants/zentyal.lxdm.service to /lib/systemd/system/zentyal.lxdm.service.

Start Zentyal LXDM startup service

# systemctl start zentyal.lxdm.service

Now desktop should be working.