Installing Doris on Different Operating Systems (Linux, Docker, etc.)
Install Doris in Linux Environment
1. Prepare Environment
- Install dependency packages:
sudo apt-get install build-essential cmake git libpq-dev libxml2-dev - Download Doris source code:
wget http://doris.apache.org/releases/doris-release-1.12.0/doris-1.12.0.tar.gz
2. Extract and Build Doris
- Extract source code:
tar -xvf doris-1.12.0.tar.gz - Enter the extracted directory:
cd doris-1.12.0 - Build Doris:
cmake .. && make
3. Install Doris (Based on Debian)
sudo ./bin/install-debian.sh
4. Install Doris (Based on Ubuntu)
sudo ./bin/install-ubuntu.sh
Install Doris in Docker Environment
1. Install Docker
- Install Docker:
sudo apt-get install docker.io - Start Docker:
sudo systemctl start docker - Environment variable:
export DOCKER_HOST="tcp://localhost:2375" - Pull Doris image:
docker pull apache/doris
2. Run Doris
docker run -p 8033:8033 -v /data:/doris.apache.org doris.apache.org:latest
In the command above, /data is the local data storage location, while /doris.apache.org is the Doris root directory inside the Docker container.
3. Create Doris Database
- Select a machine, create a new user, and grant all permissions to that user (optional)
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
- Create Doris database:
CREATE DATABASE mydatabase;
4. Run Doris Script
- Enter the Doris container:
docker exec -it mydoris /bin/bash - Run the Doris startup script:
./scripts/start.sh
In the command above, mydoris is the name of your Docker container, and ./scripts/start.sh is the Doris startup script.
5. Stop Doris
- Stop Doris:
docker stop mydoris
Install Doris in Windows Environment
1. Prepare Environment
- Install MinGW (gcc alternative for Windows):
https://www.gnu.org/software/mingw-w64/ - Download Doris source code:
wget http://doris.apache.org/releases/doris-release-1.12.0/doris-1.12.0.tar.gz
2. Extract and Build Doris
- Extract source code:
tar -xvf doris-1.12.0.tar.gz - Enter the extracted directory:
cd doris-1.12.0 - Build Doris (bash environment):
cmake .. && make
3. Install Doris (Windows)
install-debian.sh -w
Install Doris in Mac Environment
1. Prepare Environment
- Download Doris source code:
wget http://doris.apache.org/releases/doris-release-1.12.0/doris-1.12.0.tar.gz - Download Xcode (necessary for macOS environment):
https://developer.apple.com/xcode/
2. Extract and Build Doris
- Extract source code:
tar -xvf doris-1.12.0.tar.gz - Enter the extracted directory:
cd doris-1.12.0 - Build Doris:
cmake .. && make
3. Install Doris (macOS)
install-debian.sh -w
The Final Solution:
- On Windows, use MinGW as a gcc alternative.
- On Mac, the Xcode environment is necessary.
Final Notes:
- Ensure the local environment is well-prepared to facilitate Doris installation.