{"id":8573,"date":"2015-01-13T18:53:45","date_gmt":"2015-01-13T18:53:45","guid":{"rendered":"https:\/\/wp.okra.host\/article\/running-redis\/"},"modified":"2021-03-07T14:30:33","modified_gmt":"2021-03-07T13:30:33","slug":"running-redis","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/running-redis\/","title":{"rendered":"Laufender Redis"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p><a href=\"http:\/\/redis.io\/\">Redis<\/a> is an advanced key-value cache and store, similar to memcached with <a href=\"http:\/\/redis.io\/topics\/benchmarks\">better performance<\/a>. It is available on <a title=\"Ermitteln der Plattformversion\" href=\"https:\/\/kb.okra.host\/de\/platform\/determining-platform-version\/\">newer platforms<\/a> (v6+) without any <a title=\"Programme kompilieren\" href=\"https:\/\/kb.okra.host\/de\/terminal\/compiling-programs\/\">additional compilation<\/a> from source. Accounts <a title=\"Ist ein Terminalzugang vorhanden?\" href=\"https:\/\/kb.okra.host\/de\/terminal\/is-terminal-access-available\/\">with terminal access<\/a> are eligible to use Redis.<\/p>\n<h2 id=\"quickstart\" >Schnellstart<\/h2>\n<p>From the <a title=\"Zugriff auf das Terminal\" href=\"https:\/\/kb.okra.host\/de\/terminal\/accessing-terminal\/\">Terminal<\/a>, run: <code>redis-server --bind 127.0.0.1 --port PORT<\/code> where PORT is a <a title=\"Abh\u00f6ren von Ports\" href=\"https:\/\/kb.okra.host\/de\/terminal\/listening-ports\/\">preassigned port<\/a>\u00a0to the account.<\/p>\n<p><span style=\"color: #ff0000\"><strong>Hinweis:<\/strong><\/span> use 127.0.0.1 to prevent outside network activity. 127.0.0.1 will only allow traffic that originates from the same server. A better solution, if using CGI or a <a title=\"Einrichten von Rails mit Passenger\" href=\"https:\/\/kb.okra.host\/de\/ruby\/setting-rails-passenger\/\">Schiene<\/a> application, is to specify &#8212;<code>unixsocket \/tmp\/redis.sock<\/code> anstelle von <code>--bind<\/code>\/<code>--port<\/code> to specify a local UNIX domain socket instead of a TCP socket.<\/p>\n<h2 id=\"configuring-daemonizing\" >Configuring &amp; Daemonizing<\/h2>\n<p>Now with Redis up and running, you can create\u00a0a long-term solution that starts up with the server and always runs in the background. Start with either the <a href=\"http:\/\/download.redis.io\/redis-stable\/redis.conf\">stock configuration<\/a> or just copy and paste, making sure to update the <code>port<\/code> parameter to a <a title=\"Abh\u00f6ren von Ports\" href=\"https:\/\/kb.okra.host\/de\/terminal\/listening-ports\/\">port assigned<\/a> to your account.<\/p>\n<blockquote>\n<p><strong>Note<\/strong>: as with most configuration files, any line that begins with a octothorpe\/pound\/hash symbol (#) denotes a comment. These are never interpreted by an application, but serve as guidance. The following\u00a0configuration omits these helpful comments for brevity.<\/p>\n<\/blockquote>\n<p>Copy and paste the following content to a file named <code>redis.conf<\/code> in your home directory:<\/p>\n<pre style=\"padding-left: 60px\"># run as service\r\ndaemonize yes\r\npidfile ~\/redis.pid\r\n#########################################\r\n# USE A PREALLOCATED PORT TO YOUR ACCOUNT\r\n#########################################\r\nport 123\r\n# limit to local traffic only\r\nbind 127.0.0.1\r\n# To use a high performance local socket, uncomment\r\n# these 2 lines and comment port\/bind:\r\n# unixsocket \/tmp\/redis.sock\r\n# unixsocketperm 700\r\ntimeout 60 \r\ntcp-keepalive 30\r\n# Create a log file and log errors to redis.log\r\nloglevel warning\r\nlogfile \/tmp\/redis.log\r\n# Limit to 1000 concurrent clients\r\nmaxclients 1000\r\n# Restrict Redis to use only 128 MB of memory\r\n# More may result in service interruption\r\nmaxmemory 128m<\/pre>\n<p>A quick and easy way to do this is with Vim, a text-editor available through the terminal:<\/p>\n<ol>\n<li><code>vim ~\/redis.conf<\/code><\/li>\n<li>Type <code>i<\/code>\u00a0on the keyboard to switch to &#8220;Insert&#8221; mode\n<ul>\n<li>Depending upon\u00a0client, paste the text through CTRL + V, Shift + INS, or a suitable\u00a0key combination<\/li>\n<\/ul>\n<\/li>\n<li>Hit the Esc(ape) key.<\/li>\n<li>Type\u00a0<code>:wq<\/code><\/li>\n<li><em>Done!<\/em><\/li>\n<\/ol>\n<p>Now to start Redis using the configuration, type: <code>redis-server ~\/redis.conf<\/code><\/p>\n<h3 id=\"starting-on-start-up\" >Starting on Start-up<\/h3>\n<ol>\n<li>Visit <strong>Dev<\/strong> &gt;\u00a0<strong>Task Scheduler<\/strong> innerhalb der <a title=\"Anmeldung am Bedienfeld\" href=\"https:\/\/kb.okra.host\/de\/control-panel\/logging-into-the-control-panel\/\">Bedienfeld<\/a>\u00a0to schedule a new task.<\/li>\n<li>Under\u00a0<strong>Command<\/strong>, enter <code>redis-server ~\/redis.conf<\/code><\/li>\n<li>Under <em>Scheduling<\/em>, select\u00a0<strong>Server Start<\/strong><\/li>\n<li>Click\u00a0<strong>Add<\/strong><\/li>\n<\/ol>\n<h2 id=\"see-also\" >Siehe auch<\/h2>\n<ul>\n<li>Redis <a href=\"http:\/\/redis.io\/documentation\">Dokumentation<\/a><\/li>\n<li><a href=\"http:\/\/openmymind.net\/2012\/1\/23\/The-Little-Redis-Book\/\">The Little Redis Book<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Overview Redis is an advanced key-value cache and store, similar to memcached with better performance. It is available on newer platforms (v6+) without any additional compilation from source. Accounts with terminal access are eligible to use Redis. Quickstart From the terminal, run: redis-server &#8211;bind 127.0.0.1 &#8211;port PORT where PORT is&#8230;<\/p>","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[60],"ht-kb-tag":[],"class_list":["post-8573","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-guides"],"_links":{"self":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8573","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/comments?post=8573"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8573\/revisions"}],"predecessor-version":[{"id":8574,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8573\/revisions\/8574"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8573"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8573"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8573"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}