1.docker 安装
sudo yum update -ysudo amazon-linux-extras install dockersudo service docker start[root@localhost ~]# vi
修改ExecStart行为下面内容
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:9004 systemctl restart dockercurl http://localhost:9004/verionhttp://18.156.84.63:9004/version curl -L https://get.daocloud.io/docker/compose/releases/download/1.25.4/docker-compose-`uname -s-uname -m` > /usr/local/bin/docker-composemkdir /opt/b8cd /opt/b8/chmod +x /usr/local/bin/docker-composedocker-compose -vchmod -R 777 /opt/b8/./auto.sh deploy
2.mysql 安装
docker run -p 9000:9000 --name mysql -v $PWD/conf:/etc/mysql/conf.d -v $PWD/logs:/logs -v $PWD/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=yj1%^k3U7bn -d mysql:8.0 docker cp c0cdc95609f1:/etc/mysql/my.cnf /etc/my.cnf docker cp /etc/my.cnf c0cdc95609f1:/etc/mysql/my.cnf modify my.cnf addport=9000bind-address = 0.0.0.0 iptables -A INPUT -i eth0 -p tcp -m tcp --dport 9000 -j ACCEPT ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'yj1%^k3U7bn'; FLUSH PRIVILEGES;
3.redis安装
docker run -d --privileged=true -p 9001:6379 -v redis.conf:/etc/redis/redis.conf -v /data:/data --name redis -d redis:latest redis-server /etc/redis/redis.conf --appendonly yes --requirepass "bU0@rR0!dE7:dF0^dI0!aA1^bA1*oF" iptables -A INPUT -i eth0 -p tcp -m tcp --dport 9001 -j ACCEPT daemonize NOprotected-mode no
4.mongodb安装
grep ^NAME /etc/*release docker run -d --name mymongo -p 9002:27017 -v $PWD/db:/data/db mongo:4.4 docker exec -it 912a503e24b3 mongo admin db.createUser({ user: 'admin', pwd: 'bU0@rR0!dE7:dF0^dI0!aA1^bA1*oF', roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] }); db.auth("admin","yj1%^k3U7bn"); mongodb://admin:yj1%^k3U7bn@127.0.0.1:27017/admin yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh
文档输出部署环境设计
https://feedly.com/是一款业界公认RSS
db.createUser({ user: 'root', pwd: 'Tao%401127', roles: [ { role: "userAdminAnyDatabase", db: "test" } ] }); db.createUser({ user: 'test', pwd: 'Tao@1127', roles: [ { role: "readWrite", db: "test" } ] }); db.changeUserPassword('b8_user','jstTao58'); db.createUser({user:"b8_user",pwd:"yj1%^k3U7bn",roles:["readWrite"]}); curl http://18.156.84.63:9004/verioncurl http://localhost:9004/verion
5.项目部署
http://18.156.84.63:9010/xxl-job-admin/userb8xxljob yj1%^k3U7bncontent 9005http://18.156.84.63:9005/swa
6.nacos安装
gitsudo yum install git -y docker run -d -e PREFER_HOST_MODE=hostname -e MODE=standalone -e JVM_XMS=256m -e JVM_XMX=256m -e JVM_XMN=128m -e SPRING_DATASOURCE_PLATFORM=mysql -e MYSQL_SERVICE_HOST=18.156.84.63 -e MYSQL_SERVICE_PORT=9000 -e MYSQL_SERVICE_USER=root -e MYSQL_SERVICE_PASSWORD=yj1%^k3U7bn -e MYSQL_SERVICE_DB_NAME=nacos_config -p 9007:8848 --name nacos --restart=always nacos/nacos-serverhttp://18.156.84.63:9007/nacos/用户名:b8-nacos密码:yj1%^k3U7bn