首页 文章 精选 留言 我的

精选列表

搜索[流程管理],共10000篇文章
优秀的个人博客,低调大师

openstack 命令行管理十四 - 路由管理 (备忘)

 帮助 [root@station140 ~(network_admin)]# neutron help | grep route l3-agent-list-hosting-router List L3 agents hosting a router. l3-agent-router-add Add a router to a L3 agent. l3-agent-router-remove Remove a router from a L3 agent. net-gateway-connect Add an internal network interface to a router. router-create Create a router for a given tenant. router-delete Delete a given router. router-gateway-clear Remove an external network gateway from a router. router-gateway-set Set the external network gateway for a router. router-interface-add Add an internal network interface to a router. router-interface-delete Remove an internal network interface from a router. router-list List routers that belong to a given tenant. router-list-on-l3-agent List the routers on a L3 agent. router-port-list List ports that belong to a given tenant, with specified router. router-show Show information of a given router. router-update Update router's information. 查询 tenant [root@station140 ~(network_admin)]# keystone tenant-list +----------------------------------+----------+---------+ | id | name | enabled | +----------------------------------+----------+---------+ | 9467f30b8bba4770a06a687e4584636b | cloud | True | +----------------------------------+----------+---------+ 创建路由连接到外部网络, 这个路由可以与内部网络进行连接 你可以创建过程中指定一个 tenant, 利用参数 --tenant-id 9467f30b8bba4770a06a687e4584636b 进行定义 创建路由 neutron router-create ext-to-int --tenant-id 9467f30b8bba4770a06a687e4584636b Created a new router: +-----------------------+--------------------------------------+ | Field | Value | +-----------------------+--------------------------------------+ | admin_state_up | True | | external_gateway_info | | | id | b83f43cd-bf8f-42f8-812a-708c2c372820 | | name | ext-to-int | | status | ACTIVE | | tenant_id | 9467f30b8bba4770a06a687e4584636b | +-----------------------+--------------------------------------+ 查询方法 [root@station140 ~(keystone_admin)]# neutron router-list | grep -v router1 +--------------------------------------+------------+------------------------+ | id | name | external_gateway_info | +--------------------------------------+------------+------------------------+ | b83f43cd-bf8f-42f8-812a-708c2c372820 | ext-to-int | null | +--------------------------------------+------------+------------------------+ 查询外部网络 [root@station140 ~(keystone_admin)]# neutron net-list | grep pub1 +--------------------------------------+---------+------------------------------------------------------+ | id | name | subnets | +--------------------------------------+---------+------------------------------------------------------+ | aebe75f0-6013-4a5e-bbd9-cb81e1f017bc | pub1 | 59cc431b-498e-49a0-bc60-4a8ca1ca6f48 192.168.48.0/24 | +--------------------------------------+---------+------------------------------------------------------+ 连接路由到外部网络, 设定外部网络网关 # neutron router-gateway-set b83f43cd-bf8f-42f8-812a-708c2c372820 aebe75f0-6013-4a5e-bbd9-cb81e1f017bc [root@station140 ~(keystone_admin)]# neutron router-list | grep -v router1 +--------------------------------------+------------+-----------------------------------------------------------------------------+ | id | name | external_gateway_info | +--------------------------------------+------------+-----------------------------------------------------------------------------+ | b83f43cd-bf8f-42f8-812a-708c2c372820 | ext-to-int | {"network_id": "aebe75f0-6013-4a5e-bbd9-cb81e1f017bc", "enable_snat": true} | +--------------------------------------+------------+-----------------------------------------------------------------------------+ 列出子网信息 [root@station140 ~(keystone_admin)]# neutron subnet-list | grep terry +--------------------------------------+----------------+-----------------+------------------------------------------------------+ | id | name | cidr | allocation_pools | +--------------------------------------+----------------+-----------------+------------------------------------------------------+ | 3066c397-bccf-4473-8a94-72b09a97a70a | terry_pri_net1 | 10.0.0.0/8 | {"start": "10.0.0.50", "end": "10.0.0.100"} | | 59cc431b-498e-49a0-bc60-4a8ca1ca6f48 | terry_pub_net1 | 192.168.48.0/24 | {"start": "192.168.48.142", "end": "192.168.48.148"} | +--------------------------------------+----------------+-----------------+------------------------------------------------------+ 创建内部网络路由接口 [root@station140 ~(network_admin)]# neutron router-interface-add b83f43cd-bf8f-42f8-812a-708c2c372820 3066c397-bccf-4473-8a94-72b09a97a70a Added interface c9566299-44ed-4924-b845-4fc48bd4de98bbfe84a2-508e-47a1-a664-27b2e8121893 to router b83f43cd-bf8f-42f8-812a-708c2c372820. 显示路由信息 [root@station140 ~(keystone_admin)]# neutron router-show b83f43cd-bf8f-42f8-812a-708c2c372820 +-----------------------+-----------------------------------------------------------------------------+ | Field | Value | +-----------------------+-----------------------------------------------------------------------------+ | admin_state_up | True | | external_gateway_info | {"network_id": "aebe75f0-6013-4a5e-bbd9-cb81e1f017bc", "enable_snat": true} | | id | b83f43cd-bf8f-42f8-812a-708c2c372820 | | name | ext-to-int | | routes | | | status | ACTIVE | | tenant_id | 9467f30b8bba4770a06a687e4584636b | +-----------------------+-----------------------------------------------------------------------------+ 移除路由接口 (interface) [root@station140 ~(keystone_admin)]# neutron router-interface-delete b83f43cd-bf8f-42f8-812a-708c2c372820 3066c397-bccf-4473-8a94-72b09a97a70a Removed interface from router b83f43cd-bf8f-42f8-812a-708c2c372820 移除路由的默认网关 查询 [root@station140 ~(keystone_admin)]# neutron router-list | grep network | grep ext-to-int +--------------------------------------+------------+-----------------------------------------------------------------------------+ | id | name | external_gateway_info | +--------------------------------------+------------+-----------------------------------------------------------------------------+ | b83f43cd-bf8f-42f8-812a-708c2c372820 | ext-to-int | {"network_id": "aebe75f0-6013-4a5e-bbd9-cb81e1f017bc", "enable_snat": true} | +--------------------------------------+------------+-----------------------------------------------------------------------------+ 当 external_gateway_info 则表示具有默认网关 删除网关接口 [root@station140 ~(keystone_admin)]# neutron router-gateway-clear b83f43cd-bf8f-42f8-812a-708c2c372820 Removed gateway from router b83f43cd-bf8f-42f8-812a-708c2c372820 下面显示为不具备网关的路由 [root@station140 ~(keystone_admin)]# neutron router-list | grep ext-to-int +--------------------------------------+------------+-----------------------+ | id | name | external_gateway_info | +--------------------------------------+------------+-----------------------+ | b83f43cd-bf8f-42f8-812a-708c2c372820 | ext-to-int | null | +--------------------------------------+------------+-----------------------+ 删除路由 [root@station140 ~(keystone_admin)]# neutron router-delete b83f43cd-bf8f-42f8-812a-708c2c372820 Deleted router: b83f43cd-bf8f-42f8-812a-708c2c372820

