Installing a Client (MRS 2.x or Earlier)
You need to install a cluster client to connect to the component server in the cluster and perform tasks such as component connection and job submission. You can install the cluster client on a node within the cluster or on a node outside of it.
To ensure that certain features function properly, it is important to reinstall the client after modifying the server configuration of a component in the cluster. This ensures that the client version matches the server version.
This section describes how to install the cluster client of MRS 2.x or earlier. For details about MRS 3.x, see Installing a Client (MRS 3.x).
After an MRS cluster earlier than 3.x is created, the client is installed on the active Master node by default. The installation directory is /opt/client.
Installing a Client on a Node in a Cluster
- Log in to Manager by referring to Accessing MRS Manager, choose Services > Download Client, and download the client installation package to the active OMS node.
- On the MRS console, view the IP address on the Nodes page of the specified cluster.
Record the IP address of the node where the client is to be installed and the IP address of the active Master node (active OMS node).
- Log in to the active OMS node as user root and run the following command to switch to user omm.
sudo su - omm
- Copy the client installation package to the specified node.
scp -p /tmp/MRS-client/MRS_Services_Client.tar IP address of the node where the client is to be installed:/opt/client_tmp
- Log in to the node where the client is to be installed as the root user.
- Install the client.
cd /opt/client_tmp
tar -xvf MRS_Services_Client.tar
tar -xvf MRS_Services_ClientConfig.tar
cd MRS_Services_ClientConfig
./install.sh Client installation directory
Example:
./install.sh /opt/hadoopclient
Wait until the client is installed.
- When installing the client, you can choose the installation directory. If you opt to use an existing directory, it must be empty. Also, the installation directory cannot have spaces and should only contain uppercase and lowercase letters, digits, and underscores (_).
- Delete the client installation directory when uninstalling a client.
- Check whether the client is installed.
- Go to the client installation directory and load environment variables.
source bigdata_env
- Run related commands based on the cluster mode.
- If Kerberos authentication is not enabled for the cluster, you can directly run commands related to the component client.
View files in the HDFS root directory:
hdfs dfs -ls /
- If Kerberos authentication is enabled for the cluster, run the kinit command to perform user authentication.
Example:
kinit admin
Password for xxx@HADOOP.COM: #Enter the password of user admin.
Run the klist command to query and confirm authentication details.Ticket cache: FILE:/tmp/krb5cc_0 Default principal: xxx@HADOOP.COM Valid starting Expires Service principal ...
- If Kerberos authentication is not enabled for the cluster, you can directly run commands related to the component client.
- Go to the client installation directory and load environment variables.
Installing a Client on a Node Outside the Cluster
- Prepare a Linux ECS for installing the MRS cluster client.
- The recommended ECS OSs and versions are as follows:
Table 1 OS reference list CPU Architecture
OS
Supported Version
x86 computing
EulerOS
- Available: EulerOS 2.2
- Available: EulerOS 2.3
- Available: EulerOS 2.5
Kunpeng computing (Arm)
EulerOS
Available: EulerOS 2.8
- The CPU architecture of the ECS must be the same as that of the MRS cluster node.
- Sufficient disk space (at least 40 GB) must be allocated to the ECS client installation directory.
- The ECS must be in the same VPC and security group as the MRS cluster.
- All ports in the inbound direction of the MRS cluster security group are open to the client node. For details, see Adding a Security Group Rule.
- The NTP service has been installed on the ECS OS and is running properly.
If the NTP service is not installed, run the yum install ntp -y command to install it when the yum source is configured.
- The ECS must allow users to log in to it using a password (SSH).
- The recommended ECS OSs and versions are as follows:
- Log in to Manager of the cluster by referring to Accessing MRS Manager and choose Services > Download Client.
- In Client Type, select All client files.
- In Download to, select Remote host.
- Set Host IP Address to the IP address of the node where the client is to be installed, Host Port to 22, and Save Path to /tmp.
If the default SSH login port of the node has been changed, set Host Port to the new port.
- Set Login User to root.
If other users are used, ensure that the users have read, write, and execute permission on the save path.
- Select Password or SSH Private Key for Login Mode.
- Password: Enter the password of user root set during cluster creation.
- SSH Private Key: Select and upload the key file used for creating the cluster.
- Click OK to generate a client file.
After the file download is confirmed, obtain the client software package from the specified path on the node where the client will be installed.
If the client download fails, check the username, password, and security group configuration of the remote host. Ensure that the username and password are accurate and that the inbound rule for the SSH port has been added to the remote host's security group. Once confirmed, retry the client download.
Generating a client will occupy a large number of disk I/Os. You are advised not to download a client when the cluster is being installed, started, and patched, or in other unstable states.
- Configure NTP time synchronization for the node where the client is to be installed to synchronize time with the MRS cluster.
- Log in to the MRS console and click the MRS cluster name from the cluster list.
- Click Nodes to expand the Master node group list and view the IP addresses of the Master1 and Master2 nodes in the cluster.
- Log in to the node where the client is to be installed as user root and run the following command to edit the NTP configuration file. Add the IP addresses of the Master1 and Master2 nodes in the MRS cluster and comment out other server addresses.
vi /etc/ntp.conf
server master1_ip prefer server master2_ip
Figure 1 Modifying the NTP configuration file
- Save the configuration file and run the following command to disable the NTP service:
- Manually synchronize the time.
- Start the NTP service.
Or
systemctl restart ntpd
- Run the ntpstat command to check the time synchronization result.
synchronised to NTP server (xxx) at stratum 2 time correct to within 12 ms polling server every 16 s
- Copy the downloaded client software package to the /opt directory.
cp /tmp/MRS_Services_Client.tar /opt
- Decompress the software package.
cd /opt
tar -xvf MRS_Services_Client.tar
- Verify the file.
sha256sum -c MRS_Services_ClientConfig.tar.sha256
The command output is as follows:
MRS_Services_ClientConfig.tar: OK
- Decompress the software package.
tar -xvf MRS_Services_ClientConfig.tar
- Install the cluster client.
sh /opt/MRS_Services_ClientConfig/install.sh Client installation directory
Example:
sh /opt/MRS_Services_ClientConfig/install.sh /opt/hadoopclient
If the following information is displayed, the client has been successfully installed:
Components client installation is complete.
- When installing the client, you can choose the installation directory. If you opt to use an existing directory, it must be empty. Also, the installation directory cannot have spaces and should only contain uppercase and lowercase letters, digits, and underscores (_).
- Delete the client installation directory when uninstalling a client.
- Check whether the client is installed.
- Go to the client installation directory and load environment variables.
source bigdata_env
- Run related commands based on the cluster mode.
- If Kerberos authentication is not enabled for the cluster, you can directly run commands related to the component client.
View files in the HDFS root directory:
hdfs dfs -ls /
- If Kerberos authentication is enabled for the cluster, run the kinit command to perform user authentication.
Example:
kinit admin
Password for xxx@HADOOP.COM: #Enter the password of user admin.
Run the klist command to query and confirm authentication details.Ticket cache: FILE:/tmp/krb5cc_0 Default principal: xxx@HADOOP.COM Valid starting Expires Service principal ...
- If Kerberos authentication is not enabled for the cluster, you can directly run commands related to the component client.
- Go to the client installation directory and load environment variables.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot