更新¶
Note
强烈建议先在单独的测试计算机上对更新进行测试。
Note
On Debian systems you may need to manually install some perl packages before upgrading from 10.0 to 10.1
apt-get install -y libarchive-zip-perl libtimedate-perl libdatetime-perl libconvert-binhex-perl libcgi-psgi-perl libdbi-perl libdbix-connector-perl libfile-chmod-perl liblist-allutils-perl libmoo-perl libnamespace-autoclean-perl libnet-dns-perl libnet-smtp-ssl-perl libpath-class-perl libsub-exporter-perl libtemplate-perl libtemplate-perl libtext-trim-perl libtry-tiny-perl libxml-libxml-perl libyaml-libyaml-perl libdbd-mysql-perl libapache2-mod-perl2 libmail-imapclient-perl libauthen-sasl-perl libauthen-ntlm-perl libjson-xs-perl libtext-csv-xs-perl libpath-class-perl libplack-perl libplack-middleware-header-perl libplack-perl libplack-middleware-reverseproxy-perl libencode-hanextra-perl libio-socket-ssl-perl libnet-ldap-perl libcrypt-eksblowfish-perl libxml-libxslt-perl libxml-parser-perl libconst-fast-perl
步骤 1:停用所有相关服务和OTOBO守护程序¶
请确保没有其他正在运行的服务或cron作业,会尝试访问OTOBO的,当然这将取决于你对服务的配置。
root> systemctl stop postfix
root> systemctl stop apache2
root> systemctl stop cron
停用OTOBO cron作业和守护程序(按照这个顺序):
root> su - otobo
otobo> cd /opt/otobo/
otobo> bin/Cron.sh stop
otobo> bin/otobo.Daemon.pl stop
步骤 2:备份文件和数据库¶
为整个``/opt/otobo``目录和数据库创建备份。
一个标准的 Ubuntu 和 MySQL 的安装案例¶
root> mkdir /root/otobo-update # Create a update directory
root> cd /root/otobo-update # Change into the update directory
root> cp -pr /opt/otobo otobo-prod-old # Backup the hole OTOBO directory to the update directory
root> mysqldump -u otobo -p otobo -r otobo-prod-old.sql # Backup the otobo database to otobo-prod-old.sql
请检查是否所有文件都有效。现在我们已经拥有了所有需要的数据的备份。
Warning
没有完整的系统备份,请勿继续。你也可以参考:`backup-restore`脚本。
步骤 3:安装新的版本¶
从https://ftp.otobo.org/pub/otobo/下载最新的OTOBO版本软件,打开封装文档(例如使用``tar``命令),并存到目录``/root/otobo-update``:
root> cd /root/otobo-update # Change into the update directory
root> wget https://ftp.otobo.org/pub/otobo/otobo-latest-10.1.tar.gz # Download he latest OTOBO 10.1 release
root> tar -xzf otobo-latest-10.1.tar.gz # Unzip OTOBO
root> cp -r otobo-10.1.x/* /opt/otobo # Copy the new otobo directory to /opt/otobo
恢复旧配置文件¶
在OTOBO 10中,我们只需要拷贝文件``Kernel/Config.pm`` 。
root> cd /root/otobo-update
root> cp -p otobo-prod-old/Kernel/Config.pm /opt/otobo/Kernel/
root> cp -p otobo-prod-old/var/cron/* /opt/otobo/var/cron/
恢复物品数据¶
如果你对OTOBO配置,是将物品数据存储在文件系统中,则必须将``article`` 文件夹还原到``/ opt / otobo / var /``或系统配置中指定的文件夹。
root> cd /root/otobo-update
root> cp -pr otobo-prod-old/var/article/* /opt/otobo/var/article/
恢复已经安装的默认统计信息¶
如果你还有其他带有默认统计信息的软件包,则必须将后缀为``*.installed`` 的XML统计数据文件恢复到/ opt / otobo / var / stats。
root> cd /root/otobo-update/otobo-prod-old/var/stats
root> cp *.installed /opt/otobo/var/stats
Check Apache configuration files¶
Newer versions of OTOBO may need you to adjust the apache configuration. From version 10.1 and onwards we moved from CGI to PSGI.
Take a look at scripts/apache2-httpd-vhost-443.include.conf
to see what settings needs to be adjusted/added.
Step 4: Check for new needed perl modules¶
OTOBO needs new cpan packages for some version jumps. Please check if new packages are needed and install them if necessary.
Note
On Debian systems you may need to manually install some packages:
apt-get install -y libarchive-zip-perl libtimedate-perl libdatetime-perl libconvert-binhex-perl libcgi-psgi-perl libdbi-perl libdbix-connector-perl libfile-chmod-perl liblist-allutils-perl libmoo-perl libnamespace-autoclean-perl libnet-dns-perl libnet-smtp-ssl-perl libpath-class-perl libsub-exporter-perl libtemplate-perl libtemplate-perl libtext-trim-perl libtry-tiny-perl libxml-libxml-perl libyaml-libyaml-perl libdbd-mysql-perl libapache2-mod-perl2 libmail-imapclient-perl libauthen-sasl-perl libauthen-ntlm-perl libjson-xs-perl libtext-csv-xs-perl libpath-class-perl libplack-perl libplack-middleware-header-perl libplack-perl libplack-middleware-reverseproxy-perl libencode-hanextra-perl libio-socket-ssl-perl libnet-ldap-perl libcrypt-eksblowfish-perl libxml-libxslt-perl libxml-parser-perl libconst-fast-perl
root> su - otobo
otobo> perl /opt/otobo/bin/otobo.CheckModules.pl --list
Step 5: Update Installed Packages and reconfigure config¶
你可以使用下面的命令来更新所有已安装的软件包,这适用于在线存储库中可用的所有软件包。你也可以稍后通过操作系统中的软件包管理器更新其他程序包(这需要运行的OTOBO守护程序)。
root> su - otobo
otobo> /opt/otobo/bin/otobo.Console.pl Admin::Package::ReinstallAll
otobo> /opt/otobo/bin/otobo.Console.pl Admin::Package::UpgradeAll
otobo> /opt/otobo/bin/otobo.Console.pl Maint::Config::Rebuild
Step 6: Only for minor or major release upgrades (for example to upgrade from 10.0 to 10.1)¶
root> su - otobo
otobo> /opt/otobo/scripts/DBUpdate-to-10.1.pl
Step 7: Start your Services¶
Start OTOBO cron jobs and the daemon (in this order):
root> su - otobo
otobo> cd /opt/otobo/
otobo> bin/otobo.Daemon.pl start
otobo> bin/Cron.sh start
现在可以启动服务。这将取决于您的服务配置,下面是一个示例:
root> systemctl start postfix
root> systemctl start apache2
root> systemctl start cron
现在你可以登陆到你的系统。