优秀的个人博客,低调大师

openstack 命令行管理七 - 角色管理 (备忘)

 帮助 [root@station140 ~(keystone_admin)]# keystone help | grep role role-create Create new role. role-delete Delete role. role-get Display role details. role-list List all roles. user-role-add Add role to user user-role-list List roles granted to a user user-role-remove Remove role from user bootstrap Grants a new role to a new user on a new tenant, after 创建方法 [root@station140 ~(keystone_admin)]# keystone role-create --name vgroup +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | id | 9ea4fb60241c4a12b3c89630cf3f087a | | name | vgroup | +----------+----------------------------------+ 把用户添加到某个角色中方法 [root@station140 ~(keystone_admin)]# keystone user-role-add --user terry --role vgroup --tenant cloud 显示角色中的用户方法 [root@station140 ~(keystone_admin)]# keystone user-role-list --user terry --tenant cloud <- 必须的参数 +----------------------------------+----------+----------------------------------+----------------------------------+ | id | name | user_id | tenant_id | +----------------------------------+----------+----------------------------------+----------------------------------+ | 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | 8f6478593aa845b3b44eded4aade0f6f | 9467f30b8bba4770a06a687e4584636b | | 9ea4fb60241c4a12b3c89630cf3f087a | vgroup | 8f6478593aa845b3b44eded4aade0f6f | 9467f30b8bba4770a06a687e4584636b | +----------------------------------+----------+----------------------------------+----------------------------------+ 移除角色中的某个用户 [root@station140 ~(keystone_admin)]# keystone user-role-remove --user terry --role vgroup --tenant cloud

优秀的个人博客,低调大师

