linux docker拡張インストールmariadb、fastdfs
2292 ワード
-コマンドの実行
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --name mariadb -d
-v /usr/local/src/mariadb/data:/var/lib/mysql
-v /usr/local/src/mariadb/conf/my.cnf:/etc/mysql/my.cnf
--restart unless-stopped docker.io/mariadb:latest
--
docker cp mariadb:/var/lib/mysql /usr/local/src/mariadb/data
docker cp mariadb:/etc/mysql/my.cnf /usr/local/src/mariadb/conf
docker exec -it mariadb /bin/bash
--
docker run -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --name mariadb -d --restart unless-stopped docker.io/mariadb:latest
chcon -Rt svirt_sandbox_file_t /mariadb
-- mysql
docker run -d -p 3306:3306 -v /usr/local/mysql/data:/var/lib/mysql -v /usr/local/mysql/conf/mysql.cnf:/etc/mysql/mysql.cnf -e MYSQL_ROOT_PASSWORD=root --name mysql57 --restart=always docker.io/mysql:5.7
docker run -d -p 3306:3306 -v /usr/local/mysql/data:/var/lib/mysql -v /usr/local/mysql/conf/:/etc/mysql/ -e MYSQL_ROOT_PASSWORD=root --name mysql57 --restart=always docker.io/mysql:5.7
docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root --name mysql57 docker.io/mysql:5.7
-- fastdfs
// tracker
docker run -ti -d --name trakcer -v ~/tracker_data:/fastdfs/tracker/data --net=host season/fastdfs tracker
// docker storage ( , )
docker run -tid --name storage -v ~/storage_data:/fastdfs/storage/data -v ~/store_path:/fastdfs/store_path --net=host -e TRACKER_SERVER:192.168.115.130:22122 -e GROUP_NAME=group1 season/fastdfs storage
docker run --add-host fastdfs.net:192.168.1.40 --name fastdfs --net=host -e TRACKER_ENABLE=1 -e NGINX_PORT=81 -v /home/fastdfs:/storage/fastdfs -it mypjb/fastdfs
// fastdfs
docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP=47.93.57.130 -e WEB_PORT=8111 -v ${HOME}/fastdfs:/var/local/fdfs --name fastdfs registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
docker run -d -p 8080:8080 --name tomcat -v /usr/local/tomcat/webapps:/usr/local/tomcat/webapps -v /usr/local/tomcat/conf:/usr/local/tomcat/conf -v /usr/local/tomcat/logs:/usr/local/tomcat/logs --restart=always tomcat
docker run -d -p 8080:8080 --name tomcat -v /usr/local/tomcat/webapps:/usr/local/tomcat/webapps -v /usr/local/tomcat/conf:/usr/local/tomcat/conf -v /usr/local/tomcat/logs:/usr/local/tomcat/logs --restart=always tomcat