Installing the MgC Agent on Linux
Preparations
- Prepare a Linux server for installing the MgC Agent in the source intranet environment. The Linux server must:
- Be able to access the Internet and the domain names of MgC, IoTDA, and other cloud services. For details about the domain names to be accessed, see Domain Names.
- Allow outbound traffic on port 8883 if the server is in a security group.
- Run CentOS 8.X.
- Have at least 4 CPUs and 8 GB of memory. If you want to use big data verification, the server must have at least 8 CPUs and 16 GB of memory.
Do not install the MgC Agent on a source server to be migrated.
- High resource consumption: The MgC Agent consumes CPU and memory resources during collection and migration. If a large number of migration tasks are performed by the MgC Agent, services on the source server may be affected.
- Port occupation: The MgC Agent occupies some ports on the server, which may affect services running on it.
- Have rng-tools installed. To check whether this tool is installed, run the following command on the Linux server:
rpm -qa | grep rng-tools
If no rng-tools-related information is displayed, rng-tools is not installed on the server. Run the following command to install rng-tools:yum -y install rng-tools
- Not have any antivirus or protection software enabled. This type of software may stop the MgC Agent from executing migration commands, resulting in migration failures.
- Allow TCP traffic on port 27080. You can do that by adding an inbound rule to the security group of the Linux server. For the rule, set Source to the IP address of the Windows server you use to remotely access the MgC Agent console.
- Sign up for a HUAWEI ID and enable Huawei Cloud services, and obtain an AK/SK pair for the account.
- Create a migration project on the MgC console.
Procedure
- Sign in to the MgC console from the Linux server you prepared.
- In the navigation pane on the left, choose MgC Agents.
- In the Linux area, click Download Installation Package or Copy Download Command to download the MgC Agent installation program to the Linux server.
- Decompress the MgC Agent installation package.
tar zxvf Edge.tar.gz
- Go to the scripts directory in the decompressed MgC Agent directory.
cd Edge/scripts/
- Run the MgC Agent installation script.
./install.sh
- Enter a private IP address of the Linux server. The IP address will be used for accessing the MgC Agent console. If the entered IP address is not used by the Linux server, the system will prompt you whether to use any public IP address of the Linux server as the MgC Agent access address.
- Check if the message shown in the following figure is displayed. If it is, the MgC Agent for Linux has been installed. The port in the following figure is for reference only. Note the actual port returned. Generally, the port is 27080.
Update environment variables.
source /opt/cloud/Edge/scripts/setenv.sh
- On the Windows server for which an inbound rule is added to the security group of the server where the MgC Agent is installed, open a browser and enter https://<IP-address-entered-in-step-7>:<port-obtained-in-step-8> in the address box. For example, if the IP address entered in step 7 is 192.168.x.x and the port returned in step 8 is 27080, the MgC Agent access address is https://192.168.x.x:27080. Open the MgC Agent console, enter the AK/SK pair of your Huawei Cloud account, select a region, and click Log In.
If there are access problems, check the IP address entered in the address box and the inbound rule settings of the security group of the Linux server with the MgC Agent installed.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.