openstack 命令行管理十 - 密钥管理 (备忘)

 帮助 [root@station140 ~(keystone_admin)]# nova help | grep key flavor-key Set or unset extra_spec for a flavor. keypair-add Create a new key pair for use with instances. keypair-delete Delete keypair given by its name. keypair-list Print a list of keypairs for a user keypair-show Show details about the given keypair. 创建密钥方法 [ 略 ] ssh-keygen 命令 (默认安装时候已经生成密钥) 添加密钥方法 [root@station140 ~(keystone_admin)]# nova keypair-add --pub-key /root/.ssh/id_rsa.pub terrykey 显示密钥方法 [root@station140 ~(keystone_admin)]# nova keypair-list +----------+-------------------------------------------------+ | Name | Fingerprint | +----------+-------------------------------------------------+ | terrykey | 94:b8:9c:2a:31:8c:2c:87:7f:f5:80:24:23:73:f8:e9 | +----------+-------------------------------------------------+ 密钥作用 当 instance 分配了浮动 IP 后, 允许 server 能够直接访问 instance 时候, 才可以利用密钥配对进行访问 假如通过 novnc 进行访问时候, 仍然需要通过 root/password 方法进行访问

优秀的个人博客,低调大师

openstack 命令行管理二 - 镜像管理 (备忘)

帮助 [root@station140 ~(keystone_admin)]# glance help | grep image [--os-image-url OS_IMAGE_URL] [-U OS_IMAGE_URL] [--os-image-api-version OS_IMAGE_API_VERSION] add DEPRECATED! Use image-create instead. delete DEPRECATED! Use image-delete instead. details DEPRECATED! Use image-list instead. image-create Create a new image. image-delete Delete specified image(s). image-download Download a specific image. image-list List images you can access. image-members DEPRECATED! Use member-list instead. image-show Describe a specific image. image-update Update a specific image. index DEPRECATED! Use image-list instead. member-create Share a specific image with a tenant. member-delete Remove a shared image from a tenant. member-images DEPRECATED! Use member-list instead. member-list Describe sharing permissions by image or tenant. show DEPRECATED! Use image-show instead. update DEPRECATED! Use image-update instead. 下载镜像或者自行创建 [ 略 ] 导入镜像方法 [root@localhost tmp]# source /root/keystonerc_admin [root@localhost tmp(keystone_admin)]# glance image-create --name centos5.8_x86_64 --disk-format=qcow2 --container-format=bare --is-public=True --file=/tmp/centos5.8_x86_64_growroot_1.2_20131231.qcow2 +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | 06de52dfbc2f582115b0c1981c2e3568 | 当前文件 md5 checksum 码 | container_format | bare | | created_at | 2014-02-14T03:33:01 | 导入时间 | deleted | False | | deleted_at | None | | disk_format | qcow2 | 磁盘格式 | id | 2aad80bf-6fbb-4348-bb20-2c07dbf4f687 | 当前磁盘唯一 ID 值 | is_public | True | | min_disk | 0 | | min_ram | 0 | | name | centos5.8_x86_64 | | owner | e3a71a59840c4e88b8740b789c3afb9c | 当前 openstack owner | protected | False | | size | 1151598592 | | status | active | | updated_at | 2014-02-14T03:33:11 | +------------------+--------------------------------------+ 列出当前可用镜像 [root@station140 ~(keystone_admin)]# glance image-list +--------------------------------------+------------------+-------------+------------------+------------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+------------------+-------------+------------------+------------+--------+ | 2aad80bf-6fbb-4348-bb20-2c07dbf4f687 | centos5.8_x86_64 | qcow2 | bare | 1151598592 | active | | 2d6bb00d-002f-4675-ba84-73d90fdc1020 | cirros | qcow2 | bare | 13147648 | active | +--------------------------------------+------------------+-------------+------------------+------------+--------+ [root@station140 ~(keystone_admin)]# glance details ================================================================================ URI: http://192.168.48.140:9292/v1/images/2aad80bf-6fbb-4348-bb20-2c07dbf4f687 Id: 2aad80bf-6fbb-4348-bb20-2c07dbf4f687 Public: Yes Protected: No Name: centos5.8_x86_64 Status: active Size: 1151598592 Disk format: qcow2 Container format: bare Minimum Ram Required (MB): 0 Minimum Disk Required (GB): 0 Owner: e3a71a59840c4e88b8740b789c3afb9c Created at: 2014-02-14T03:33:01 Deleted at: None Updated at: 2014-02-14T03:33:11 ================================================================================ 查询某个镜像详细信息方法 glance image-show 0c47db9c-5f74-4544-8ada-0894c1d2c20c +------------------------+--------------------------------------+ | Property | Value | +------------------------+--------------------------------------+ | Property 'description' | Windows7#_# | | checksum | eaa3a3a6dfe605f6292675018d41afdf | | container_format | bare | | created_at | 2014-09-25T08:33:46 | | deleted | False | | disk_format | qcow2 | | id | 0c47db9c-5f74-4544-8ada-0894c1d2c20c | | is_public | True | | min_disk | 0 | | min_ram | 0 | | name | Win7 | | owner | 3bf7f92c8b1449a8814b1cf15e1d1cda | | protected | False | | size | 3547856896 | | status | active | | updated_at | 2015-06-12T05:24:54 | +------------------------+--------------------------------------+ 删除镜像 [root@station140 ~(keystone_admin)]# nova image-delete cirros 下载镜像 [root@station140~(keystone_admin)]# glance image-download--file /tmp/ centos5.8_x86_64.qcow2 2aad80bf-6fbb-4348-bb20-2c07dbf4f687 

