更新软件包管理器 yum
yum update
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
安装 Docker
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce-20.10.6 docker-ce-cli-20.10.6 containerd.io
vi /etc/docker/daemon.json
{
"registry-mirrors" :[ "https://hub-mirror.c.163.com/" ]
}
systemctl daemon-reload
sudo systemctl start docker
sudo systemctl enable docker
安装 Redis
docker pull redis
docker run -d --name redis -p 6379:6379 --restart= always -v /data/redis:/data redis --appendonly yes --requirepass "password"
安装 MySQL
docker pull mysql
docker run --name mysql -d --restart always -p 3306:3306 -e TZ= Asis/Shanghai -e MYSQL_ROOT_PASSWORD= root -v /data/:/var/lib/mysql mysql
mysql -u root -p
use mysql;
select user, host, plugin from user;
ALTER USER 'root' @'%' IDENTIFIED WITH mysql_native_password BY ‘root’;
安装 RabbitMQ
docker pull rabbitmq:management
docker run -d --hostname my-rabbit --name rabbit -e RABBITMQ_DEFAULT_USER= user -e RABBITMQ_DEFAULT_PASS= password -p 15672:15672 -p 5672:5672 rabbitmq:management
docker run -d --hostname my-rabbit --name rabbit -p 15672:15672 -p 5672:5672 rabbitmq:management
http://localhost:15672/
安装 ES
docker pull elasticsearch:7.4.2
docker run -d --name es -p 9200:9200 -p 9300:9300 -e ES_JAVA_OPTS= "-Xms512m -Xmx512m" -e "discovery.type=single-node" elasticsearch:7.4.2
安装 MongoDB
docker pull mongo:latest
docker run -itd --name mongo -p 27017:27017 mongo --auth
docker exec -it mongo mongo admin
db.createUser( { user:'admin' ,pwd:'123456' ,roles:[ { role:'userAdminAnyDatabase' , db: 'admin' } ,"readWriteAnyDatabase" ] } ) ;
db.auth( 'admin' , '123456' )
安装 Nacos
docker pull nacos/nacos-server
docker run -d --name nacos -p 8848:8848 --env MODE= standalone nacos/nacos-server
安装 HBase
docker pull harisekhon/hbase
docker run -d -h myhbase -p 2181:2181 -p 8080:8080 -p 8085:8085 -p 9090:9090 -p 9095:9095
-p 16000:16000 -p 16010:16010 -p 16201:16201 -p 16301:16301 --name hbase harisekhon/hbase
http://localhost:16010/master-status