Skip to main content
Skip table of contents

Patch and Bugfix Updates and Re-Installations

Here you will find useful instructions for updating censhare in case of "smaller" – patch or bugfix – updates as well as for reinstalling censhare, or making any other non-critical changes in your installation. 

Bugfix / Patch updates

application.yml

When installing a new RPM package, the application.yml file is not overwritten if it has changed since the previous installation. Instead, the new installation creates an application.yml.rpmnew file that contains changes added by censhare for the new release. Therefore, you need to compare both files for new or changed default settings. Only the application.yml file is later used by the system as the source of configuration. To avoid missing any changes, you need to add them from the application.yml.rpmnew file in the application.yml file. In doing so, you keep both your changes and changes made by censhare. 

To update to a new bugfix release:

  • Adjust the yum repository
CODE
#e.g., from 
#baseurl=https://user:password@rpm.censhare.com/censhare-release-rpm/stable/censhare/2022/1
#to
baseurl=https://user:password@rpm.censhare.com/censhare-release-rpm/stable/censhare/2023/1
  • Run the following command

    • You can do this for censhare-Server and censhare-Service-Client separately.

CODE
yum update censhare-Server censhare-Service-Client --enablerepo="censhare,censhare-PreRelease,censhare-tools"

Be aware, that for minor/major versions also additional steps may be required, such as updating your configuration files. Also keep in mind to have a backup of your Assets and Database, as the RPM may update the Database Schema if necessary, so for a rollback a backup restore may be needed.

For a walk-through of the a major upgrade process, see Updates & Upgrades.

What happens during the update process

  1. The state of censhare-Server will be noted and stopped if it is running.

  2. The software will be unpacked by the RPM and overrides the current software.

  3. The work directory will be synced with changes from work-template.

  4. The script  DatabaseUpdate.sh update  will be executed in order to make Database Schema updates. It will log to  ~corpus/work/logs/db-update-<current-date-and-time>.log

  5. Files that have been compiled during runtime will be removed

  6. censhare-Server will be stared in case it was also running when the update started, otherwise it will remain stopped.

  7. Since runtime files has been removed, files will recompile during first startup, which can take up to 15 minutes until the server is fully started and ready.

Replace an existing censhare installation with RPM

For this you can actually just install the packages on top. Still we recommend to cleanup your old software installation and remove everything, except your configuration and work directory. Just make sure that after the installation of the packages, the files in censhare-Custom will remain below  ~corpus/censhare/censhare-Custom

Install censhare with different user, group and/or home directory

Install on different user/group

Before installing any package, you can set following environment variables on your system

CODE
export RPM_CORPUS_USER=corpus 
export RPM_CORPUS_GROUP=corpus 
export RPM_CORPUS_UID=861 
export RPM_CORPUS_GID=861 

If they are not set, the mentioned defaults will be used. You just need to set them, before installing censhare-Common RPM, then these parameters will be saved to /etc/profile.d/censhare.sh and loaded and used for any of the other RPMs.

Relocate installation directory

In order to install censhare to a different directory, it's possible to relocate the package.

If you use relocate, you can only do this with the rpm command, this does not work with yum or zypper.
Once the RPM has been installed with relocation you also have to provide this parameter always when you update with rpm!
Also please be aware to always relocate to the same directory for all your packages (censhare-Common, censhare-Server, censhare-Service-Client), otherwise you could break your installation. For this you need also to already relocate censhare-Common RPM, where this is supported since 1.6. Example command:

CODE
rpm -i --relocate /opt/corpus=/home/MyCenshare censhare-Common-1.6-0.x86_64.rpm

Then you can do the same for censhare-Server and censhare-Service-Client. This is not supported for censhare-ImageTools. Example command:

CODE
rpm -i --relocate /opt/corpus=/home/MyCenshare censhare-Server-2018.3.0-5758a1.0.x86_64.rpm 
rpm -i --relocate /opt/corpus=/home/MyCenshare censhare-Service-2018.3.0-5758a1.0.x86_64.rpm 

Uninstall censhare

To uninstall censhare, just run the following command: 

CODE
yum remove censhare-Server censhare-Service-Client

This will only remove the software, the configuration files and asset files will remain. If you want to get rid of them you have to remove them manually. If you also want to remove all the dependent packages that have been installed with, you could run this command right after the uninstallation. This will remove all packages where nothing else has a dependency left on:

CODE
package-cleanup --leaves --all
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.