3/23/2023 0 Comments Ejabberd configYou should now perform a test connection with a client to the server and confirm that things are working as expected. opt/ejabberd-16.06/bin/ejabberdctl restart The migration should now be complete, at this point I’m not certain if everything will work properly as we did need to perform some changes after starting ejabberd, so just to be sure we perform a restart. chown -R ejabberd:ejabberd /opt/ejabberd-16.06/database/* If there was a vulnerability in ejabberd-15.04 then an attacker could potentially gain access to root privileges. Our ejabberd-15.04 version was actually running the whole server as the root user, which is very poor security practice. This user was configured when we installed the RPM. The files within the /opt/ejabberd-16.06/database/ directory should have the owner and group of ejabberd. opt/ejabberd-16.06/bin/ejabberdctl restore ejabberd.backup Now the backup can be restored by running ejabberctl from the 16.06 installation. opt/ejabberd-16.06/bin/ejabberdctl start cp /opt/ejabberd-15.04/database/ /ejabberd.backup /opt/ejabberd-16.06/database/ /īefore being able to perform the restore, we must start the new version of ejabberd. opt/ejabberd-15.04/bin/ejabberdctl stopĬopy the ejabberd.backup file to the database directory of the new version, /opt/ejabberd-16.06/database/ / in our instance. The backup should have been created in the database directory, at /opt/ejabberd-15.04/database/ /ejabberd.backupĬonfirm that the ejabberd.backup file exists as expected, and then stop the old service from running. Failed RPC connection to the node : nodedown It’s important to note that ejabberd needs to be running for this to work properly, otherwise you’ll get the following error message, which simply means that the ejabberd server is not available. opt/ejabberd-15.04/bin/ejabberdctl backup ejabberd.backup Note that if you simply try to copy the files within the /opt/ejabberd-15.04/database directory to the new directory it will not work properly, the database must be exported and imported with the ejabberctl tool. Next we’ll take a backup of the ejabberd database. diff /opt/ejabberd-15.04/conf/ejabberd.yml /opt/ejabberd-16.06/conf/ejabberd.yml Rather than search the whole file manually, you could also make use of the ‘diff’ command to see the differences between the two files, however in my case this was over 400 lines and not all that useful. Some specific configuration elements that I manually copied over included the “hosts:”, “listen:” and “acl:” sections. This is because the newer versions of ejabberd contain new configuration options which did not exist in the older versions of the software, so we therefore need to go through the configuration file and apply various configuration changes to the newer file in the 16.06 version as required. Next we want to migrate the /opt/ejabberd-15.04/conf/ejabberd.yml configuration file to /opt/ejabberd-16.06/conf/ejabberd.yml, however we cannot simply overwrite the new file like we did before. The existing file is copied over so that no security warnings are given to clients when they reconnect to our newly upgraded server. This is fine to do, as the private key and certificate within the new server.pem are simply a default with the common name of “ejabberd Community Server Test Certificate”. cp /opt/ejabberd-15.04/conf/server.pem /opt/ejabberd-16.06/conf/server.pem Let’s start with the server.pem file, this contains the existing private key and certificate that are in use. There are a couple of files that need to be copied over, namely the ejabberd.yml configuration and the server.pem files within the conf directory. This has installed to /opt/ejabberd-16.06, however we now need to migrate our existing data from the /opt/ejabberd-15.04 directory. The existing instance of ejabberd-15.04 is currently running from /opt/ejabberd-15.04.įirst download the package, as we’re working with a CentOS 7 server here we will get the “Linux x86 64-bits RPM” package file and install it with yum. If you’re migrating to a new server, when ever we advise to copy a file, instead use something like scp to copy from the local server to the new remote server that you are moving to. While this upgrade is taking place on the same server, these steps can also be used to perform a migration from one server to another with a fresh installation of ejabberd, as the new version will install to a new directory. Operating system specific packages such as RPM and DEB files were not provided until ejabberd-15.06, so our existing instance was not installed with the RPM file but instead from the binary file, meaning there is no existing ejabberd RPM installed for us to simply upgrade. In this example we will be upgrading from an older instance of the ejabberd-15.04 XMPP server to the current latest version ejabberd-16.06.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |