Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menyiapkan migrasi
Sebelum memulai proses modernisasi, Anda perlu memeriksa apakah
komponen aplikasi Anda kompatibel untuk modernisasi dan menyiapkan penyiapan
untuk modernisasi.
Halaman ini menjelaskan cara menyiapkan mesin sumber dan lokal untuk
modernisasi.
Tindakan ini akan mendownload plugin Migrate to Containers dan Migrate to Containers CLI versi terbaru.
Memeriksa konektivitas
Pastikan Anda dapat mengakses mesin sumber dari mesin lokal menggunakan
SSH langsung atau perintah gcloud compute ssh.
Opsional: Menyiapkan migrasi offline
Jika ingin melakukan migrasi di jaringan lokal tanpa mengambil
resource dari internet, Anda dapat menyelesaikan langkah-langkah berikut untuk
menyiapkan komputer lokal untuk migrasi offline.
Setelah mendownload Migrate to Containers CLI, lakukan langkah-langkah berikut:
Download paket plugin Migrate to Containers CLI offline:
Ganti HOSTNAME dengan nama host registry container.
Komputer lokal Anda disiapkan untuk migrasi offline. Untuk mengupgrade paket plugin Migrate to Containers CLI offline, upgrade Migrate to Containers CLI ke versi terbaru, lalu ulangi langkah-langkah untuk mendownload dan mengekstrak paket plugin.
Jika ingin menonaktifkan mode offline nanti, Anda dapat menggunakan
perintah config set untuk menetapkan opsi offline ke false.
Menyiapkan komputer lokal Windows
Anda harus dapat menjalankan sebagai administrator di komputer lokal.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[],[],null,["# Set up for migration\n====================\n\nBefore you start the modernization process, you need to check whether your\napplication component is compatible for modernization and prepare your setup\nfor modernization.\n\nThis page describes how to prepare your source and local machines for\nmodernization.\n\nSet up the Linux source machine\n-------------------------------\n\n| **Note:** If you're going to migrate Windows IIS applications, you don't need to perform the steps to set up the Windows source machine for migration.\n\n- Install `rsync`:\n\n - On Debian:\n\n sudo apt install rsync\n\n - On Fedora:\n\n sudo dnf install rsync\n\n Ensure that `rsync` is available in the `PATH` setting.\n\nSet up the Linux local machine\n------------------------------\n\n- [Install Docker](https://docs.docker.com/engine/install) and\n ensure that it is available in the `PATH`.\n\n | **Note:** To avoid [issues that might occur while using Snap version of Docker](/migrate/containers/docs/troubleshooting/issues-with-m2c-cli#the_analyze_command_fails_when_using_the_snap_version_of_docker), ensure that you install Docker without using Snap.\n\n If the user running Migrate to Containers CLI is a non-root user, then\n [allow the non-root user to run containers](https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user).\n\n### Download or upgrade Migrate to Containers CLI\n\n- Download or upgrade the Migrate to Containers CLI on a Linux machine:\n\n curl -O \"https://m2c-cli-release.storage.googleapis.com/$(curl -s https://m2c-cli-release.storage.googleapis.com/latest)/linux/amd64/m2c\"\n chmod +x ./m2c\n\n This downloads the latest version of the Migrate to Containers CLI and\n Migrate to Containers plugins.\n\n### Check connectivity\n\nEnsure that you can access the source machine from the local machine using\neither direct SSH or the `gcloud compute ssh` command.\n| **Note:** The user used for SSH connection must be either a sudoer or root. If the user used to perform SSH can't act as root, then Migrate to Containers CLI might not be able to examine files and directories relevant to the modernization process.\n\n### Optional: Set up for offline migration\n\nIf you want to perform migration on your local network without pulling\nresources from the internet, then you can complete the following steps to\nprepare your local machine for offline migrations.\n\nAfter you've downloaded Migrate to Containers CLI, perform the\nfollowing steps:\n\n1. Download the offline Migrate to Containers CLI plugins bundle:\n\n curl -O https://storage.googleapis.com/modernize-plugins-prod/$(curl -s https://storage.googleapis.com/modernize-plugins-prod/latest)/m2c-offline-bundle-linux.tar\n\n2. If required, copy the Migrate to Containers CLI and offline Migrate to Containers CLI\n plugins bundle to the offline environment.\n\n3. Unpack the offline Migrate to Containers CLI plugins bundle:\n\n ./m2c plugins unpack -i m2c-offline-bundle-linux.tar\n\n To add support for offline data migration, specify a container registry\n that is available in your local network: \n\n ./m2c plugins unpack -i m2c-offline-bundle-linux.tar --registry \u003cvar translate=\"no\"\u003eHOSTNAME\u003c/var\u003e\n\n Replace \u003cvar translate=\"no\"\u003eHOSTNAME\u003c/var\u003e with the container registry hostname.\n\nYour local machine is set up for offline migration. To upgrade the offline\nMigrate to Containers CLI plugins bundle, [upgrade Migrate to Containers CLI](#download-cli-linux)\nto the latest version, and then repeat the steps to download and unpack the\nplugins bundle.\n\nIf you want to turn off the offline mode later, then you can use the\n`config set` command to set the `offline` option to `false`.\n\nSet up the Windows local machine\n--------------------------------\n\n- You must be able to run as administrator on the local machine.\n- [Install Docker](https://docs.docker.com/engine/install).\n\n### Download or upgrade Migrate to Containers CLI\n\nTo download or upgrade Migrate to Containers CLI on a Windows machine, perform the\nfollowing steps: \n\n### cmd\n\n1. Find the latest version of Migrate to Containers CLI:\n\n curl -s https://m2c-cli-release.storage.googleapis.com/latest\n\n2. Download the latest version of Migrate to Containers CLI:\n\n curl -O \"https://m2c-cli-release.storage.googleapis.com/\u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e/windows/amd64/m2c.exe\"\n\n Replace \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e with the latest version of Migrate to Containers CLI.\n\n### PowerShell\n\n- Download the latest version of Migrate to Containers CLI:\n\n curl.exe -O https://m2c-cli-release.storage.googleapis.com/$(curl.exe -s https://m2c-cli-release.storage.googleapis.com/latest)/windows/amd64/m2c.exe\n\nThis downloads the latest version of the Migrate to Containers CLI and\nMigrate to Containers plugins.\n\nWhat's next\n-----------\n\n- Learn how to [copy the source machine's file system](/migrate/containers/docs/m2c-cli/copy-file-system)."]]