# mongo安装

```
mkdir /www/dc
mkdir /www/dc/mongo
mkdir /www/dc/mongo/configdb
mkdir /www/dc/mongo/data
mkdir /www/dc/mysql
mkdir /www/dc/mysql/conf
mkdir /www/dc/redis
mkdir /www/dc/redis/data
touch /www/dc/redis/redis.conf
echo "appendonly yes
requirepass "n1e5a6s6m7"
appendfilename "appendonly.aof"
">>/www/dc/redis/redis.conf

docker run -d --name redis \
    --restart unless-stopped \
    -p 6379:6379\
    -v /www/dc/redis/data:/data\
    -v /www/dc/redis/redis.conf:/etc/redis/redis.conf \
    redis:8.2.1 \
    redis-server /etc/redis/redis.conf
````

```
docker run --name=mongo \
    --volume /www/dc/mongo/configdb:/data/configdb \
    --volume /www/dc/mongo/data:/data/db \
    --env=GLIBC_TUNABLES=glibc.pthread.rseq \
    --env=MONGO_INITDB_ROOT_USERNAME=commie \
    --env=MONGO_INITDB_ROOT_PASSWORD=n1e5a6s6m7 \
    --network=bridge \
    -p 27017:27017 \
    --runtime=runc \
    --detach=true \
    mongo:8.0.9 \
    mongod --auth
```

# redis

```
docker run -d --name redis \
    --restart unless-stopped \
    -p 6379:6379 \
    -v /www/dc/redis/data:/data \
    -v /www/dc/redis/redis.conf:/etc/redis/redis.conf \
    redis:8.2.1 \
    --requirepass "n1e5a6s6m7" \
    redis-server /etc/redis/redis.conf \
    –appendonly yes
```

# mysql

```
docker run -p 3306:3306 \
    --name mysql \
    -v /www/dc/mysql/conf:/etc/mysql/conf.d \
    -e MYSQL_ROOT_PASSWORD=n1e5a6s6m7 \
    -d mysql:8.0
```

# remark

```
/www/server/mysql/bin/mysql -u root -p questionnaire;
7b0fa3686a4f0adf
SELECT * FROM information_schema.`INNODB_TRX`;
```


