Select your language

On our Managed Flex servers, a Redis-Instance runs on port 6379 by default.
The following instructions can be used to run a second Redis-Instance on a different port.

Prepare your own Redis instance

To complete these steps, you must be logged into your Managed Flex Server via SSH.

We recommend creating an ~/app/ directory for your own applications and then creating a subdirectory for each of your applications. This keeps everything neat and tidy at all times. So, for Redis, we will create the directory ~/app/redis.

mkdir -p ~/app/redis/

Get the Redis configuration file

Next, you would need to ask our technical support to copy the Redis configuration file in the ~/app/redis folder you just created.

To do this, create a support code in the Hostpoint Control Panel as described here.

Then send the support code to our technical support (support@hostpoint.ch) and ask them to copy the Redis configuration file in the ~/app/redis folder.

Configure Redis

You can start with the Redis configuration as soon as our technical support has copied the Redis file for you.

Edit the Redis configuration file ~/app/redis/redis.conf with vim or nano and edit the following lines:

~/app/redis/redis.conf

			daemonize yes => daemonize no
pidfile /var/run/redis/redis.pid => pidfile /home/IHR_USERNAME/app/redis/redis.pid
port 6379 => port DER_GEWÜNSCHTE_PORT
dir /var/db/redis/ => dir /home/IHR_USERNAME/app/redis/

In the same configuration file you also have the possibility to set a password for your Redis instance. If you want this, then you can simply search for  # requirepass foobared delete the # character and replace foobared with the desired password.

Integration

Using Custom Service Control

The Custom Service Control (CSC) can handle operations and the automatic management of your application, e.g. starting and stopping it when performing maintenance on your server.

Configuring Redis in the CSC is fairly simple. Set up a new custom service for Redis:


			hpservices supervisord add redis
successfully created dir for redis: /home/username/.services/supervisord/redis
successfully created dir for redis: /home/username/.services/supervisord/redis/log
supervisord service config file written: /home/username/.services/supervisord/redis/service.conf

A configuration framework is created in the file ~/.services/supervisord/redis/service.conf for the new service. For Redis, the command has to be modified. You can leave all other suggested values alone (delete the semicolon at the beginning of the line).

~/.services/supervisord/redis/service.conf

			[program:redis]
command=/usr/local/bin/redis-server %(ENV_HOME)s/app/redis/redis.conf ; the program (can take args)
directory=%(ENV_HOME)s/app/redis/ ; directory to cwd to before exec (default no cwd)
autostart=true ; start application at supervisord start (default: true)
stopwaitsecs=10 ; max num secs to wait before SIGKILL (default 10)
stdout_logfile=%(ENV_HOME)s/.services/supervisord/redis/log/default.log
stdout_logfile_maxbytes=1MB ; filesize at which to rotate logfiles (default ist 50MB)
stdout_logfile_backups=10 ; number of stdout logfile backups (0 means none, default 10)
stderr_logfile=%(ENV_HOME)s/.services/supervisord/redis/log/default.err
stderr_logfile_maxbytes=1MB ; filesize at which to rotate logfiles (default is 50MB)
stderr_logfile_backups=10 ; number of stderr logfile backups (0 means none, default 10)

Using supervisorctl update , you can apply the new configuration to Redis:


			supervisorctl update
redis: added process group

For more detailed information on working with CSC and the options it offers, refer to the guide for Custom Service Control.

Testen

The new Redis instance can now be tested with this command:

redis-cli -p DER_VON_IHNEN_GESETZTE_PORT ping

If everything was configured correctly, you should receive the response "PONG".

If not, we recommend that you review the instructions and contact us if it still does not work.

The following points should be considered:

  1. Following your configuration, two Redis instances are running. The default Redis-instance and the Redis instance you created.
  2. Your Redis instance is not monitored by us, so unfortunately we cannot react in case of errors or crashes.
  3. 3. During major updates of Redis, the service may not restart automatically. In this case, you would need to restart the service with the command supervisorctl restart redis .
  4. In the Hostpoint Control Panel, only the default Redis-instance is displayed under "Server Overview", but not the one you created yourself.
Please use this form only to provide feedback on the above guide.
For support requests please use this form instead.

 

 

© 2001 - Hostpoint AG
Cookie

Wir verwenden Cookies  🍪

We use Cookies  🍪

Nous utilisons des cookies  🍪

Utilizziamo dei cookie  🍪

Die digitalen Auftritte von Hostpoint (Website, Control Panel, Support Center etc.) verwenden Cookies. Diese werden dazu verwendet, um Daten über Besucherinteraktionen zu sammeln. Wenn Sie auf «Akzeptieren» klicken, stimmen Sie der Verwendung dieser Cookies für Werbezwecke, Website-Analyse und Support zu. Gewisse essenzielle Cookies sind jedoch für eine ordnungsgemässe Funktion dieser Seiten unerlässlich und können deshalb nicht deaktiviert werden. Auch ohne Ihre Zustimmung können gewisse Daten in anonymisierter Form für statistische Zwecke und zur Verbesserung unserer Websites verwendet werden. Bitte beachten Sie unsere Datenschutzerklärung.

Hostpoint's digital presences (website, Control Panel, Support Center, etc.) use cookies. These are used to collect data on visitor interactions. If you click “Accept”, you agree to the use of these cookies for advertising purposes, website analysis and support. However, certain cookies are essential for the proper functioning of these pages and therefore cannot be disabled. Even without your consent, certain data may be used in anonymized form for statistical purposes and to improve our websites. Please note our Privacy policy.

Le sites Web de Hostpoint (site Web, Control Panel, Centre d'assistance, etc.) utilisent des cookies. Ces cookies servent à collecter des données sur les interactions des visiteurs. En cliquant sur «Accepter», vous consentez à l’utilisation de ces cookies à des fins de publicité, d’analyse du site Web et d’assistance. Certains cookies essentiels sont cependant indispensables au bon fonctionnement de notre sites Web et ne peuvent donc pas être désactivés. Même sans votre consentement, certaines données peuvent être utilisées sous forme anonymisée à des fins statistiques et pour améliorer notre sites Web. Veuillez prendre connaissance de notre Déclaration de protection des données.

Le presenze digitali di Hostpoint (sito web, Pannello di controllo, Support Center, ecc.) utilizzano i cookie. Questi vengono utilizzati per raccogliere dati sulle interazioni dei visitatori. Facendo clic su «Accetta», acconsente all’utilizzo di questi cookie per scopi pubblicitari, di analisi del sito web e di supporto. Alcuni cookie essenziali sono tuttavia indispensabili per il corretto funzionamento di questi siti web e pertanto non possono essere disattivati. Anche senza il Suo consenso, determinati dati potrebbero essere utilizzati in forma anonima per fini statistici e per l’ottimizzazione dei nostri siti web. Si prega di tenere conto della nostra Dichiarazione per la pivacy.

Ablehnen
Decline
Refuser
Rifiuta
Akzeptieren
Accept
Accepter
Accetta