win10开启
解决win10 家庭中文版无hyper问题
任意位置新建后缀为.cmd 文件,以管理员身份运行。
pushd "%~dp0"
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
docker 启动错误
# System.InvalidOperationException: Failed to set version to docker-desktop: exit code: -1
# 管理员执行
netsh winsock reset
下载 wsl
wsl --install -d Ubuntu-16.04
username:wzd
pwd:1234
wsl --set-default-version 2
更新wsl2
设置Docker Engine
{
"registry-mirrors": ["https://o84aycoc.mirror.aliyuncs.com"]
}
运行cmd
docker run hello-world
mariadb
docker run --name mariadb --privileged -d -e TIMEZONE=Asis/Shanghai -e MYSQL_ROOT_PASSWORD=root -p 3310:3306 mariadb
docker run -v F:\docker:/var/lib/mysql --name mariadb -p 3310:3306 -e MYSQL_ROOT_PASSWORD=root -d mariadb
grafana
docker pull grafana/grafana
docker run --user root -d -p 3000:3000 --name=grafana -v E:\docker\grafana:/var/lib/grafana grafana/grafana
redis
docker run -p 6379:6379 --name redis -v E:\docker\redis\redis.conf:/etc/redis/redis.conf -v E:\docker\redis\data:/data -d redis redis-server /etc/redis/redis.conf --appendonly yes
redis-server /etc/redis/redis.conf:这个是关键配置,让redis不是无配置启动,而是按照这个redis.conf的配置启动
–appendonly yes:redis启动后数据持久化
prometheus
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
static_configs:
- targets: ['localhost:9090']
docker run -itd -p 9090:9090 -v E:\docker\prometheus\prometheus.yml:/etc/prometheus/prometheus.yml --name prometheus prom/prometheus
cAdvisor
docker run -itd --name cadvisor -p 9001:8080 -v E:\docker\cAdvisor:/rootfs:ro -v E:\docker\prometheus\run:/var/run:rw -v E:\docker\prometheus\sys:/sys:ro -v E:\docker\prometheus\lib\docker:/var/lib/docker:ro -v E:\docker\prometheus\disk:/dev/disk:ro google/cadvisor
node-exporter
docker run -d -p 9100:9100 -v "E:\docker\proc:/host/proc:ro" -v "E:\docker\sys:/host/sys:ro" -v "E:\docker:/rootfs:ro" --net="host" prom/node-exporter
运行ry
mysql -P3310 -h127.0.0.1 -uroot -p
create database ry;
use ry;
source E:\IdeaProject\RuoYi\sql\ry_20210924.sql
source E:\IdeaProject\RuoYi\sql\quartz.sql
npm install
npm run dev