1.安装centos版本为mini无ifconfig命令:
yum -y install net-tools
或者使用ip addr
2、安装jdk
a、yum search java|grep jdk b、yum install java-1.8.0-openjdk.x86_64
3、安装docker
a、https://www.runoob.com/docker/centos-docker-install.html
4、docker下载 pull很慢https://www.cnblogs.com/tianfen/p/6387220.html,curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
5、安装redis
(1) Docker search redis
(2) Docker pull redis
(3) 新建redis实例:docker run -d –name myRedis -p 6379:6379 redis
(4) 进入redis实例: docker exec -it myRedis /bin/bash
(5) 宿主机链接redis: success
6、安装rabbitmq
(1) Docker search rabbitmq
(2) Docker pull rabbitmq
(3) Docker rmi rabbitmq镜像
(4) Docker pull rabbitmq:management
(5) 新建rabbitmq实例
(6) 宿主机访问管理页面
docker run -d –name rabbitmq -p 5671:5671 -p 5672:5672 -p 4369:4369 -p 25672:25672 -p 15671:15671 -p 15672:15672 8e69b73e98c9
保存镜像
docker save 8e69b73e98c9 -o rabbitmq.tar
Docker load -i xx.tar 镜像无名称和tag
7、安装mysql
(1) mysql docker run –name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=seven -d mysql
(2) 进入mysql容器docker exec -it mysql mysql -uroot -pseven
(3) 授权:ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘seven’;
(4) #添加远程登录用户 CREATE USER ‘keyj’@’%’ IDENTIFIED WITH mysql_native_password BY ‘seven’;
GRANT ALL PRIVILEGES ON . TO ‘keyj’@’%’;
Jcmd命令无法运行:java.util.ServiceConfigurationError: com.sun.tools.attach.spi.AttachProvider: Pr
ovider sun.tools.attach.WindowsAttachProvider could not be instantiated