优秀的个人博客,低调大师

linux网络管理

一.IP 基础知识 ipv4 IP地址长度为二进制32位,4个一组,以10进制数表示 172.25.0.10(IP地址)/255.255.255.0(子网掩码) 子网掩码限制了网络的范围,255对应的IP位是网络位,0对应的IP位是主机位 二.配置IP 1.图形界面修改nm-connection-editor 修改后的ip地址 2.文本化图形修改nmtui 3.命令修改 nmcli connection add type ethern etcon-name 名称 ifname eth0 autoconnect yes 添加动态网络 nmcli connection add type ethernet con-name 名称 ifname eth0 ip4 ip/24 添加静态网络 nmcli connection delete westos 删除westos链接 nmcli connection show 显示所有网络链接 nmcli connection down westos 关闭指定链接 nmcli connection up westos 开启指定链接 nmcli connection modify "westos" ipv4.addresses newip/24 改变wetos的ip nmcli connection modify "westos" ipv4.method <auto|manual> 改变westos的工作方式为动态或者静态 nmcli device connect eth0 开启设备 nmcli device disconnect eth0 关闭设备 nmcli device show 显示设备信息 nmcli device status 显示设备状态 4.修改配置文件 vim /etc/sysconfig/network-scripts/ifcfg-名称 dhcp 动态获取 static|none 静态网络 增加网关和DNS gateway 网关 1.路由器 主要功能是用来作nat的 dnat 目的地地址转换 snat 源地址转换 2.网关 路由器上和自己处在同一个网段的那个ip 3.设定网关 systemctl stop NetwrokManager vim /etc/sysconfig/network 全局网关 GATEWAY=网关ip vim /etc/sysconfig/network-scripts/ifcfg-网卡配置文件 网卡接口网关 GATEWAY=网关ip systemctl restart netwrok route -n 查询网关 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 (网关)172.25.0.254 0.0.0.0 UG 0 0 0 eth0 172.25.0.0 0.0.0.0 255.255.255.0 U 0 0 dns 1.dns dns是一台服务器 这台服务器提供了回答客户主机名和ip对应关系的功能 2.设定dns vim /etc/resolv.conf nameserver dns服务器ip vim /etc/sysconfig/network-scripts/ifcfg-网卡配置文件 DNS1=dns服务器ip 3.本地解析文件 vim /etc/hosts ip 主机名称 4.本地解析文件和dns读取的优先级调整 /etc/nsswitch.conf 38 #hosts: db files nisplus nis dns 39 hosts: files dns files代表本地解析文件,dns代表dns服务器,那个在前面那个优先

优秀的个人博客,低调大师

centos网络管理

