Overview
To update ejabberd you need to remove it, then re-install with the latest version. However, do check for database changes before initiating this process from the ejabberd documentation site (https://docs.ejabberd.im/admin/upgrade/).
Preparation
Before you begin this process you first need to create a copy of the config file. Not sure where this file is located? Then in shell run
ejabberdctl help
When I run this command the output received is
Commands to start an ejabberd node: start Start an ejabberd node in server mode debug Attach an interactive Erlang shell to a running ejabberd node iexdebug Attach an interactive Elixir shell to a running ejabberd node live Start an ejabberd node in live (interactive) mode iexlive Start an ejabberd node in live (interactive) mode, within an Elixir shell foreground Start an ejabberd node in server mode (attached) Optional parameters when starting an ejabberd node: --config-dir dir Config ejabberd: /usr/local/etc/ejabberd --config file Config ejabberd: /usr/local/etc/ejabberd/ejabberd.yml --ctl-config file Config ejabberdctl: /usr/local/etc/ejabberd/ejabberdctl.cfg --logs dir Directory for logs: /usr/local/var/log/ejabberd --spool dir Database spool dir: /usr/local/var/lib/ejabberd --node nodename ejabberd node name: ejabberd@localhost
The output above notes the config file ejabberd.yml is located in /usr/local/etc/ejabberd directory.
How come I need to create a copy of the config file? Well shortly we will remove ejabberd from the server.
Create a copy of ejabberd.yml with the following command
cp ejabberd.yml ejabberd_copy.yml
Personally I go as far as downloading the config file copy.
Once you have downloaded a copy of the config file, now you can remove ejabberd from the server.
To move the file, enter the following
mv "ejabberd_copy.yml" ../
Change the ../ to point to the directory you want the file to be relocated. In this instance, the file is moved to the parent directory.
Removing ejabberd
yum remove ejabberd
Re-installing ejabberd
Go to our install ejabberd documentation