发布时间:2024-11-06 16:01
cat > /srv/mysql/my.cnf <
docker run \
--name mysql8 \
-p 3306:3306 \
-v /srv/mysql/data:/var/lib/mysql \
-v /srv/mysql/log:/var/log/mysql \
-v /srv/mysql/my.cnf:/etc/mysql/my.cnf:rw \
-e MYSQL_ROOT_PASSWORD=$PassWord \
--restart=always \
-d mysql:8.0.16
cat > /srv/redis/redis.conf <
docker run -p 6379:6379 --name redis \
-v /srv/redis/redis.conf:/etc/redis/redis.conf \
--restart=always \
-d redis redis-server /etc/redis/redis.conf
apt-get install mysql-client
apt-get install redis-tools