k8s操作手册 2.3
spec: capacity: #此PV的容量 storage: 10Gi volumeMode: Filesystem #卷模型,指定此卷是文件系统还是裸格式的块 设备,默认为文件系统 accessModes: #访问模式 - ReadWriteMany spec: capacity: #此PV的容量 storage: 10Gi volumeMode: Filesystem #卷模型,指定此卷是文件系统还是裸格式的块 设备,默认为文件系统 accessModes: #访问模式 - ReadWriteMany com -- username=admin --password=xx ★第15章、prometheus监控系统 ★Prometheus简介 Prometheus是一款基于时序数据库的开源监控告警系统,Prometheus的基本原 理是通过HTTP协议周期性抓取被监控组件的状态,任意组件只要提供对应的 HTTP接口就可以接入监控。不需要任何SDK或者其他的集成过程。这样做非常0 码力 | 126 页 | 4.33 MB | 1 年前3python3学习手册
★sqlite3模块 import sqlite3 sqlite_conn = sqlite3.connect('test.db') # 连接数据库文件, 若文件不存在则新建 # 数据库所有数据存储在此文件中,默认数据库名称同文件名(不含.db后 缀) sqlite_cursor = sqlite_conn.cursor() # 创建一个游标,用于执 行sql语句 # 查询是否有名为'tb_test'的表 (id,name,age) values ('uuidxxxxxx','cof-lee',18)") except Exception as e: print(type(e)) # 若在数据库中定义了唯一性约束,当试图插入一 个重复的值时,会触发"sqlite3.IntegrityError"错误 print(e) exit() sqlite_cursor.execute("insert sqlite_conn.commit() # 保存 sqlite_conn.close() # 关闭连接 sqlite_conn2 = sqlite3.connect('test.db') # 连接数据库(此 时数据库文件已存在) sqlite_cursor2 = sqlite_conn2.cursor() # 创建一个游标,用于 执行sql语句 sqlite_cursor2.execute("select0 码力 | 213 页 | 3.53 MB | 1 年前3postgresql操作手册
systemctl enable postgresql-13 # systemctl start postgresql-13 ★第2章、设置数据存储路径 PostgreSQL 初始化数据库之后, 10版本的默认的数据目录是/var/lib/pgsql/ 13版本的默认的数据目录是/var/lib/pgsql/13/ 现在想修改为/data_pg/ 目录 ★PG-13版本 # systemctl #提示符 => 表示普通账号,=#表示管理员账号 postgres=# #提示符=>前的postgres表示当前数据库名 # psql -h x.x.x.x -p 5432 -U cof -d db_test #使用cof用户登录pg,连接 db_test这个库 db_test=> #提示符=>前的db_test表示当前数据库名 用户信息保存在postgres库下面的名为pg_catalg的schema下的pg_user表里: ★第5章、使用客户端连接 ①命令行客户端连接pg数据库 # psql -h 10.99.1.122 -p 5432 -U postgres #连接pg数据库, # -h指定地址,-p指定端口号,-U指0 码力 | 17 页 | 445.84 KB | 1 年前3
共 3 条
- 1