Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Memorystore for Redis-Instanz mit der Google Cloud Console erstellen
Hier erfahren Sie, wie Sie eine neue Memorystore for Redis-Instanz erstellen, eine Verbindung zur Instanz herstellen und die Instanz anschließend löschen.
Eine detaillierte Anleitung dazu finden Sie direkt in der Google Cloud Console. Klicken Sie dazu einfach auf Anleitung:
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Nehmen Sie auf der Seite Redis-Instanz erstellen die folgenden Konfigurationen für die Instanz vor, die Sie erstellen.
Geben Sie im Feld Instanz-ID den Wert my-instance-1 ein.
Geben Sie im Feld Anzeigename den Wert My Quickstart Instance ein.
Wählen Sie im Abschnitt Stufenauswahl die Option Standard aus. Diese Stufe bezeichnet einen eigenständigen Redis-Knoten, im Gegensatz zur Standardstufe, die zur Sicherung Ihrer Daten einen Replikatknoten verwendet.
Geben Sie im Feld Capacity (Kapazität) den Wert 5 ein. Dadurch wird die Kapazität Ihrer Instanz auf 5 GB festgelegt.
Wählen Sie im Menü Region die Option us-central1 (Iowa) aus.
Wählen Sie im Menü Netzwerk die Option Standard aus.
Maximieren Sie den Knoten Konfiguration und wählen Sie dann im Menü Version die Option 7.0 (Empfohlen) aus.
Klicken Sie auf Instanz erstellen.
Nachdem die Instanz erstellt wurde, rufen Sie die IP address Ihrer Instanz ab. Gehen Sie dazu so vor:
Rufen Sie in der Google Cloud -Konsole die Seite Memorystore for Redis auf.
Memorystore for Redis
Klicken Sie auf die ID der Instanz: my-instance-1.
Notieren Sie sich unter Verbindungsattribute den Wert IP address Ihrer Instanz.
Beachten Sie außerdem, dass die Portnummer Ihrer Instanz 6379 ist.
Verbindung zur Redis-Instanz über eine Compute Engine-VM-Instanz herstellen
Sie können eine Verbindung zur Redis-Instanz über eine Compute Engine-VM herstellen, die das autorisierte Netzwerk der Redis-Instanz mit einer unterstützten IP-Adresse gemäß RFC 1918 verwendet.
Wenn Sie noch keine Compute Engine-VM haben, die dasselbe autorisierte Netzwerk wie Ihre Redis-Instanz verwendet, erstellen Sie eine VM und stellen Sie eine Verbindung zu ihr her: Folgen Sie dazu der Kurzanleitung: Linux-VM verwenden.
Installieren Sie telnet mit apt-get:
sudo apt-get install telnet
Rufen Sie vom Terminal aus Telnet an die IP-Adresse der Redis-Instanz auf und ersetzen Sie variables durch die entsprechenden Werte.
telnet instance-ip-address 6379
Bei Erfolg gibt der Befehl folgendes Ergebnis zurück:
Trying instance-ip-address…
Connected to instance-ip-address
Geben Sie in der Telnet-Sitzung einige Redis-Befehle ein:
Geben Sie Folgendes ein:
PING
Ergebnis:
PONG
Eingeben
SET HELLO WORLD
Ergebnis:
+OK
Geben Sie Folgendes ein:
GET HELLO
Ergebnis:
$5
WORLD
Bereinigen
Mit den folgenden Schritten vermeiden Sie, dass Ihrem Google Cloud -Konto die auf dieser Seite verwendeten Ressourcen in Rechnung gestellt werden:
So vermeiden Sie, dass Ihrem Google Cloud -Konto die in dieser Kurzanleitung verwendeten Ressourcen in Rechnung gestellt werden:
Rufen Sie in der Google Cloud -Konsole die Seite Memorystore for Redis auf.
Memorystore for Redis
Klicken Sie auf die Instanz-ID der Instanz, die Sie löschen möchten.
Klicken Sie auf Löschen.
Geben Sie in der angezeigten Eingabeaufforderung die Instanz-ID ein.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[],[],null,["# Quickstart: Create a Memorystore for Redis instance by using the Google Cloud console\n\nCreate a Memorystore for Redis instance by using the Google Cloud console\n=========================================================================\n\n| **Note:** If you are looking for the Memorystore for Redis Cluster documentation, see [Instance provisioning on a VPC network](/memorystore/docs/cluster/instance-provisioning-vpc).\n\nLearn how to create a new Memorystore for Redis instance, connect to\nit, and then delete it.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/freetrial?redirectPath=/?tutorial=memorystore_redis_console_quickstart)\n\n*** ** * ** ***\n\nBefore you begin\n----------------\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\nCreate a Redis instance\n-----------------------\n\n1. In the Google Cloud console, go to the **Memorystore for Redis** page.\n\n\n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n\n If this page is unavailable, then enable or re-enable the\n Memorystore for Redis API.\n [Enable the API](https://console.cloud.google.com/apis/dashboard)\n\n \u003cbr /\u003e\n\n2. Click **Create instance**.\n\n3. In the **Create a Redis instance** page, make the following configurations\n for the instance that you're creating.\n\n - In the **Instance ID** field, enter `my-instance-1`.\n - In the **Display name** field, enter `My Quickstart Instance`.\n - In the **Tier selection** section, select **Basic**. This tier designates a standalone Redis node, as opposed to the Standard tier, which uses a replica node to backup your data.\n - In the **Capacity** field, enter `5`. This sets the capacity of your instance to 5 GB.\n - From the **Region** menu, select **us-central1 (Iowa)**.\n - From the **Network** menu, select **default**.\n - Expand the **Configuration** node, and then from the **Version** menu, select \n **7.0 (Recommended)**.\n4. Click **Create instance**.\n\n | **Note:** Memorystore for Redis doesn't support legacy-mode networks. To create an instance, use a VPC network. For more information, see [Create and manage VPC networks](/vpc/docs/create-modify-vpc-networks).\n5. After the instance is created, obtain your instance's `IP address` by\n following these steps:\n\n 1. Go to the **Memorystore for Redis** page in the Google Cloud console. \n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n 2. Click on the ID of the instance: `my-instance-1`.\n 3. Under **Connection properties** , take a note of your instance's `IP address`.\n 4. Also note that your instance's **Port** number is `6379`.\n\nConnect to the Redis instance from a Compute Engine VM instance\n---------------------------------------------------------------\n\nYou can connect to the Redis instance from any Compute Engine VM\nthat uses the Redis instance's authorized network with a [supported RFC 1918 IP address](/memorystore/docs/redis/networking#supported_and_unsupported_networks).\n\n1. If you don't already have a Compute Engine VM that uses that same\n authorized network as your Redis instance, create one and connect to it by\n following [Quickstart using a Linux VM](/compute/docs/create-linux-vm-instance).\n\n2. Install `telnet` using `apt-get`:\n\n sudo apt-get install telnet\n\n3. From the terminal, telnet to the IP address of the Redis instance, replacing\n \u003cvar translate=\"no\"\u003evariables\u003c/var\u003e with appropriate values.\n\n ```\n telnet instance-ip-address 6379\n ```\n\n If successful, the command will return this result: \n\n ```\n Trying instance-ip-address…\n Connected to instance-ip-address\n ```\n4. In the telnet session, enter some Redis commands:\n\n Enter: \n\n ```\n PING\n ```\n\n Result: \n\n ```\n PONG\n ```\n\n Enter \n\n ```\n SET HELLO WORLD\n ```\n\n Result: \n\n ```\n +OK\n ```\n\n Enter: \n\n ```\n GET HELLO\n ```\n\n Result: \n\n ```\n $5\n WORLD\n ```\n\nClean up\n--------\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\nTo avoid incurring charges to your Google Cloud account for the resources used\nin this quickstart:\n\n1. Go to the **Memorystore for Redis** page in the Google Cloud console. \n [Memorystore for Redis](https://console.cloud.google.com/memorystore/redis/instances?)\n2. Click the instance ID of the instance you want to delete.\n3. Click the **Delete** button.\n4. In the prompt that appears, enter the instance ID.\n5. Click **Delete**.\n\nWhat's next\n-----------\n\n- Learn more about [creating and managing instances](/memorystore/docs/redis/creating-managing-instances).\n- Learn about other ways to [connect to your Redis instance](/memorystore/docs/redis/connecting-redis-instance).\n- Learn about the characteristics of a [Redis instance](/memorystore/docs/redis/instances)."]]