MySQL 安装使用
安装 $ sudo apt install mysql-server 使用 为 root 用户设置密码 $ sudo mysql mysql> SELECT user,authentication_string,plugin,host FROM mysql.user; mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456'; mysql> FLUSH PRIVILEGES; mysql> SELECT user,authentication_string,plugin,host FROM mysql.user; mysql> exit 创建用户 $ mysql -u root -p mysql> CREATE USER 'admin'@'localhost' IDENTIFIED BY '123456';
RBD 卷性能统计
性能查询请求类似如下 SQL 查询语句: select ops, bytes, latency ... from osds where pool_id=<> osd_id=<> object_name=<> ... order by <> limit <max> 内部实现 OSD 负责遍历承载在自己之上的 PG,收集 PG 记录的统
Cinder 云盘创建与挂载流程
Cinder 的设计遵循 service -> manager -> driver 的三层架构。 主要包括 cinder-api, cinder-scheduler, cinder-volume 三大核心组件(进程),组件之间通过 RPC 进行通信。 RESTful 入口 cinder-api # etc/nova/api-paste.ini [app:apiv3] paste.app_factory = cinder.api.v3.router:APIRouter.factory # cinder/api/openstack/__init__py class
Nova 虚机创建及云盘挂载流程
Nova 的设计遵循 service -> manager -> driver 的三层架构。 主要包括 nova-api, nova-conductor, nova-scheduler, nova-compute 四大核心组件(进程),组件之间通过 RPC 进行通信。 RESTful 入口 nova-api # etc/nova/api-paste.ini [app:osapi_compute_app_v21] paste.app_factory = nova.api.openstack.compute:APIRouterV21.factory # nova/api/openstack/compute/routes.py
Mr.2 + gost 实现代理转发
目的 服务器流量转发至办公机实现外网连接。 工具 Mr.2 - Expose local server to external network https://github.com/txthinking/mr2 gost - GO Simple Tunnel - a simple tunnel written in golang https://github.com/ginuerzh/gost 这两个工具的开发语言都是 Gola
OpenLDAP 基础使用
OpenLDAP 本质上是一个数据库,而它的使用也与 SQL 数据库类似,包括两部分,一是 OpenLDAP 自身的配置,一是用户数据的增删改查。 上一篇文章提到,
OpenLDAP 安装
OpenLDAP 是 LDAP 的开源实现,服务端工具集的名字以 slap (stand-alone LDAP) 为前缀,客户端工具集的名字以 ldap 为前缀。 从 2.4 版本开始,slapd 的配置使用 LDIF 格
deb 打包
修改原生 deb 包并重新打包 以构建 wget 为例。 安装构建 wget 所需的依赖: ~$ sudo apt build-dep wget Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done ... The following NEW packages will be installed: libidn11-dev libtext-unidecode-perl tex-common
deb 基本操作
apt deb 包缓存: ~$ ls /var/cache/apt/archives/ libradosstriper1_12.2.11-0ubuntu0.18.04.1_amd64.deb lock partial python-rbd_12.2.11-0ubuntu0.18.04.1_amd64.deb dpkg-deb 查看 deb 包信息(rpm 包的话需要几个不同的选项组合才能查到所有的这些信息): ~$ dpkg-deb -I libradosstriper1_12.2.11-0ubuntu0.18.04.1_amd64.deb new Debian package, version 2.0.
CherryPy 请求处理流程
后端应用使用 Tree 实例的 mount 方法将用户对象封装成一个 Application 实例挂载到路由处理链上: # cherrypy/__init__.py tree = _cptree.Tree() cherrypy/_cptree.py class Tree(object): apps = {} def __init__(self): self.apps = {} def mount(self, root, script_name="", config=None): # Next line