OpenStack 安装:neutron服务
在上一篇中介绍了Nova的安装配置,这一篇介绍neutron
- 首先,创建neutron用户并设置密码为neutron
[root@linux-node1 ~]# openstack user create --domain default --password-prompt neutron
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 0e2ce721eca14c688627df21da78cc4e |
| name | neutron |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
- 给neutron用户授予admin角色
[root@linux-node1 ~]# openstack role add --project service --user neutron admin
- 创建neutron服务实例
openstack service create --name neutron \
--description "OpenStack Networking" network
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Networking |
| enabled | True |
| id | 98cc414411714278a541de8653eefcb0 |
| name | neutron |
| type | network |
+-------------+----------------------------------+
- 创建neutron服务API端点
openstack endpoint create --region RegionOne \
network public http://192.168.56.11:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | fc0ce5260d50460399bd160db2034569 |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 98cc414411714278a541de8653eefcb0 |
| service_name | neutron |
| service_type | network |
| url | http://192.168.56.11:9696 |
+--------------+----------------------------------+openstack endpoint create --region RegionOne \
network internal http://192.168.56.11:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | a1107a5752f149a0988ee2d63c3fce8e |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 98cc414411714278a541de8653eefcb0 |
| service_name | neutron |
| service_type | network |
| url | http://192.168.56.11:9696 |
+--------------+----------------------------------+openstack endpoint create --region RegionOne \
network admin http://192.168.56.11:9696
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 1e3729ff74bd4f59b6aa5f7c170e21d2 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 98cc414411714278a541de8653eefcb0 |
| service_name | neutron |
| service_type | network |
| url | http://192.168.56.11:9696 |
+--------------+----------------------------------+
- 验证用户和服务
[root@linux-node1 ~]# openstack user list
+----------------------------------+-----------+
| ID | Name |
+----------------------------------+-----------+
| 0e2ce721eca14c688627df21da78cc4e | neutron |
| 27080769990347169fdc6bf81fe9ebd1 | placement |
| 291f02337e514343a09a92932a86fd22 | demo |
| 31a0d9b7dd5f47b4b30ed4a77500a307 | glance |
| 34c7be4d612a45b4830304af29eb010e | nova |
| d010fba89633421a800698b0e5300d50 | admin |
+----------------------------------+-----------+
[root@linux-node1 ~]# openstack service list
+----------------------------------+-----------+-----------+
| ID | Name | Type |
+----------------------------------+-----------+-----------+
| 325ab5f400f14fc485eb4231dab6d74d | keystone | identity |
| 344d25c79f1b412cb0c5958bd8242b2c | placement | placement |
| 4c4dd5eb35324b568cd9722f174a632b | glance | image |
| 98cc414411714278a541de8653eefcb0 | neutron | network |
| bf254b3182e04256897e925632f171d0 | nova | compute |
+----------------------------------+-----------+-----------+
在本示例中,我们选择网络为provider networks
- 编辑/etc/neutron/neutron.conf,并修改如下配置:
[DEFAULT]
auth_strategy = keystone
core_plugin = ml2
service_plugins =
notify_nova_on_port_status_changes = true
notify_nova_on_port_data_changes = true
transport_url = rabbit://openstack:openstack@192.168.56.11
[database]
connection = mysql+pymysql://neutron:neutron@192.168.56.11/neutron
[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[nova]
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = nova
password = nova
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
配置Linux桥接代理
- 编辑/etc/neutron/plugins/ml2/linuxbridge_agent.ini,并作出如下修改:
[linux_bridge]
physical_interface_mappings = provider:eth0
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
[vxlan]
enable_vxlan = false
- 编辑/etc/neutron/plugins/ml2/ml2_conf.ini并作出如下修改:
[ml2]
type_drivers = local,flat,vlan,gre,vxlan,geneve
tenant_network_types =
mechanism_drivers = linuxbridge
extension_drivers = port_security
[ml2_type_flat]
flat_networks = provider
[securitygroup]
enable_ipset = true
- 编辑/etc/neutron/dhcp_agent.ini ,并作出如下修改:
[DEFAULT] interface_driver = linuxbridge
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
enable_isolated_metadata = true
配置metadata代理
- 编辑/etc/neutron/metadata_agent.ini并作出如下修改:
[DEFAULT]
nova_metadata_host = 192.168.56.11
metadata_proxy_shared_secret = openstack
为neutron配置Nova服务
- 编辑/etc/nova/nova.conf,并作出如下修改:
[neutron]
url = http://192.168.56.11:9696
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
service_metadata_proxy = true
metadata_proxy_shared_secret = openstack
- 网络服务初始化脚本需要一个链接由/etc/neutron/plugin.ini指向ML2插件配置文件/etc/neutron/plugins/ml2/ml2_conf.ini
[root@linux-node1 ~]# ln -s /etc/neutron/plugins/ml2/ml2_conf.ini /etc/neutron/plugin.ini
- 同步数据库
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head" neutron
INFO [alembic.runtime.migration] Context impl MySQLImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
.....
- 因为修改过Nova文件,现在需要重启Nova服务
[root@linux-node1 ~]# systemctl restart openstack-nova-api.service
[root@linux-node1 ~]#
- 启动neutron并设置为开机启动
systemctl enable neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-
server.service to /usr/lib/systemd/system/neutron-server.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-
linuxbridge-agent.service to /usr/lib/systemd/system/neutron-linuxbridge-
agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-dhcp-
agent.service to /usr/lib/systemd/system/neutron-dhcp-agent.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/neutron-
metadata-agent.service to /usr/lib/systemd/system/neutron-metadata-
agent.service.
systemctl start neutron-server.service \
neutron-linuxbridge-agent.service neutron-dhcp-agent.service \
neutron-metadata-agent.service
- 验证配置是否正确
[root@linux-node1 ~]# openstack network agent list
+--------------------------------------+--------------------+-------------------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+-------------------------+-------------------+-------+-------+---------------------------+
| 22e10474-f526-4b7c-bd41-2345e69255ee | DHCP agent | linux-node1.example.com | nova | :-) | UP | neutron-dhcp-agent |
| 796a0e3b-baa5-4ef5-b155-495f48857b43 | Linux bridge agent | linux-node1.example.com | None | :-) | UP | neutron-linuxbridge-agent |
| fb02118a-d96c-43e6-994a-971f0682ef3f | Metadata agent | linux-node1.example.com | None | :-) | UP | neutron-metadata-agent |
+--------------------------------------+--------------------+-------------------------+-------------------+-------+-------+---------------------------+
计算节点
- 在node2上编辑/etc/neutron/neutron.conf并作出如下修改
[DEFAULT]
auth_strategy = keystone
transport_url = rabbit://openstack:openstack@192.168.56.11
[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = neutron
password = neutron
[oslo_concurrency]
lock_path = /var/lib/neutron/tmp
配置Linux桥接代理
- 编辑/etc/neutron/plugins/ml2/linuxbridge_agent.ini并作出如下修改
[linux_bridge]
physical_interface_mappings = provider:eth0
[securitygroup]
firewall_driver = neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
enable_security_group = true
[vxlan]
enable_vxlan = false
为neutron服务配置Nova服务
- 编辑/etc/nova/nova.conf并作出如下修改:
[neutron]
url = http://192.168.56.11:9696
auth_url = http://192.168.56.11:35357
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = neutron
- 重启Nova服务
[root@linux-node2 nova]# systemctl restart openstack-nova-compute.service
- 启动neutron服务并设置为开机启动
[root@linux-node2 nova]# systemctl enable neutron-linuxbridge-agent.service
Created symlink from /etc/systemd/system/multi-
user.target.wants/neutron-linuxbridge-agent.service to
/usr/lib/systemd/system/neutron-linuxbridge-agent.service.
[root@linux-node2 nova]# systemctl start neutron-linuxbridge-agent.service
- 验证配置是否正确
[root@linux-node1 ~]# openstack network agent list
+--------------------------------------+--------------------+-------------------------+-------------------+-------+-------+---------------------------+
| ID | Agent Type | Host | Availability Zone | Alive | State | Binary |
+--------------------------------------+--------------------+-------------------------+-------------------+-------+-------+---------------------------+
| 22e10474-f526-4b7c-bd41-2345e69255ee | DHCP agent | linux-node1.example.com | nova | :-) | UP | neutron-dhcp-agent |
| 796a0e3b-baa5-4ef5-b155-495f48857b43 | Linux bridge agent | linux-node1.example.com | None | :-) | UP | neutron-linuxbridge-agent |
| b0207456-29b8-4ff1-a9e9-4d4aa22e42fe | Linux bridge agent | linux-node2.example.com | None | :-) | UP | neutron-linuxbridge-agent |
| fb02118a-d96c-43e6-994a-971f0682ef3f | Metadata agent | linux-node1.example.com | None | :-) | UP | neutron-metadata-agent |
+--------------------------------------+--------------------+-------------------------+-------------------+-------+-------+---------------------------+
[root@linux-node1 ~]# openstack compute service list
+----+------------------+-------------------------+----------+---------+-------+----------------------------+
| ID | Binary | Host | Zone | Status | State | Updated At |
+----+------------------+-------------------------+----------+---------+-------+----------------------------+
| | nova-consoleauth | linux-node1.example.com | internal | enabled | up | --12T08::33.000000 |
| | nova-scheduler | linux-node1.example.com | internal | enabled | up | --12T08::31.000000 |
| | nova-conductor | linux-node1.example.com | internal | enabled | up | --12T08::40.000000 |
| | nova-compute | linux-node2.example.com | nova | enabled | up | --12T08::36.000000 |
+----+------------------+-------------------------+----------+---------+-------+----------------------------+
- 创建网络
openstack network create --share --external \
--provider-physical-network provider \
--provider-network-type flat provider
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | UP |
| availability_zone_hints | |
| availability_zones | |
| created_at | --12T08::03Z |
| description | |
| dns_domain | None |
| id | 59cd11d3-3d7b-4da3-8cbf-a5fece6be63b |
| ipv4_address_scope | None |
| ipv6_address_scope | None |
| is_default | None |
| is_vlan_transparent | None |
| mtu | |
| name | provider |
| port_security_enabled | True |
| project_id | fb6761ab3d3d43569d5fdfafcdfa5e28 |
| provider:network_type | flat |
| provider:physical_network | provider |
| provider:segmentation_id | None |
| qos_policy_id | None |
| revision_number | |
| router:external | External |
| segments | None |
| shared | True |
| status | ACTIVE |
| subnets | |
| tags | |
| updated_at | --12T08::03Z |
+---------------------------+--------------------------------------+
- 验证网络是否创建
[root@linux-node1 ~]# openstack network list
+--------------------------------------+----------+---------+
| ID | Name | Subnets |
+--------------------------------------+----------+---------+
| 59cd11d3-3d7b-4da3-8cbf-a5fece6be63b | provider | |
+--------------------------------------+----------+---------+
- 创建子网
openstack subnet create --network provider \
--allocation-pool start=192.168.56.100,end=192.168.56.200 \
--dns-nameserver 223.5.5.5 --gateway 192.168.56.2 \
--subnet-range 192.168.56.0/ provider
+-------------------------+--------------------------------------+
| Field | Value |
+-------------------------+--------------------------------------+
| allocation_pools | 192.168.56.100-192.168.56.200 |
| cidr | 192.168.56.0/ |
| created_at | --12T08::11Z |
| description | |
| dns_nameservers | 223.5.5.5 |
| enable_dhcp | True |
| gateway_ip | 192.168.56.2 |
| host_routes | |
| id | 50340b32-3f7f-4e8f-be72-673b9f701e4d |
| ip_version | |
| ipv6_address_mode | None |
| ipv6_ra_mode | None |
| name | provider |
| network_id | 59cd11d3-3d7b-4da3-8cbf-a5fece6be63b |
| project_id | fb6761ab3d3d43569d5fdfafcdfa5e28 |
| revision_number | |
| segment_id | None |
| service_types | |
| subnetpool_id | None |
| tags | |
| updated_at | --12T08::11Z |
| use_default_subnet_pool | None |
+-------------------------+--------------------------------------+
- 验证子网是否创建
[root@linux-node1 ~]# openstack subnet list
+--------------------------------------+----------+--------------------------------------+-----------------+
| ID | Name | Network | Subnet |
+--------------------------------------+----------+--------------------------------------+-----------------+
| 50340b32-3f7f-4e8f-be72-673b9f701e4d | provider | 59cd11d3-3d7b-4da3-8cbf-a5fece6be63b | 192.168.56.0/ |
+--------------------------------------+----------+--------------------------------------+-----------------+
- 创建虚拟机
[root@linux-node1 ~]# openstack flavor create --id --vcpus --ram --disk m1.nano
+----------------------------+---------+
| Field | Value |
+----------------------------+---------+
| OS-FLV-DISABLED:disabled | False |
| OS-FLV-EXT-DATA:ephemeral | |
| disk | |
| id | |
| name | m1.nano |
| os-flavor-access:is_public | True |
| properties | |
| ram | |
| rxtx_factor | 1.0 |
| swap | |
| vcpus | |
+----------------------------+---------+
- 使用demo环境变量并创建key
[root@linux-node1 ~]# source demo-openstack.sh
[root@linux-node1 ~]# ssh-keygen -q -N ""
Enter file in which to save the key (/root/.ssh/id_rsa):
- 创建keypair
[root@linux-node1 ~]# openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey
+-------------+-------------------------------------------------+
| Field | Value |
+-------------+-------------------------------------------------+
| fingerprint | :::bc:5e:dd:dc:::c7::9f:6a:::cd |
| name | mykey |
| user_id | 291f02337e514343a09a92932a86fd22 |
+-------------+-------------------------------------------------+
- 验证keypair是否创建成功
[root@linux-node1 ~]# openstack keypair list
+-------+-------------------------------------------------+
| Name | Fingerprint |
+-------+-------------------------------------------------+
| mykey | :::bc:5e:dd:dc:::c7::9f:6a:::cd |
+-------+-------------------------------------------------+
- 添加安全组规则并运行SSH接入
[root@linux-node1 ~]# openstack security group rule create --proto icmp default
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | --12T08::51Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 245c084a-c503-4f23-a875-7a33c1eb442d |
| name | None |
| port_range_max | None |
| port_range_min | None |
| project_id | 1d5b969df6da43e69e4a956297404f5c |
| protocol | icmp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/ |
| revision_number | |
| security_group_id | e46d2903-e800--a788-1923523ba4de |
| updated_at | --12T08::51Z |
+-------------------+--------------------------------------+
[root@linux-node1 ~]# openstack security group rule create --proto tcp --dst-port default
+-------------------+--------------------------------------+
| Field | Value |
+-------------------+--------------------------------------+
| created_at | --12T08::32Z |
| description | |
| direction | ingress |
| ether_type | IPv4 |
| id | 38f48887-e107---787a68191748 |
| name | None |
| port_range_max | |
| port_range_min | |
| project_id | 1d5b969df6da43e69e4a956297404f5c |
| protocol | tcp |
| remote_group_id | None |
| remote_ip_prefix | 0.0.0.0/ |
| revision_number | |
| security_group_id | e46d2903-e800--a788-1923523ba4de |
| updated_at | --12T08::32Z |
+-------------------+--------------------------------------+
- 创建实例,使用openstack network list中的ID创建实例
[root@linux-node1 ~]# openstack network list
+--------------------------------------+----------+--------------------------------------+
| ID | Name | Subnets |
+--------------------------------------+----------+--------------------------------------+
| 59cd11d3-3d7b-4da3-8cbf-a5fece6be63b | provider | 50340b32-3f7f-4e8f-be72-673b9f701e4d |
+--------------------------------------+----------+--------------------------------------+openstack server create --flavor m1.nano --image cirros \
--nic net-id=59cd11d3-3d7b-4da3-8cbf-a5fece6be63b --security-group default \
--key-name mykey provider-instance
+-----------------------------+-----------------------------------------------+
| Field | Value |
+-----------------------------+-----------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | |
| OS-EXT-STS:power_state | NOSTATE |
| OS-EXT-STS:task_state | scheduling |
| OS-EXT-STS:vm_state | building |
| OS-SRV-USG:launched_at | None |
| OS-SRV-USG:terminated_at | None |
| accessIPv4 | |
| accessIPv6 | |
| addresses | |
| adminPass | v7pgeGj7b5zC |
| config_drive | |
| created | --12T08::04Z |
| flavor | m1.nano () |
| hostId | |
| id | 46cc7aad---b067-919e736e07ac |
| image | cirros (24a1486b-d1b5--b2cc-3397fdf295cf) |
| key_name | mykey |
| name | provider-instance |
| progress | |
| project_id | 1d5b969df6da43e69e4a956297404f5c |
| properties | |
| security_groups | name='e46d2903-e800-4464-a788-1923523ba4de' |
| status | BUILD |
| updated | --12T08::04Z |
| user_id | 291f02337e514343a09a92932a86fd22 |
| volumes_attached | |
+-----------------------------+-----------------------------------------------+
- 查看是否创建成功
[root@linux-node1 ~]# openstack server list
+--------------------------------------+-------------------+--------+-------------------------+--------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------------+--------+-------------------------+--------+---------+
|46cc7aad-6353-4399-b067-919e736e07ac | provider-instance | ACTIVE | provider=192.168.56.105 | cirros | m1.nano |
+--------------------------------------+-------------------+--------+-------------------------+--------+---------+
- 查看console端口
[root@linux-node1 ~]# openstack console url show provider-instance
+-------+------------------------------------------------------------------------------------+
| Field | Value |
+-------+------------------------------------------------------------------------------------+
| type | novnc |
| url | http://192.168.56.11:6080/vnc_auto.html?token=e000ab58-4080-4adf-b588-59b6b86bcfa8 |
+-------+------------------------------------------------------------------------------------+
OpenStack 安装:neutron服务的更多相关文章
- OpenStack:安装Neutron与provider network
1. 安装(1)Install Networking services on a dedicated network node# apt-get install neutron-server neut ...
- openstack 安装neutron网络服务安装 报错:Unknown operation 'enabled'
注:这个脚本文件有一个地方是错误的,最后一行需要修改一下 # vim /usr/local/bin/iass-install-neutron-controller-gre.sh # 改systemc ...
- 安装neutron
在控制节点上执行 controllerHost='controller' MYSQL_PASSWD='m4r!adbOP' RABBIT_PASSWD='0penstackRMQ' NOVA_PASS ...
- CentOS7安装OpenStack(Rocky版)-06.安装Neutron网络服务(控制节点)
上一章介绍了独立的nova计算节点的安装方法,本章分享openstack的网络服务neutron的安装配制方法 ------------------- 完美的分割线 ----------------- ...
- openstack安装newton版本neutron服务部署(四)
一.管理节点部署服务: 1.安装neutron: [root@linux-node1 ~]# yum install openstack-neutron openstack-neutron-ml2 o ...
- OpenStack Train版-10.安装neutron网络服务(网络节点:可选)
可选:安装neutron网络服务节点(neutron01网络节点192.168.0.30)网络配置按照官网文档的租户自助网络 配置系统参数 echo 'net.ipv4.ip_forward = 1' ...
- OpenStack Train版-9.安装neutron网络服务(计算节点)
在计算节点安装neutron网络服务(computel01计算节点192.168.0.20)安装组件 yum install openstack-neutron-linuxbridge ebtable ...
- OpenStack Train版-8.安装neutron网络服务(控制节点)
安装neutron网络服务(controller控制节点192.168.0.10) 创建neutron数据库 mysql -uroot CREATE DATABASE neutron; GRANT A ...
- Openstack入门篇(十一)之neutron服务(控制节点)的部署与测试
1.Neutron的介绍 Neutron 为整个 OpenStack 环境提供网络支持,包括二层交换,三层路由,负载均衡,防火墙和 *** 等.Neutron 提供了一个灵活的框架,通过配置,无论是开 ...
随机推荐
- MVC4 5分页控件,支持Ajax AjaxOption支持
MVC4 5分页控件,支持Ajax AjaxOption支持 /// <summary> /// MVC4 5分页控件,支持Ajax AjaxOption支持 beta 1.0 /// 用 ...
- CentOS 7 install Tensorflow-gpu
# install TensorFlow GPU on CentOS 7.0# https://www.server-world.info/en/note?os=CentOS_7&p=tens ...
- [转][SqlServer]收缩日志
USE StudyDB ; GO ALTER DATABASE StudyDB SET RECOVERY SIMPLE;--设置简单恢复模式 GO ); GO ALTER DATABASE Study ...
- # 20175311 2018-2019-2 《Java程序设计》第2周学习总结
## 教材学习内容总结 第二周我对如何运行java程序已经比较熟悉了,第二周更多的是注重程序内部的原理了. ## 教材学习中的问题和解决过程 - 问题1:看书时看到的一个例子,不是很懂它是怎么得出结果 ...
- VMware与Centos系统安装
Linux介绍 1. Linux Linux和windows一样都是操作系统,Linux是开源的.免费的.自由传播的类Unix操作系统软件. 是一个基于POSIX和UNIX的多用户.多任务.支持多线程 ...
- 【原创】Open JDK更换过程及更换后的问题总结与分析
由于2019年1月起Oracle对通用计算以外的应用场景开始收费,综合看来还是主要针对嵌入式的Java应用进行收费,毕竟嵌入式设备的数量是庞大的,可以有数亿元进账. 因Oracle JDK收费,各大公 ...
- 微信小程序-滚动Tab选项卡
前言:今天呢 给大家详细讲解一下滚动Tab选项卡:左右可滑动切换的效果,希望对大家做项目时候有用! 以前也遇到过这个,但是没有做记录.转载来源于:https://www.jianshu.com/p/9 ...
- 种类并查集(洛谷P2024食物链)
题目描述 动物王国中有三类动物 A,B,C,这三类动物的食物链构成了有趣的环形.A 吃 B,B 吃 C,C 吃 A. 现有 N 个动物,以 1 - N 编号.每个动物都是 A,B,C 中的一种,但是我 ...
- Hexo+Github博客最简教程-Dockerfile自动搭建
闲谈 拿出你的气质,打开你的电脑,借你半小时搭建好属于你的hexo博客,小生用dockerfile自动帮你搭建好:你只需要在你的mac或linux或windows上提前把docker安装好,如何安装不 ...
- IntelliJ IDEA 工程Java文件上红色的无效符
IntelliJ IDEA 工程Java文件上红色的无效符(红色表示该类是不可编译文件) 1.查看Java.resources文件夹 如图所示,是因为没有配置 2.在Java文件夹点击右键找到Mark ...