Skip to content
Browse files
[fix] Fix blog image link
  • Loading branch information
morningman-cmy committed Dec 26, 2021
1 parent cc64855 commit 7bea1dd987da2a15ae13aee36164d29252483db5
Showing 2 changed files with 76 additions and 76 deletions.
@@ -31,8 +31,6 @@ specific language governing permissions and limitations
under the License.

# Apache Doris Docker Compilation Installation and Deployment Tutorial (Win|Mac|Linux) - Compilation

This tutorial is intended for students who know little or nothing about Docker containerization technology, but want to try to deploy the hottest MPP-OLAP database Apache Doris for fun, or companies with new technical architecture needs, want to deploy a test environment for testing performance, simple build partners, the full text to try to use concise vernacular to enhance readability.

The tutorial starts with questions such as "What system can you compile with?", "How to configure the deployed cluster", "What is Docker", "Installing Docker and basic operations", and finally "How to compile Doris", "Doris quick deployment", etc. The full text is several thousand words, with a practical time of about 3-5 hours.
@@ -45,6 +43,8 @@ This tutorial will be divided into two parts, which have been tested on three pl

Translated with (free version)


## 1 Deployment process

*** This is the "Compilation" section, only for compilation. Deployment will be done by the "Deploy" section***
@@ -119,7 +119,7 @@ Docker version: 20.10.11

3. Download and install Docker Tools, after the initialization of Docker Tools, the color block of Docker Logo in the lower left corner turns green, which means the initialization is successful.


4. There will be a code block in the Contalners/Apps Tab that says

@@ -163,43 +163,43 @@ Because it is very tedious, will increase a lot of work, and there are many no c

1. Create a new virtual machine


2. Select Advanced


3. Select -Install Later when installing system sources


4. Select Linux-CentOS 7 64-bit when choosing a system


5. choose a larger processor, preferably more than 4 total cores (the number of cores determines the compilation speed)


6. slightly more memory too, more than 4G-8G

! [](images/blogs/doris-tutorial-compilation/image-20211221195624113.png)
! [](/images/blogs/doris-tutorial-compilation/image-20211221195624113.png)

7. Select NAT network mode


8. Capacity is optional, 50GB or more is fine


9. Once created, select Edit Virtual Machine Settings


10. Set the system ISO mapping file


11. Start the virtual machine and install the system

@@ -209,37 +209,37 @@ First you need to configure the virtual network on the VM

1. Click `Edit Menu`, click `Virtual Network Editor`


2. Click Change Settings


3. Check the box as shown, then set the subnet IP address segment, the fourth segment is 0


4. Then click on NAT settings and modify the gateway IP. Note that both the gateway IP and the virtual machine IP should match the criteria of the subnet IP address segment, that is, the other IP address settings, the first three segments should be consistent with the subnet IP


5. All OK and apply

6. open the `Network and Internet` of your host computer (this computer)


7. Right-click to edit the `VMnet8` network card and open the properties


8. Select the IPv4 protocol and click Properties


9. Modify the items inside


Note that

@@ -257,7 +257,7 @@ After installing the virtual machine, log into the system and do the following t
vi /etc/sysconfig/network-scripts/ifcfg-ens33 #The last one is your network card name, change it according to your personal situation


Keep and add the following entries.

@@ -280,7 +280,7 @@ After installing the virtual machine, log into the system and do the following t
service network restart


Then ping the gateway, the host IP and the external network respectively

@@ -444,7 +444,7 @@ In the previous step, we have successfully deployed the Docker component on `Cen
docker pull apache/incubator-doris:build-env-for-0.15.0 #This is version 0.15.0


- After a successful pull, check the list of mirrors to see if they were successfully pulled

@@ -454,7 +454,7 @@ docker images

- If there is a red image circled below, the image is downloaded successfully


- If the pull is successful, run the run command and enter the Docker image

@@ -482,15 +482,15 @@ docker run --name apache-doris-0.15.0 -it -v /root/.m2:/root/.m2 -v /opt/doris:/

If the following command header appears after execution, the mirror has been successfully entered


#### 4.1.2 Specifying the JDK version (on-demand)

After completing pulling and entering the image, this next step is quite important, **this step is about the JDK version you will subsequently use**.

In the official compiled environment image we pull down, we are actually given two sets of JDKs to choose from, one for JDK8 and one for JDK11, the default is JDK11, so we modify it as needed.


If you want to use JDK8 for your subsequent work, please execute the following code in order to change the JDK version

@@ -501,7 +501,7 @@ alternatives --set javac java-1.8.0-openjdk.x86_64
export JAVA_HOME=/usr/lib/jvm/java-1.8.0


If you want to use JDK11 in the future, then either you should not perform any operation in the first place, because the default is JDK11. If you perform the above command to switch to JDK8 and want to cut back, then use the following command to switch to JDK11

@@ -512,7 +512,7 @@ alternatives --set javac java-11-openjdk.x86_64
export JAVA_HOME=/usr/lib/jvm/java-11


#### 4.1.3 Compiling Doris

@@ -554,7 +554,7 @@ sh

If the Docker version of the pulled Doris build environment is `build-env-1.4.2` or `build-env-for-0.15.0` (the version can be checked with the `docker images` command under CentOS as described in section `4.1.1`)


This is because the 1.4.2 image has been upgraded to ``thrift(0.9 -> 0.13)`, and you need to force the new version of ``thrift` to generate the code file with the --clean command, otherwise incompatible code will appear.
@@ -564,17 +564,17 @@ sh --clean --be --fe --ui -j2

Next, you can go do other things, the tutorial test machine is using `2C 4G 8M` to compile, taking **two hours**, during the period if you find the following chart, and run super slow, is normal, the node do not continue to carry out other actions, just wait for the completion, so as not to occur inexplicable errors.


The following message will prove that the compilation was successful


##### Occasional error

The compilation ended up with Failed, which means that the compilation failed with the error message


where the main description is: `ninja: build stopped: subcommand failed.`

@@ -594,7 +594,7 @@ If you still get the error, you need to reset the server system and start the co

After successful compilation, the `output` folder will be created in the `apache-doris-0.15.0-incubating-src` directory (or the current directory if nothing else is done)


Execute the view directory command to see the contents of this folder

@@ -606,15 +606,15 @@ The following folders need to be in the directory for the compilation to be succ

- Linux cloud server.


- Win platform


- MacOS platform


At this point, all compilation steps are complete and successful~

@@ -628,7 +628,7 @@ docker cp container name: the path of the file to be copied inside the container

Note that the container name here is the name of the currently running Docker container after executing the ``docker ps`` command **on the host**


# For example

0 comments on commit 7bea1dd

Please sign in to comment.