diff --git a/be/test/vec/function/function_like_test.cpp b/be/test/vec/function/function_like_test.cpp
index 488fda5eb1d497..eacad9b0014873 100644
--- a/be/test/vec/function/function_like_test.cpp
+++ b/be/test/vec/function/function_like_test.cpp
@@ -15,12 +15,9 @@
// specific language governing permissions and limitations
// under the License.
-#include
- 1. Create root directories for pacakges
+
+1. Create root directories for pacakges
```shell
- # Create root directory for software download and installation packages
- mkdir /opt/tools
- # Create root directory for software installation
- mkdir /opt/software
+# Create root directory for software download and installation packages
+mkdir /opt/tools
+# Create root directory for software installation
+mkdir /opt/software
```
- 2. Installing dependencies
- - Git
+2. Installing dependencies
+
+ - Git
```shell
- # yum install (save the trouble of compilation)
- yum install -y git
+ # yum install (save the trouble of compilation)
+ yum install -y git
```
- - JDK8 (2 methods)
+- JDK8 (2 methods)
```shell
- # 1. yum install, which can avoid additional download and configuration. Installing the devel package is to get tools such as the jps command.
- yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
-
- # 2. Download the installation package of the arm64 architecture, decompress it, and configure the environment variables.
- cd /opt/tools
- wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \
- tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
- mv jdk1.8.0_291 /opt/software/jdk8
+ # 1. yum install, which can avoid additional download and configuration. Installing the devel package is to get tools such as the jps command.
+ yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
+
+ # 2. Download the installation package of the arm64 architecture, decompress it, and configure the environment variables.
+ cd /opt/tools
+ wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \
+ tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
+ mv jdk1.8.0_291 /opt/software/jdk8
```
- - Maven
+ - Maven
```shell
- cd /opt/tools
- # Download the wget tool, decompress it, and configure the environment variables.
- wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \
- tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
- mv apache-maven-3.6.3 /opt/software/maven
+ cd /opt/tools
+ # Download the wget tool, decompress it, and configure the environment variables.
+ wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \
+ tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
+ mv apache-maven-3.6.3 /opt/software/maven
```
- - NodeJS
+ - NodeJS
```shell
- cd /opt/tools
- # Download the installation package of the arm64 architecture
- wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \
- tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
- mv node-v16.3.0-linux-arm64 /opt/software/nodejs
+ cd /opt/tools
+ # Download the installation package of the arm64 architecture
+ wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \
+ tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
+ mv node-v16.3.0-linux-arm64 /opt/software/nodejs
```
- - ldb-toolchain
+ - LDB-Toolchain
```shell
- cd /opt/tools
- # Download ldb-toolchain ARM version
- wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \
- sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
+ cd /opt/tools
+ # Download LDB-Toolchain ARM version
+ wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \
+ sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
```
- 3. Configure environment variables
+
+3. Configure environment variables
```shell
- # Configure environment variables
- vim /etc/profile.d/doris.sh
- export JAVA_HOME=/opt/software/jdk8
- export MAVEN_HOME=/opt/software/maven
- export NODE_JS_HOME=/opt/software/nodejs
- export LDB_HOME=/opt/software/ldb_toolchain
- export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
-
- # Save, exit, and refresh environment variables
- source /etc/profile.d/doris.sh
-
- # Test
- java -version
- > java version "1.8.0_291"
- mvn -version
- > Apache Maven 3.6.3
- node --version
- > v16.3.0
- gcc --version
- > gcc-11
+# Configure environment variables
+vim /etc/profile.d/doris.sh
+export JAVA_HOME=/opt/software/jdk8
+export MAVEN_HOME=/opt/software/maven
+export NODE_JS_HOME=/opt/software/nodejs
+export LDB_HOME=/opt/software/ldb_toolchain
+export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
+
+# Save, exit, and refresh environment variables
+source /etc/profile.d/doris.sh
+
+# Test
+java -version
+> java version "1.8.0_291"
+mvn -version
+> Apache Maven 3.6.3
+node --version
+> v16.3.0
+gcc --version
+> gcc-11
```
- 4. Install other environments and components
+
+4. Install other environments and components
```shell
- # Install required system packages
- sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2
-
- # Install autoconf-2.69
- cd /opt/tools
- wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
- tar zxf autoconf-2.69.tar.gz && \
- mv autoconf-2.69 /opt/software/autoconf && \
- cd /opt/software/autoconf && \
- ./configure && \
- make && \
- make install
+# Install required system packages
+sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2
+
+# Install autoconf-2.69
+cd /opt/tools
+wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
+ tar zxf autoconf-2.69.tar.gz && \
+ mv autoconf-2.69 /opt/software/autoconf && \
+ cd /opt/software/autoconf && \
+ ./configure && \
+ make && \
+ make install
```
- 1. Update apt-get repository
+
+1. Update apt-get repository
```shell
- apt-get update
+apt-get update
```
-
- 2. Check the shell command set - The Ubuntu shell installs dash instead of bash by default. It needs to be switched to bash for proper execution. Run the following command to view the details of sh and confirm which program corresponds to the shell: +2. Check the shell command set + + The Ubuntu shell installs dash instead of bash by default. It needs to be switched to bash for proper execution. Run the following command to view the details of sh and confirm which program corresponds to the shell: ```shell - ls -al /bin/sh +ls -al /bin/sh ``` - The shell can be switched back to bash by: + The shell can be switched back to dash by: ```shell - sudo dpkg-reconfigure dash +sudo dpkg-reconfigure dash ``` - Then select no to confirm. - - After these steps, dash will no longer be the default shell tool. + Then select no to confirm. After these steps, dash will no longer be the default shell tool.
- 3. Create root directories for packages + +3. Create root directories for packages ```shell - # Create root directory for software download and installation packages - mkdir /opt/tools - # Create root directory for software installation - mkdir /opt/software + # Create root directory for software download and installation packages + mkdir /opt/tools + # Create root directory for software installation + mkdir /opt/software ```
- 4. Installing dependencies - - Git + +4. Installing dependencies + - Git ```shell - # apt-get install, which can save the trouble of compilation - apt-get -y install git + # apt-get install, which can save the trouble of compilation + apt-get -y install git ``` - - JDK8 + - JDK8 ```shell - # Download the installation package of the ARM64 architecture, decompress it, and configure environment variables. - cd /opt/tools - wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \ - tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \ - mv jdk1.8.0_291 /opt/software/jdk8 + # Download the installation package of the ARM64 architecture, decompress it, and configure environment variables. + cd /opt/tools + wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \ + tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \ + mv jdk1.8.0_291 /opt/software/jdk8 ``` - - Maven + - Maven ```shell - cd /opt/tools - # Download the wget tool, decompress it, and configure the environment variables. - wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ - tar -zxvf apache-maven-3.6.3-bin.tar.gz && \ - mv apache-maven-3.6.3 /opt/software/maven + cd /opt/tools + # Download the wget tool, decompress it, and configure the environment variables. + wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ + tar -zxvf apache-maven-3.6.3-bin.tar.gz && \ + mv apache-maven-3.6.3 /opt/software/maven ``` - - NodeJS + - NodeJS ```shell - cd /opt/tools - # Download the installation package of ARM64 architecture. - wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \ - tar -xvf node-v16.3.0-linux-arm64.tar.xz && \ - mv node-v16.3.0-linux-arm64 /opt/software/nodejs + cd /opt/tools + # Download the installation package of ARM64 architecture. + wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \ + tar -xvf node-v16.3.0-linux-arm64.tar.xz && \ + mv node-v16.3.0-linux-arm64 /opt/software/nodejs ``` - - ldb-toolchain + - ldb-toolchain ```shell - cd /opt/tools - # Download ldb-toolchain ARM version - wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \ - sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/ + cd /opt/tools + # Download ldb-toolchain ARM version + wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \ + sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/ ```
- 5. Configure environment variables + +5. Configure environment variables ```shell - # Configure environment variables - vim /etc/profile.d/doris.sh - export JAVA_HOME=/opt/software/jdk8 - export MAVEN_HOME=/opt/software/maven - export NODE_JS_HOME=/opt/software/nodejs - export LDB_HOME=/opt/software/ldb_toolchain - export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH - - # Save, exit, and refresh environment variables - source /etc/profile.d/doris.sh - - # Test - java -version - > java version "1.8.0_291" - mvn -version - > Apache Maven 3.6.3 - node --version - > v16.3.0 - gcc --version - > gcc-11 +# Configure environment variables +vim /etc/profile.d/doris.sh +export JAVA_HOME=/opt/software/jdk8 +export MAVEN_HOME=/opt/software/maven +export NODE_JS_HOME=/opt/software/nodejs +export LDB_HOME=/opt/software/ldb_toolchain +export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH + +# Save, exit, and refresh environment variables +source /etc/profile.d/doris.sh + +# Test +java -version +> java version "1.8.0_291" +mvn -version +> Apache Maven 3.6.3 +node --version +> v16.3.0 +gcc --version +> gcc-11 ```
- 6. Install other environments and components + +6. Install other environments and components ```shell - # Install required system packages - sudo apt install -y build-essential cmake flex automake bison binutils-dev libiberty-dev zip libncurses5-dev curl ninja-build - sudo apt-get install -y make - sudo apt-get install -y unzip - sudo apt-get install -y python2 - sudo apt-get install -y byacc - sudo apt-get install -y automake - sudo apt-get install -y libtool - sudo apt-get install -y bzip2 - sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa - sudo apt update - sudo apt install gcc-11 g++-11 - sudo apt-get -y install autoconf autopoint - - # Install autoconf-2.69 - cd /opt/tools - wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ - tar zxf autoconf-2.69.tar.gz && \ - mv autoconf-2.69 /opt/software/autoconf && \ - cd /opt/software/autoconf && \ - ./configure && \ - make && \ - make install +# Install required system packages +sudo apt install -y build-essential cmake flex automake bison binutils-dev libiberty-dev zip libncurses5-dev curl ninja-build +sudo apt-get install -y make +sudo apt-get install -y unzip +sudo apt-get install -y python2 +sudo apt-get install -y byacc +sudo apt-get install -y automake +sudo apt-get install -y libtool +sudo apt-get install -y bzip2 +sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa +sudo apt update +sudo apt install gcc-11 g++-11 +sudo apt-get -y install autoconf autopoint + +# Install autoconf-2.69 +cd /opt/tools +wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ + tar zxf autoconf-2.69.tar.gz && \ + mv autoconf-2.69 /opt/software/autoconf && \ + cd /opt/software/autoconf && \ + ./configure && \ + make && \ + make install ```
@@ -379,11 +387,11 @@ If you still encounter problems when compiling or starting, please consult the [ - Use a third-party download repository ```shell - export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty - sh /opt/doris/thirdparty/build-thirdparty.sh -```` + export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty + sh /opt/doris/thirdparty/build-thirdparty.sh +``` - REPOSITORY_URL contains all third-party library source packages and their historical versions. + REPOSITORY_URL contains all third-party library source packages and their historical versions. 2. python command not found @@ -404,11 +412,11 @@ If you still encounter problems when compiling or starting, please consult the [ Establish a soft link to the `python` command in `\usr\bin` ```shell - # View python installation directory - whereis python - # Establish soft connection - sudo ln -s /usr/bin/python2.7 /usr/bin/python -```` + # View python installation directory + whereis python + # Establish soft connection + sudo ln -s /usr/bin/python2.7 /usr/bin/python +``` 3. There is no output directory after compilation @@ -423,8 +431,8 @@ If you still encounter problems when compiling or starting, please consult the [ - Solution ```shell - sh build.sh --clean -```` + sh build.sh --clean +``` 4. spark-dpp compilation fails @@ -451,7 +459,9 @@ If you still encounter problems when compiling or starting, please consult the [ - Failed to build CXX object during compilation, error message showing no space left > fatal error: error writing to /tmp/ccKn4nPK.s: No space left on device + > > 1112 | } // namespace doris::vectorized + > > compilation terminated. - Cause @@ -481,12 +491,12 @@ If you still encounter problems when compiling or starting, please consult the [ - Solution - Copy the `pkg.m4` file in the ldb/aclocal directory into the libxml2/m4 directory, and recompile the third-party library. + Copy the `pkg.m4` file in the ldb/aclocal directory into the libxml2/m4 directory, and recompile the third-party library. ```shell - cp /opt/software/ldb_toolchain/share/aclocal/pkg.m4 /opt/incubator-doris/thirdparty/src/libxml2-v2.9.10/m4 - sh /opt/incubator-doris/thirdparty/build-thirdparty.sh -```` + cp /opt/software/ldb_toolchain/share/aclocal/pkg.m4 /opt/incubator-doris/thirdparty/src/libxml2-v2.9.10/m4 + sh /opt/incubator-doris/thirdparty/build-thirdparty.sh +``` 7. Failed to execute test CURL_HAS_TLS_PROXY @@ -495,15 +505,19 @@ If you still encounter problems when compiling or starting, please consult the [ - An error is reported during the compilation process of the third-party package: > -- Performing Test CURL_HAS_TLS_PROXY - Failed + > > CMake Error at cmake/dependencies.cmake:15 (get_property): - > INTERFACE_LIBRARY targets may only have whitelisted properties. The - > property "LINK_LIBRARIES_ALL" is not allowed. + > + > INTERFACE_LIBRARY targets may only have whitelisted properties. The property "LINK_LIBRARIES_ALL" is not allowed. - The log shows: curl `No such file or directory` > fatal error: curl/curl.h: No such file or directory - > 2 | #include- 1. 创建软件下载安装包根目录和软件安装根目录 + +1. 创建软件下载安装包根目录和软件安装根目录 ```shell - # 创建软件下载安装包根目录 - mkdir /opt/tools - # 创建软件安装根目录 - mkdir /opt/software +# 创建软件下载安装包根目录 +mkdir /opt/tools +# 创建软件安装根目录 +mkdir /opt/software ```
- 2. 安装依赖项 - - Git +2. 安装依赖项 + + - Git ```shell - # 省去编译麻烦,直接使用 yum 安装 - yum install -y git + # 省去编译麻烦,直接使用 yum 安装 + yum install -y git ``` - - JDK8 + - JDK8 ```shell - # 两种方式,第一种是省去额外下载和配置,直接使用 yum 安装,安装 devel 包是为了获取一些工具,如 jps 命令 - yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel - - # 第二种是下载 arm64 架构的安装包,解压配置环境变量后使用 - cd /opt/tools - wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \ - tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \ - mv jdk1.8.0_291 /opt/software/jdk8 + # 两种方式,第一种是省去额外下载和配置,直接使用 yum 安装,安装 devel 包是为了获取一些工具,如 jps 命令 + yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel + + # 第二种是下载 arm64 架构的安装包,解压配置环境变量后使用 + cd /opt/tools + wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \ + tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \ + mv jdk1.8.0_291 /opt/software/jdk8 ``` - - Maven + - Maven ```shell - cd /opt/tools - # wget 工具下载后,直接解压缩配置环境变量使用 - wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ - tar -zxvf apache-maven-3.6.3-bin.tar.gz && \ - mv apache-maven-3.6.3 /opt/software/maven + cd /opt/tools + # wget 工具下载后,直接解压缩配置环境变量使用 + wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ + tar -zxvf apache-maven-3.6.3-bin.tar.gz && \ + mv apache-maven-3.6.3 /opt/software/maven ``` - - NodeJS + - NodeJS ```shell - cd /opt/tools - # 下载 arm64 架构的安装包 - wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \ - tar -xvf node-v16.3.0-linux-arm64.tar.xz && \ - mv node-v16.3.0-linux-arm64 /opt/software/nodejs + cd /opt/tools + # 下载 arm64 架构的安装包 + wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \ + tar -xvf node-v16.3.0-linux-arm64.tar.xz && \ + mv node-v16.3.0-linux-arm64 /opt/software/nodejs ``` - - LDB-Toolchain + - LDB-Toolchain ```shell - cd /opt/tools - # 下载 LDB-Toolchain ARM 版本 - wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \ - sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/ + cd /opt/tools + # 下载 LDB-Toolchain ARM 版本 + wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \ + sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/ ```
- 3. 配置环境变量 + +3. 配置环境变量 ```shell - # 配置环境变量 - vim /etc/profile.d/doris.sh - export JAVA_HOME=/opt/software/jdk8 - export MAVEN_HOME=/opt/software/maven - export NODE_JS_HOME=/opt/software/nodejs - export LDB_HOME=/opt/software/ldb_toolchain - export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH - - # 保存退出并刷新环境变量 - source /etc/profile.d/doris.sh - - # 测试是否成功 - java -version - > java version "1.8.0_291" - mvn -version - > Apache Maven 3.6.3 - node --version - > v16.3.0 - gcc --version - > gcc-11 +# 配置环境变量 +vim /etc/profile.d/doris.sh +export JAVA_HOME=/opt/software/jdk8 +export MAVEN_HOME=/opt/software/maven +export NODE_JS_HOME=/opt/software/nodejs +export LDB_HOME=/opt/software/ldb_toolchain +export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH + +# 保存退出并刷新环境变量 +source /etc/profile.d/doris.sh + +# 测试是否成功 +java -version +> java version "1.8.0_291" +mvn -version +> Apache Maven 3.6.3 +node --version +> v16.3.0 +gcc --version +> gcc-11 ```
- 4. 安装其他额外环境和组件 + +4. 安装其他额外环境和组件 ```shell - # install required system packages - sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2 - - # install autoconf-2.69 - cd /opt/tools - wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ - tar zxf autoconf-2.69.tar.gz && \ - mv autoconf-2.69 /opt/software/autoconf && \ - cd /opt/software/autoconf && \ - ./configure && \ - make && \ - make install +# Install required system packages +sudo yum install -y byacc patch automake libtool make which file ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2 + +# Install autoconf-2.69 +cd /opt/tools +wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ + tar zxf autoconf-2.69.tar.gz && \ + mv autoconf-2.69 /opt/software/autoconf && \ + cd /opt/software/autoconf && \ + ./configure && \ + make && \ + make install ```
- 1. 更新 apt-get 软件库 + +1. 更新 apt-get 软件库 ```shell - apt-get update +apt-get update ```
- 2. 检查 shell 命令集 - ubuntu 的 shell 默认安装的是 dash,而不是 bash,要切换成 bash 才能执行,运行以下命令查看 sh 的详细信息,确认 shell 对应的程序是哪个: +2. 检查 shell 命令集 + + ubuntu 的 shell 默认安装的是 dash,而不是 bash,要切换成 bash 才能执行,运行以下命令查看 sh 的详细信息,确认 shell 对应的程序是哪个: ```shell - ls -al /bin/sh +ls -al /bin/sh ``` - 通过以下方式可以使 shell 切换回 bash: + 通过以下方式可以使 shell 切换回 dash: ```shell - sudo dpkg-reconfigure dash +sudo dpkg-reconfigure dash ``` - 然后选择 no 或者 否 ,并确认 - - 这样做将重新配置 dash,并使其不作为默认的 shell 工具 + 然后选择 no 或者 否 并确认。这样做将重新配置 dash,并使其不作为默认的 shell 工具
- 3. 创建软件下载安装包根目录和软件安装根目录 + +3. 创建软件下载安装包根目录和软件安装根目录 ```shell - # 创建软件下载安装包根目录 - mkdir /opt/tools - # 创建软件安装根目录 - mkdir /opt/software + # 创建软件下载安装包根目录 + mkdir /opt/tools + # 创建软件安装根目录 + mkdir /opt/software ```
- 4. 安装依赖项 - - Git + +4. 安装依赖项 + + - Git ```shell - # 省去编译麻烦,直接使用 apt-get 安装 - apt-get -y install git + # 省去编译麻烦,直接使用 apt-get 安装 + apt-get -y install git ``` - - JDK8 + - JDK8 ```shell - # 下载 arm64 架构的安装包,解压配置环境变量后使用 - cd /opt/tools - wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \ - tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \ - mv jdk1.8.0_291 /opt/software/jdk8 + # 下载 arm64 架构的安装包,解压配置环境变量后使用 + cd /opt/tools + wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz && \ + tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \ + mv jdk1.8.0_291 /opt/software/jdk8 ``` - - Maven + - Maven ```shell - cd /opt/tools - # wget 工具下载后,直接解压缩配置环境变量使用 - wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ - tar -zxvf apache-maven-3.6.3-bin.tar.gz && \ - mv apache-maven-3.6.3 /opt/software/maven + cd /opt/tools + # wget 工具下载后,直接解压缩配置环境变量使用 + wget https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz && \ + tar -zxvf apache-maven-3.6.3-bin.tar.gz && \ + mv apache-maven-3.6.3 /opt/software/maven ``` - - NodeJS + - NodeJS ```shell - cd /opt/tools - # 下载 arm64 架构的安装包 - wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \ - tar -xvf node-v16.3.0-linux-arm64.tar.xz && \ - mv node-v16.3.0-linux-arm64 /opt/software/nodejs + cd /opt/tools + # 下载 arm64 架构的安装包 + wget https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz && \ + tar -xvf node-v16.3.0-linux-arm64.tar.xz && \ + mv node-v16.3.0-linux-arm64 /opt/software/nodejs ``` - - LDB-Toolchain + - LDB-Toolchain ```shell - cd /opt/tools - # 下载 LDB-Toolchain ARM 版本 - wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \ - sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/ + cd /opt/tools + # 下载 LDB-Toolchain ARM 版本 + wget https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh && \ + sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/ ```
- 5. 配置环境变量 + +5. 配置环境变量 ```shell - # 配置环境变量 - vim /etc/profile.d/doris.sh - export JAVA_HOME=/opt/software/jdk8 - export MAVEN_HOME=/opt/software/maven - export NODE_JS_HOME=/opt/software/nodejs - export LDB_HOME=/opt/software/ldb_toolchain - export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH - - # 保存退出并刷新环境变量 - source /etc/profile.d/doris.sh - - # 测试是否成功 - java -version - > java version "1.8.0_291" - mvn -version - > Apache Maven 3.6.3 - node --version - > v16.3.0 - gcc --version - > gcc-11 +# 配置环境变量 +vim /etc/profile.d/doris.sh +export JAVA_HOME=/opt/software/jdk8 +export MAVEN_HOME=/opt/software/maven +export NODE_JS_HOME=/opt/software/nodejs +export LDB_HOME=/opt/software/ldb_toolchain +export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH + +# 保存退出并刷新环境变量 +source /etc/profile.d/doris.sh + +# 测试是否成功 +java -version +> java version "1.8.0_291" +mvn -version +> Apache Maven 3.6.3 +node --version +> v16.3.0 +gcc --version +> gcc-11 ```
- 6. 安装其他额外环境和组件 + +6. 安装其他额外环境和组件 ```shell - # install required system packages - sudo apt install -y build-essential cmake flex automake bison binutils-dev libiberty-dev zip libncurses5-dev curl ninja-build - sudo apt-get install -y make - sudo apt-get install -y unzip - sudo apt-get install -y python2 - sudo apt-get install -y byacc - sudo apt-get install -y automake - sudo apt-get install -y libtool - sudo apt-get install -y bzip2 - sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa - sudo apt update - sudo apt install gcc-11 g++-11 - sudo apt-get -y install autoconf autopoint - - # install autoconf-2.69 - cd /opt/tools - wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ - tar zxf autoconf-2.69.tar.gz && \ - mv autoconf-2.69 /opt/software/autoconf && \ - cd /opt/software/autoconf && \ - ./configure && \ - make && \ - make install +# Install required system packages +sudo apt install -y build-essential cmake flex automake bison binutils-dev libiberty-dev zip libncurses5-dev curl ninja-build +sudo apt-get install -y make +sudo apt-get install -y unzip +sudo apt-get install -y python2 +sudo apt-get install -y byacc +sudo apt-get install -y automake +sudo apt-get install -y libtool +sudo apt-get install -y bzip2 +sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa +sudo apt update +sudo apt install gcc-11 g++-11 +sudo apt-get -y install autoconf autopoint + +# Install autoconf-2.69 +cd /opt/tools +wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \ + tar zxf autoconf-2.69.tar.gz && \ + mv autoconf-2.69 /opt/software/autoconf && \ + cd /opt/software/autoconf && \ + ./configure && \ + make && \ + make install ```