Skip to content

Commit

Permalink
docs(tianmu): update the docs of stonedb-5.7 (#489) (#492)
Browse files Browse the repository at this point in the history
* git: update .gitignore

* docs(tianmu): update the docs of  Quick Depolyment

* docs(tianmu): update the docs of  Compile Methods

* docs(tianmu): update the docs of  Performance Test

* docs(tianmu): update the docs of Performance Tuning

* docs(tianmu): update the docs of Troubleshooting

* docs(tianmu): update the docs of FAQ

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
Nliver and mergify[bot] authored Sep 14, 2022
1 parent ae8dc05 commit db81b99
Show file tree
Hide file tree
Showing 31 changed files with 482 additions and 193 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ CTestTestfile.cmake
COPYING
.vs/
node_modules
website/.docusaurus
9 changes: 9 additions & 0 deletions Docs/02-getting-started/quick-deployment/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"position": 3.1,
"label": "Quick Deployment",
"collapsible": true,
"link": {
"type": "generated-index",
"slug": "/quick-deployment"
}
}
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
---
id: quick-deployment
sidebar_position: 3.1
id: quick-deployment-56
sidebar_position: 3.11
---

# Quick Deployment
# Quick Deploy StoneDB-5.6
## 1. Download the latest package
Click [here](https://static.stoneatom.com/stonedb-ce-5.6-v1.0.0.el7.x86_64.tar.gz) to download the latest installation package of StoneDB.

## **1. Download the latest package**
Click [here](https://static.stoneatom.com/stonedb-ce-5.6-v1.0.0.el7.x86_64.tar.gz) to download the latest installation package of StoneDB.
## **2. Upload and decompress the TAR package**
:::info
To simplify deployment, the installation package provided here is pre-compiled to include all required dependencies.
:::
## 2. Upload and decompress the TAR package
```shell
cd /
tar -zxvf stonedb-ce-5.6-v1.0.0.el7.x86_64.tar.gz
```
Upload the installation package to the directory. The name of the folder extracted from the package is /**stonedb56**.
## **3. Check dependencies**
You can uload the installation package to the server. The name of the folder extracted from the package is **stonedb56**. In this topic, **/stonedb56** is used as the installation package.
## 3. Check dependencies
```bash
cd /stonedb56/install/bin
ldd mysqld
ldd mysql
```
If the command output contains keywords **not found**, some dependencies are missing and must be installed. <br />For example, `libsnappy.so.1 => not found` is returned:

- If your OS is Ubuntu, run the `sudo apt search libsnappy` command. The command output will inform you to install `libsnappy-dev`. For more details, see [Compile StoneDB on Ubuntu 20.04](../04-developer-guide/00-compiling-methods/compile-using-ubuntu2004.md).
- If your OS is RHEL or CentOS, run the `yum search all snappy` command. The command output will inform you to install **snappy-devel** and **snappy**. For more details, see [Compile StoneDB on CentOS 7](../04-developer-guide/00-compiling-methods/compile-using-centos7.md) or [Compile StoneDB on RHEL 7](../04-developer-guide/00-compiling-methods/compile-using-redhat7.md).
## **4. Start StoneDB**
- If your OS is Ubuntu, run the `sudo apt search libsnappy` command. The command output will inform you to install `libsnappy-dev`. For more details, see [Compile StoneDB on Ubuntu 20.04](../../04-developer-guide/00-compiling-methods/compile-using-ubuntu2004/compile-using-ubuntu2004-for-56.md).
- If your OS is RHEL or CentOS, run the `yum search all snappy` command. The command output will inform you to install **snappy-devel** and **snappy**. For more details, see [Compile StoneDB on CentOS 7](../../04-developer-guide/00-compiling-methods/compile-using-centos7/compile-using-centos7-for-56.md) or [Compile StoneDB on RHEL 7](../../04-developer-guide/00-compiling-methods/compile-using-redhat7/compile-using-redhat7-for-56.md).
## 4. Start StoneDB
Users can start StoneDB in two ways: manual installation and automatic installation.
### 4.1 Create an account.
### 4.1 Create an account
```bash
groupadd mysql
useradd -g mysql mysql
passwd mysql
```
### 4.2 Manually install StoneDB.
You need to manually create directories, and then initialize and start StoneDB.
### 4.2 Manually install StoneDB
You need to manually create directories, configure the parameter file, and then initialize and start StoneDB.
```shell
### Create directories
mkdir -p /stonedb56/install/data/innodb
Expand All @@ -58,16 +61,19 @@ chown -R mysql:mysql /stonedb56/install/stonedb.cnf
### Start StoneDB
/stonedb56/install/bin/mysqld_safe --defaults-file=/stonedb56/install/stonedb.cnf --user=mysql &
```
### 4.3 Automatically install StoneDB.
### 4.3 Automatically install StoneDB
The process of executing the **reinstall.sh** script is to initialize and start the StoneDB.
```bash
cd /stonedb56/install
./reinstall.sh
```
The process of executing the script is to initialize and start the StoneDB.<br />Differences between **reinstall.sh** and **install.sh**:
:::info
Differences between **reinstall.sh** and **install.sh**:

- **reinstall.sh** is the script for automatic installation. When the script is being executed, directories are created, and StoneDB is initialized and started. Therefore, do not execute the script unless for the initial startup of StoneDB. Otherwise, all directories will be deleted and StoneDB will be initialized again.
- **install.sh** is the script for manual installation. You can specify the installation directories based on your needs and then execute the script. Same as **reinstall.sh**, when the script is being executed, directories are created, and StoneDB is initialized and started. Therefore, do not execute the script unless for the initial startup. Otherwise, all directories will be deleted and StoneDB will be initialized again.
## **5. Log in to StoneDB**
- **install.sh** is the script for manual installation. You can specify the installation directories based on your needs and then execute the script. Same as reinstall.sh, when the script is being executed, directories are created, and StoneDB is initialized and started. Therefore, do not execute the script unless for the initial startup. Otherwise, all directories will be deleted and StoneDB will be initialized again.
:::
## 5. Log in to StoneDB
```shell
/stonedb56/install/bin/mysql -uroot -p -S /stonedb56/install/tmp/mysql.sock
Enter password:
Expand All @@ -94,7 +100,7 @@ mysql> show databases;
+--------------------+
7 rows in set (0.00 sec)
```
## **6. Stop StoneDB**
## 6. Stop StoneDB
```shell
/stonedb56/install/bin/mysqladmin -uroot -p -S /stonedb56/install/tmp/mysql.sock shutdown
```
101 changes: 101 additions & 0 deletions Docs/02-getting-started/quick-deployment/quick-deployment-57.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
id: quick-deployment-57
sidebar_position: 3.12
---

# Quick Deploy StoneDB-5.7
## 1. Download the installation package
Click [here](https://static.stoneatom.com/custom/stonedb-ce-5.7-v1.0.0.el7.x86_64.tar.gz) to download the latest installation package of StoneDB.
:::info
To simplify deployment, the installation package provided here is pre-compiled to include all required dependencies.
:::
## 2. Upload and decompress the TAR package
```shell
cd /
tar -zxvf stonedb-ce-5.7-v1.0.0.el7.x86_64.tar.gz
```
You can upload the installation package to the server. The name of the folder extracted from the package is **stonedb56**. In this topic, **/stonedb56** is used as the installation package.
## 3. Check dependencies
```shell
cd /stonedb57/install/bin
ldd mysqld
ldd mysql
```
If the command output contains keywords **not found**, some dependencies are missing and must be installed. <br />For example, `libsnappy.so.1 => not found` is returned:

- If your OS is Ubuntu, run the `sudo apt search libsnappy` command. The command output will inform you to install `libsnappy-dev`. For more details, see [Compile StoneDB on Ubuntu 20.04](../../04-developer-guide/00-compiling-methods/compile-using-ubuntu2004/compile-using-ubuntu2004-for-57.md).
- If your OS is RHEL or CentOS, run the `yum search all snappy` command. The command output will inform you to install **snappy-devel** and **snappy**. For more details, see [Compile StoneDB on CentOS 7](../../04-developer-guide/00-compiling-methods/compile-using-centos7/compile-using-centos7-for-57.md) or [Compile StoneDB on RHEL 7](../../04-developer-guide/00-compiling-methods/compile-using-redhat7/compile-using-redhat7-for-57.md).
## 4. Start StoneDB
Users can start StoneDB in two ways: manual installation and automatic installation.
### 4.1 Create an account
```shell
groupadd mysql
useradd -g mysql mysql
passwd mysql
```
### 4.2 Manually install StoneDB
You need to manually create directories, configure the parameter file, and then initialize and start StoneDB.
```shell
### Create directories.
mkdir -p /stonedb57/install/data
mkdir -p /stonedb57/install/binlog
mkdir -p /stonedb57/install/log
mkdir -p /stonedb57/install/tmp
mkdir -p /stonedb57/install/redolog
mkdir -p /stonedb57/install/undolog
chown -R mysql:mysql /stonedb57

### Configure my.cnf.
mv my.cnf my.cnf.bak
vim /stonedb57/install/my.cnf
[mysqld]
port = 3306
socket = /stonedb57/install/tmp/mysql.sock
basedir = /stonedb57/install
datadir = /stonedb57/install/data
pid_file = /stonedb57/install/data/mysqld.pid
log_error = /stonedb57/install/log/mysqld.log
innodb_log_group_home_dir = /stonedb57/install/redolog/
innodb_undo_directory = /stonedb57/install/undolog/

chown -R mysql:mysql /stonedb57/install/my.cnf

### Initialize StoneDB.
/stonedb57/install/bin/mysqld --defaults-file=/stonedb57/install/my.cnf --initialize --user=mysql

### Start StoneDB.
/stonedb57/install/bin/mysqld_safe --defaults-file=/stonedb57/install/my.cnf --user=mysql &
```
### 4.3 Automatically install StoneDB
The process of executing the **reinstall.sh** script is to initialize and start the StoneDB.
```shell
cd /stonedb57/install
./reinstall.sh
```
:::info
Differences between **reinstall.sh** and **install.sh**:

- **reinstall.sh** is the script for automatic installation. When the script is being executed, directories are created, and StoneDB is initialized and started. Therefore, do not execute the script unless for the initial startup of StoneDB. Otherwise, all directories will be deleted and StoneDB will be initialized again.
- **install.sh** is the script for manual installation. You can specify the installation directories based on your needs and then execute the script. Same as reinstall.sh, when the script is being executed, directories are created, and StoneDB is initialized and started. Therefore, do not execute the script unless for the initial startup. Otherwise, all directories will be deleted and StoneDB will be initialized again.
:::

### 5. Log in to StoneDB
```shell
cat /stonedb57/install/log/mysqld.log |grep passwd
[Note] A temporary password is generated for root@localhost: ceMuEuj6l4+!

/stonedb57/install/bin/mysql -uroot -p -S /stonedb57/install/tmp/mysql.sock
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.36-StoneDB-debug-log build-

Copyright (c) 2021, 2022 StoneAtom Group Holding Limited
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> alter user 'root'@'localhost' identified by 'stonedb123';
```
## 6. Stop StoneDB
```shell
/stonedb57/install/bin/mysqladmin -uroot -p -S /stonedb57/install/tmp/mysql.sock shutdown
```
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ sidebar_position: 5.11

The method to compile StoneDB varies with the environment. Choose the compiling method that suits your environment.

- [Compile StoneDB on CentOS 7](compile-using-centos7.md)
- [Compile StoneDB on RHEL 7](compile-using-redhat7.md)
- [Compile StoneDB on Ubuntu 20.04](compile-using-ubuntu2004.md)
- [Compile StoneDB Using a Docker Container](compile-using-docker.md)
- [Compile StoneDB on CentOS 7](./compile-using-centos7/compile-using-centos7-for-57.md)
- [Compile StoneDB on RHEL 7](./compile-using-redhat7/compile-using-redhat7-for-57.md)
- [Compile StoneDB on Ubuntu 20.04](./compile-using-ubuntu2004/compile-using-ubuntu2004-for-57.md)
- [Compile StoneDB Using a Docker Container](./compile-using-docker.md)



Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"position": 5.12,
"label": "Compile StoneDB on CentOS7.x",
"collapsible": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: compile-using-centos7-foe-56
sidebar_position: 5.121
sidebar_position: 5.122
---

# Compile StoneDB for MySQL5.6 on CentOS 7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: compile-using-centos7-for-57
sidebar_position: 5.122
sidebar_position: 5.121
---

# Compile StoneDB for MySQL5.7 on CentOS 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ After the `make` commands are successful, you can choose either to compress the
[root@06f1f385d3b3 build]# tar -zcPvf /home/stonedb56.tar.gz /stonedb56/
```
### Directly use StoneDB in the container
You can refer to [Quick Deployment](.../../../../02-getting-started/quick-deployment.md) or the following code to deploy and use StoneDB in the container.
You can refer to [Quick Deployment](.../../../../02-getting-started/quick-deployment) or the following code to deploy and use StoneDB in the container.
```bash
[root@06f1f385d3b3 build]# cd /stonedb56/install/

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"position": 5.13,
"label": "Compile StoneDB on RedHat7.x",
"collapsible": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: compile-using-redhat7-for-56
sidebar_position: 5.131
sidebar_position: 5.132
---

# Compile StoneDB for MySQL5.6 on RHEL 7
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: compile-using-redhat7-for-57
sidebar_position: 5.132
sidebar_position: 5.131
---

# Compile StoneDB for MySQL5.7 on RHEL 7
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"position": 5.14,
"label": "Compile StoneDB on Ubuntu20.04",
"collapsible": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: compile-using-ubuntu20.04-for-56
sidebar_position: 5.141
sidebar_position: 5.142
---

# Compile StoneDB for MySQL5.6 on Ubuntu 20.04
Expand Down Expand Up @@ -100,7 +100,7 @@ autoreconf -i
sudo make && make install
```
The installation directory of marisa in the example is** /usr/local/stonedb-marisa**. You can change it based on your actual conditions. In this step, the following directories and files are generated in **/usr/local/stonedb-marisa/lib**.
![](./5.6-marisa.png)
![](../5.6-marisa.png)

1. Install RocksDB.
```shell
Expand Down Expand Up @@ -129,7 +129,7 @@ sudo make install -j`nproc`
```
The installation directory of RocksDB in the example is **/usr/local/stonedb-gcc-rocksdb**. You can change it based on your actual conditions. In this step, the following directories and files are generated in **/usr/local/stonedb-gcc-rocksdb**.

![](./5.6-rocksdb.png)
![](../5.6-rocksdb.png)

1. Install Boost.
```shell
Expand All @@ -141,7 +141,7 @@ cd boost_1_66_0
```
The installation directory of Boost in the example is **/usr/local/stonedb-boost**. You can change it based on your actual conditions. In this step, the following directories and files are generated in **/usr/local/stonedb-boost/lib**.

![image.png](./5.6-boost.png)
![image.png](../5.6-boost.png)

:::info
During the compilation, the occurrences of keywords **warning** and** failed** are normal, unless **error** is displayed and the CLI is automatically closed.<br />It takes about 25 minutes to install Boost.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: compile-using-ubuntu20.04-for-57
sidebar_position: 5.142
sidebar_position: 5.141
---

# Compile StoneDB for MySQL5.7 on Ubuntu 20.04
Expand Down Expand Up @@ -103,7 +103,7 @@ sudo make && make install
```
The installation directory of marisa in the example is** /usr/local/stonedb-marisa**. You can change it based on your actual conditions. In this step, the following directories and files are generated in **/usr/local/stonedb-marisa/lib**.

![](./5.7-marisa.png)
![](../5.7-marisa.png)

1. Install RocksDB.
```shell
Expand Down Expand Up @@ -132,7 +132,7 @@ sudo make install -j`nproc`
```
The installation directory of RocksDB in the example is **/usr/local/stonedb-gcc-rocksdb**. You can change it based on your actual conditions. In this step, the following directories and files are generated in **/usr/local/stonedb-gcc-rocksdb**

![](./5.7-rocksdb.png)
![](../5.7-rocksdb.png)

1. Install Boost.
```shell
Expand All @@ -144,7 +144,7 @@ cd boost_1_66_0
```
The installation directory of Boost in the example is **/usr/local/stonedb-boost**. You can change it based on your actual conditions. In this step, the following directories and files are generated in **/usr/local/stonedb-boost/lib**.

![image.png](./5.7-boost.png)
![image.png](../5.7-boost.png)

:::info
During the compilation, the occurrences of keywords **warning** and** failed** are normal, unless **error** is displayed and the CLI is automatically closed.<br />It takes about 25 minutes to install Boost.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build information as follow:
```
## **Test scheme**
### **1. Set up the test environment**
For information about how to set up the test environment, see [Quick Deployment](..../../../../../02-getting-started/quick-deployment.md).
For information about how to set up the test environment, see [Quick Deployment](..../../../../../02-getting-started/quick-deployment).
### 2. Compile and deploy TPC-H

1. Download the [TPC-H](https://www.tpc.org/tpc_documents_current_versions/current_specifications5.asp) installation package, upload the package to the test machine.
Expand Down
Loading

0 comments on commit db81b99

Please sign in to comment.