Use a customized script

更新时间:
复制 MD 格式

A MyBase dedicated cluster grants you specific OS permissions on the host, which lets you upload and download files, and install software. This topic shows you how to install and use a customized script.

Background

Unlike a traditional cloud database, which does not provide backend access to your own management center, a MyBase dedicated cluster lets you log on to the host with OS permissions. You can connect the host to your management center for centralized administration. You can use a bastion host to log on to and manage the database instance host. This lets you install a customized script on the host to collect system information and meet specific requirements.
Note

Procedure

  1. Create a MyBase dedicated cluster with OS permissions enabled. For more information, see Create a cluster.
  2. Create a bastion host.
  3. Connect to a host from a bastion host (Linux).
  4. Install the required software and upload your script. The following example installs lrzsz, a tool for file uploads and downloads, and then uploads a file:
    1. Search for and install lrzsz. Run the following commands:
      yum search lrzsz
      yumdownloader lrzsz-0.12.20-36.1.al7.x86_64.rpm  
      rpm2cpio lrzsz-0.12.20-36.1.al7.x86_64.rpm |cpio -idvm
    2. Modify the environment variable. Run the following commands:
      vim  ~/.bashrc
      export
      PATH=$PATH:$HOME/usr/bin/
      source ~/.bashrc
    3. Run the rz command and select a file to upload.
      rz
      Sending: xxx              0023be50
      **B0900000000a87c
      Uploading: 98%    (ETA 00:00      39 kB /    39 kB    766 kBPS)    **B0900
      %00000a87c
      Uploading: 0%    (ETA 00:00       0 kB /    39 kB      0 kBPS)    **B01000
      Bytes Sent:  1024   BPS:13258
      **B08000000022d
      Transfer complete