{"id":8558,"date":"2015-03-15T16:28:43","date_gmt":"2015-03-15T16:28:43","guid":{"rendered":"https:\/\/wp.okra.host\/article\/running-memcached\/"},"modified":"2021-03-07T14:30:12","modified_gmt":"2021-03-07T13:30:12","slug":"running-memcached","status":"publish","type":"ht_kb","link":"https:\/\/kb.okra.host\/de\/article\/running-memcached\/","title":{"rendered":"Ausf\u00fchren von Memcached"},"content":{"rendered":"<h2 id=\"overview\" >\u00dcbersicht<\/h2>\n<p>Memcached\u00a0is\u00a0an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.\u00a0It 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 Memcached.<\/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>memcached -l 127.0.0.1 -p 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 connecting solely from an app locally on the server\u00a0(<a title=\"WSGI verwenden\" href=\"https:\/\/kb.okra.host\/de\/python\/using-wsgi\/\">WSGI<\/a>\/PHP\/CGI\/<a title=\"Einrichten von Rails mit Passenger\" href=\"https:\/\/kb.okra.host\/de\/ruby\/setting-rails-passenger\/\">Schiene<\/a>, etc), is to specify -s<code>\u00a0\/tmp\/memcached.sock<\/code> anstelle von <code>-l<\/code>\/<code>-p<\/code>\u00a0to 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 Memcached\u00a0up and running, you can create\u00a0a long-term solution that starts up with the server and always runs in the background.<\/p>\n<blockquote>\n<p><strong>Note<\/strong>: as with most 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>Once again, from the terminal run:\u00a0<code>memcached -l 127.0.0.1 -p PORT -d -P \/tmp\/memcached.pid<\/code><\/p>\n<p>The only differences of note are introduction of <code>-d<\/code> und <code>-P<\/code> flags.\u00a0<code>-d<\/code> daemonizes memcached to run in the background and\u00a0<code>-P<\/code> saves the process identifier to a file called <code>\/tmp\/memcached.pid<\/code>. This allows you to easily kill the memcached daemon if necessary:<\/p>\n<pre data-language=\"shell\"><code>kill -9 $(cat \/tmp\/memcached.pid)<\/code><\/pre>\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>memcached -l 127.0.0.1 -p PORT -d -P \/tmp\/memcached.pid<\/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>Memcached\u00a0<a href=\"https:\/\/code.google.com\/p\/memcached\/wiki\/NewStart\">Dokumentation<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Overview Memcached\u00a0is\u00a0an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.\u00a0It is available on newer platforms (v6+) without any additional compilation from source. Accounts with terminal access are eligible to use Memcached. Quickstart From the terminal, run: memcached&#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-8558","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\/8558","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=8558"}],"version-history":[{"count":1,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8558\/revisions"}],"predecessor-version":[{"id":8559,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb\/8558\/revisions\/8559"}],"wp:attachment":[{"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/media?parent=8558"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-category?post=8558"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.okra.host\/de\/wp-json\/wp\/v2\/ht-kb-tag?post=8558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}