centos6、7主机名修改 centos6主机名修改: [centos@~]# hostname centos6 [centos@~]# vi /etc/sysconfig/network HOSTNAME=centos6 修改完主机名之后在/etc/hosts文件里添加修改后的主机名,添加域名解析。 这个文件作用: (1)本地主机名数据库和IP地址的映像 (2)对小型独立网络有用 (3)通常在使用DNS前检查 (4)getent hosts 查看/etc/hosts内容 127.0.0.1 localhost centos6 localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 centos7主机名修改: 配置文件:/etc/hostname,默认没有此文件,通过DNS反向解析获取主机名,默认为:localhost.localdomain,在装系统的时候可以修改主机名 显示主机名信息:hostname、hostnamectl status 设置主机名:hostnamectl set-hostname centos7,删除文件/etc/hostname,恢复默认主机名 修改完主机名之后在/etc/hosts文件里添加修改后的主机名,添加域名解析 127.0.0.1 localhost centos7 localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 hosts文件的格式:IP地址 主机名/域名 主机名别名 配置网络配置文件 其实配置文件可以写的很简单,详细写法可以参考/usr/share/doc/initscripts-*/sysconfig.txt官方自带文档,就拿/etc/sysconfig/network-scripts/ifcfg-eth0来说(在centos7.3上是ifcfg-ens33) 仅主机模式: DEVICE=eth0 #这个名称对应网卡名,不能随便改 IPADDR=172.18.6.6 #IP地址 PREFIX=16 #子网掩码也可以写成NETMASK=255.255.0.0,这个是B类,有16位掩码 ONBOOT=yes #开机是否启动 桥接模式 TYPE=Ethernet BOOTPROTO=none NAME=ens33 UUID=30247b2a-77d0-445a-bfda-af09aac5f202 DEVICE=ens33 ONBOOT=yes IPADDR=172.18.253.17 PREFIX=16 GATEWAY=172.18.0.1 DNS1=172.18.0.1 重启服务生效 如果在centos7上想改回6上的网卡命名可以修改/boot/grub2/grub.cfg文件,在最后加上net.ifnames=0,包含linux16的行有两处,在第一处加。改回后记得把DEVICE设备名称改过来,重启系统。 99 linux16 /vmlinuz-3.10.0-514.el7.x86_64 root=UUID=26d22485-c894-45f7-8b99-dbf8 3f217417 ro crashkernel=auto rhgb quiet LANG=en_US.UTF-8 net.ifnames=0 配置文件条目说明: DEVICE:此配置文件应用到的设备 HWADDR:对应设备的MAC地址 BOOTPROTO:激活此设备时使用的地址配置协议,常用的dhcp,static,none,bootp NM_CONTROLLED:NM是NetworkManager的简写,此网卡是否接受NM控制,建议centos6设为no,可以避免一些奇怪的错误 ONBOOT:在系统引导时是否激活此设备 TYPE:接口类型,常见有Ethernet,Bridge UUID:设备的唯一标识 IPADDR:指明IP地址 NETMASK:子网掩码 GATEWAY:默认网关 DNS1:第一个DNS服务器 DNS2:第二个DNS服务器 USERCTL:普通用户是否能控制 PEERDNS:如果BOOTPROTO的值为dhcp,是否允许dhcp server分配的DNS服务器指向信息直接覆盖至/etc/resolv.conf文件中 网络接口配置bonding 就是讲多块网卡绑定同一IP对外服务,可实现网卡的高可用或负载均衡。如果直接对网卡设置同一个IP是不可能的。通过bonding,虚拟一块网卡对外提供连接,物理网卡的MAC地址被修改为相同。 创建bonding设备配置文件 [centos6~]# vi /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 IPADDR=192.168.2.2 PREFIX=24 GATEWAY=172.18.0.1 BOOTPROTO=none BONDING_OPTS="miimon=100 mode=1" [centos6~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none MASTER=bond0 SLAVE=yes USERCTL=no [centos6~]# vi /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none MASTER=bond0 SLAVE=yes USERCTL=no 查看bond0状态:/proc/net/bonding/bond0,没有写配置bond文件的时候bonding文件是没有的。 bonding选项: miimon:用来进行链路检测,miimon=100,系统每100ms检测一次链路连接状态,如果有一条不同转到另一条。 mode:mode=0(轮转),mode=1(主备),mode=3(广播策略) 删除bond0: ifconfig bond0 down rmmod bonding

资源下载

更多资源
Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Rocky Linux

Rocky Linux

Rocky Linux(中文名:洛基)是由Gregory Kurtzer于2020年12月发起的企业级Linux发行版,作为CentOS稳定版停止维护后与RHEL(Red Hat Enterprise Linux)完全兼容的开源替代方案,由社区拥有并管理,支持x86_64、aarch64等架构。其通过重新编译RHEL源代码提供长期稳定性,采用模块化包装和SELinux安全架构,默认包含GNOME桌面环境及XFS文件系统,支持十年生命周期更新。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册