I would like to update my test system Znuny 6.5.4 to 7.0.12.
I have tried the following instructions:
https://doc.znuny.org/znuny/releases/in ... e-7.0.html
I come across the following text:
Important
The base settings have been changed to reflect the new product name. During an update, you should verify the following settings to use the new user and path during an update. We recommend creating a new znuny user to /opt/znuny for the best compatibility and changing the following variables.
$Self->{Home}
$Self->{'Frontend::WebPath'}
$Self->{'ScriptAlias'}
$Self->- {'Ticket::Article::Backend::MIMEBase::ArticleDataDir`}
Also, any scripts like backup.pl or apache configurations like DocumentRoot or directives like <Directory> should be verified and changed if you are moving to /opt/znuny.
Should you stay with /opt/otrs, you must ensure that the paths in scripts/apache2-perl-startup.pl and apache2-httpd.include.conf, are verified and changed. Ensure you use the correct user when running bin/znuny.SetPermissions.pl --znuny-user otrs If you use the backup.pl and stay with otrs, also check the backup.pl if you use this.
Which files do I have to adapt for this? Is this related to the Config.pm, if you have the variables in it?$Self->{Home}
$Self->{'Frontend::WebPath'}
$Self->{'ScriptAlias'}
$Self->- {'Ticket::Article::Backend::MIMEBase::ArticleDataDir`}
I did not find anything conspicuous in backup.pl.Also, any scripts like backup.pl or apache configurations like DocumentRoot or directives like <Directory> should be verified and changed if you are moving to /opt/znuny.
-------------------------------------------
I have configured the following:
Code: Select all
servicedesk@testsystem:~$ su -
Password:
testsystem ~ # systemctl stop apache2.service
testsystem ~ # systemctl stop postfix
testsystem ~ # su -c 'bin/Cron.sh stop' - otrs
testsystem ~ # su -c 'bin/otrs.Daemon.pl stop' - otrs
-------------------------------------------------------------------------
testsystem ~ # useradd -d /opt/znuny -c 'Znuny user' -g www-data -s /bin/bash -M -N znuny
testsystem ~ # vi /opt/otrs/Kernel/Config.pm
$Self->{Home} = '/opt/znuny';
testsystem ~ # cd /opt
testsystem opt # wget https://download.znuny.org/releases/znuny-latest-7.0.tar.gz
testsystem opt # tar xzf znuny-latest-7.0.tar.gz
testsystem opt # rm znuny-latest-7.0.tar.gz
testsystem opt # ls -l
total 16
drwxr-xr-x 4 root root 4096 Nov 12 16:25 backup
lrwxrwxrwx 1 root root 16 Nov 12 17:24 otrs -> /opt/znuny-6.5.4
drwxr-xr-x 9 otrs www-data 4096 Nov 12 17:25 znuny-6.5.4
drwxr-xr-x 9 root root 4096 Oct 18 10:33 znuny-7.0.12
testsystem opt # /opt/znuny-7.0.12/bin/znuny.SetPermissions.pl
Setting permissions on /opt/znuny-7.0.12
testsystem opt # cp -av /opt/otrs/Kernel/Config.pm /opt/znuny-7.0.12/Kernel/
'/opt/otrs/Kernel/Config.pm' -> '/opt/znuny-7.0.12/Kernel/Config.pm'
testsystem opt # rm /opt/otrs
testsystem opt # ln -s /opt/znuny-7.0.12 /opt/znuny
testsystem opt # /opt/znuny/bin/otrs.CheckModules.pl --all
---------------------------------------------------------------------
testsystem opt # rm /etc/apache2/conf-available/zzz_znuny.conf
testsystem opt # ln -s /opt/znuny/scripts/apache2-httpd.include.conf /etc/apache2/conf-available/zzz_znuny.conf
testsystem opt # vi /etc/apache2/sites-available/100-name-ssl.conf
[i] ScriptAlias /otrs/ "/opt/znuny/bin/cgi-bin/"
Alias /otrs-web/ "/opt/znuny/var/httpd/htdocs/"
RewriteRule "^/$" "/znuny/customer.pl"
# Setup environment and preload modules
Perlrequire /opt/znuny/scripts/apache2-perl-startup.pl[/i]
-----------------------------------------------------------------------
testsystem opt # su - znuny
znuny@testsystem:~$ scripts/MigrateToZnuny7_0.pl
Migration started ...
Checking requirements ...
Requirement check for: Check required Perl version ...
Requirement check for: Check required database version ...
Requirement check for: Check database charset ...
Requirement check for: Check required Perl modules ...
Requirement check for: Check if database has been backed up ...
Did you backup the database? [Y]es/[N]o: Y
Requirement check for: Upgrade database structure ...
Requirement check for: Migrate SysConfig settings ...
Should the SysConfig be migrated? [Y]es/[N]o: Y
Executing tasks ...
Step 1 of 21: Check required Perl version ...
Step 2 of 21: Check required database version ...
Step 3 of 21: Check database charset ...
Step 4 of 21: Check required Perl modules ...
Step 5 of 21: Check if database has been backed up ...
Step 6 of 21: Upgrade database structure ...
Step 7 of 21: Rebuild configuration ...
Step 8 of 21: Migrate SysConfig settings ...
Step 9 of 21: Migrate DBCRUD UUID columns ...
Activity: Column dbcrud_uuid in table activity...
Column successfully created
Calendar::Plugin: Column dbcrud_uuid in table calendar_appointment_plugin...
Column already exists
OAuth2Token: Column dbcrud_uuid in table oauth2_token...
Column already exists
OAuth2TokenConfig: Column dbcrud_uuid in table oauth2_token_config...
Column already exists
Step 10 of 21: Migrate dynamic fields ...
Step 11 of 21: Migrate notification events ...
Step 12 of 21: Integrate Znuny-NoteToLinkedTicket ...
Step 13 of 21: Migrate groups ...
Step 14 of 21: Cleanup orphaned mentions ...
Step 15 of 21: Uninstall merged packages ...
Step 16 of 21: Initialize default cron jobs ...
Copying /opt/znuny/var/cron/aaa_base.dist to /opt/znuny/var/cron/aaa_base...
done.
Copying /opt/znuny/var/cron/znuny_daemon.dist to /opt/znuny/var/cron/znuny_daemon...
done.
Step 17 of 21: Clean up the cache ...
Step 18 of 21: Rebuild configuration another time ...
Step 19 of 21: Deploy ACLs ...
Step 20 of 21: Deploy processes ...
Step 21 of 21: Check invalid settings ...
Migration completed!
znuny@testsystem:~$ bin/otrs.Console.pl Admin::Package::UpgradeAll
There are no installed packages
Done.
znuny@testsystem:~$ exit
logout
testsystem opt # su -c 'bin/Cron.sh start' - znuny
(using /opt/znuny-7.0.12) done
testsystem opt # systemctl start apache2
testsystem opt # systemctl start postfix
testsystem opt # cat /opt/znuny/RELEASE
PRODUCT = Znuny
VERSION = 7.0.12
BUILDDATE = Wed Oct 18 10:33:28 CEST 2023
BUILDHOST = ci-runner-01.znuny.com
COMMIT_ID = a7a99246b7e710b4cf514b2be7bf8a13dd5d6032
testsystem opt # systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; preset: enabled)
Active: active (running) since Mon 2023-11-13 16:39:20 CET; 2min 5s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 3578 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
Main PID: 3584 (/usr/sbin/apach)
Tasks: 12 (limit: 9484)
Memory: 211.1M
CPU: 2.113s
CGroup: /system.slice/apache2.service
├─3584 /usr/sbin/apache2 -k start
├─3587 /usr/sbin/apache2 -k start
├─3588 /usr/sbin/apache2 -k start
├─3589 /usr/sbin/apache2 -k start
├─3590 /usr/sbin/apache2 -k start
├─3591 /usr/sbin/apache2 -k start
├─3592 /usr/sbin/apache2 -k start
├─3751 /usr/sbin/apache2 -k start
├─3795 /usr/sbin/apache2 -k start
├─3796 /usr/sbin/apache2 -k start
├─3797 /usr/sbin/apache2 -k start
└─3798 /usr/sbin/apache2 -k start
Nov 13 16:39:19 testsystem systemd[1]: Starting apache2.service - The Apache HTTP Server...
Nov 13 16:39:20 testsystem systemd[1]: Started apache2.service - The Apache HTTP Server.