我要评分
获取效率
正确性
完整性
易理解

Deploying Doris

Install the required software, configure system parameters, and deploy FEs and BEs for Doris deployment.

Installing MySQL

1
yum install mysql

Configuring System Parameters

  1. Set the maximum number of file handles that can be opened by the system.
    1. Open the /etc/security/limits.conf file.
      1
      vi /etc/security/limits.conf
      
    2. Press i to enter the insert mode and add the following content to the file:
      1
      2
      3
      4
      * soft nofile 204800
      * hard nofile 204800
      * soft nproc 204800
      * hard nproc 204800
      
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Open the /etc/sysctl.conf file.
      1
      vi /etc/sysctl.conf
      
    5. Press i to enter the insert mode and add the following content to the file:
      1
      fs.file-max = 6553560
      
    6. Press Esc, type :wq!, and press Enter to save the file and exit.
  2. Synchronize the clock.
    The Doris metadata requires a time precision in which the time error must be less than 5,000 ms. Therefore, the clocks of all nodes in the entire cluster must be synchronized to prevent service exceptions caused by metadata and clock inconsistency.
    • Set the date and time.
      1
      date -s "yyyy-mm-dd hh:mm:ss"
      
    • Set the time only.
      1
      date -s "hh:mm:ss"
      
  3. Disable the swap partition temporarily. If the server is restarted, run this command again.
    1
    swapoff -a
    
  4. Set the value of virtual memory area to 2000000 at a minimum. If the server is restarted, run this command again.
    1
    sysctl -w vm.max_map_count=2000000
    

Deploying an FE

  1. Click here to download the Doris 2.1.2 installation package apache-doris-2.1.2-bin-arm64.tar.gz from GitHub. Upload it to the /opt/tools/installed directory.

  2. Decompress the Doris 2.1.2 installation package.
    1
    2
    cd /opt/tools/installed
    tar -zxvf apache-doris-2.1.2-bin-arm64.tar.gz
    
  3. Modify the FE configuration file in the apache-doris-2.1.2-bin-arm64 directory.
    1. Create a metadata storage path.
      1
      mkdir -p /opt/tools/data/fe
      
    2. Open the apache-doris-2.1.2-bin-arm64/fe/conf/fe.conf file.
      1
      vi /opt/tools/installed/apache-doris-2.1.2-bin-arm64/fe/conf/fe.conf
      
    3. Press i to enter the insert mode and modify the following content of the file:
      1
      2
      priority_networks=xx.xx.xx.xx/xx
      meta_dir=/opt/tools/data/fe
      
      • priority_networks indicates the FE IP address, which is usually the IP address of the local physical machine, for example, 172.18.0.11/21.
      • meta_dir indicates the metadata storage path.
    4. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Start the FE.
    1
    sh /opt/tools/installed/apache-doris-2.1.2-bin-arm64/fe/bin/start_fe.sh --daemon
    
  5. Check whether the FE is successfully started.
    Verify FE startup by checking for the MySQL command prompt.
    1
    mysql -h FE_IP -P FE_query_port -u root
    
    • FE_IP is the value of priority_networks configured in fe.conf.
    • FE_query_port is the value of query_port configured in fe.conf.
    • If the FE fails to be started, check the /opt/tools/installed/apache-doris-2.1.2-bin-arm64/fe/log/fe.out file.

Deploying a BE

  1. Modify the BE configuration file in the apache-doris-2.1.2-bin-arm64 directory to set the BE IP address and data storage path, and enable (or disable) the cache.
    1. Create a path for storing BE data.
      1
      mkdir -p /opt/tools/data/be
      
    2. Open the apache-doris-2.1.2-bin-arm64/be/conf/be.conf file.
      1
      vi /opt/tools/installed/apache-doris-2.1.2-bin-arm64/be/conf/be.conf
      
    3. Press i to enter the insert mode and modify the following content of the file:
      1
      2
      3
      priority_networks=xx.xx.xx.xx/xx        //BE IP address, which is usually the IP address of the local physical machine, for example, 172.18.0.11/21.
      storage_root_path=/opt/tools/data/be    //BE data storage directory
      disable_storage_page_cache=true         //Enable or disable the cache. (To disable the cache, set true; to enable the cache, comment out this line.)
      
      • priority_networks indicates the BE IP address, which is usually the IP address of the local physical machine, for example, 172.18.0.11/21.
      • storage_root_path indicates the BE data storage path.
      • disable_storage_page_cache indicates whether to enable the cache. (To disable the cache, set true; to enable the cache, comment out this line.)
    4. Press Esc, type :wq!, and press Enter to save the file and exit.
  2. Start the BE.
    1
    sh /opt/tools/installed/apache-doris-2.1.2-bin-arm64/be/bin/start_be.sh --daemon
    
  3. Check whether the BE is started successfully.

    Run the top command to check whether the doris_be process is running. If the process is running, the BE is started successfully.

    If the BE fails to be started, check the /opt/tools/installed/apache-doris-2.1.2-bin-arm64/be/log/be.out file.