Files
im/admin/readme.md
T
2025-11-07 09:56:20 +08:00

75 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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`;
```