RHCE练习题目【更新至】

news2024/12/23 0:11:30

文章目录

    • 第一题、安装和配置ansible
    • 第二题、创建和运行ansible临时命令
    • 第三题、使用剧本安装软件包
    • 第四题、使用RHEL系统脚色
      • 第一问、配置时间同步
      • 第二问、配置selinux
    • 第五题、使用Ansible Galaxy安装角色
    • 第六题、创建和使用角色
    • 第七题、从Ansible Galaxy使用角色
    • 第八题、创建和使用逻辑卷
      • 第一问
      • 第二问

第一题、安装和配置ansible

在workstation上安装

sudo yum install -y ansible
mkdir ansile/roles -p
cd ansible
[student@workstation ansible]$ cat ansible.cfg 
[defaults]
inventory = inventory
remote_user = devops
roles_path = ./roles
host_key_checking = false
ask_pass = false

[privilege_escalation]
become=True
become_method=sudo
become_user=root
become_ask_pass=False
[student@workstation ansible]$

编写主机清单

[student@workstation ansible]$ cat inventory 
[dev]
servera

[test]
serverb

[prod]
server[c:d]

[balancers]
bastion

[webservers:children]
prod
[student@workstation ansible]$

检查可用性

[student@workstation ansible]$ ansible all -a id
serverd | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

serverc | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

serverb | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

servera | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

bastion | CHANGED | rc=0 >>
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[student@workstation ansible]$ 

第二题、创建和运行ansible临时命令

[student@workstation ansible]$ cat adhoc.sh 
#! /bin/bash
ansible all -m yum_repository -a "name=rh294_BASE
description='rhce base software'
file=rhel_dvd
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/BaseOS
gpgcheck=yes
gpgkey=http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
enabled=yes"

ansible all -m yum_repository -a "name=rh294_STREAM
description='rh294 stream software'
file=rhel_dvd
baseurl=http://content.example.com/rhel8.0/x86_64/dvd/AppStream
gpgcheck=yes
gpgkey=http://content.example.com/rhel8.0/x86_64/dvd/RPM-GPG-KEY-redhat-release
enabled=yes"
[student@workstation ansible]$

第三题、使用剧本安装软件包

设置tab键,方便编写ymal文件

[student@workstation ansible]$ cat ~/.vimrc 
autocmd FileType yaml setlocal ai ts=2 sw=2 et
[student@workstation ansible]$

编写安装相关软件包的剧本

[student@workstation ansible]$ cat packages.yml 
---
- name: install pkgs
  hosts: dev,test,prod
  tasks:
    - name: install php and mariadb
      yum:
        name:
          - php
          - mariadb
          - mariadb-server
        state: present
- name: install group pkgs
  hosts: dev
  tasks:
    - name: install Development Tools
      yum: 
        name: "@RPM Development Tools"
        state: present
    - name: update installed pkgs
      yum:
        name: "*"
        state: latest
        update_only: true
[student@workstation ansible]$

检查剧本是否有语法错误,执行剧本

[student@workstation ansible]$ ansible-playbook --syntax-check packages.yml 

playbook: packages.yml
[student@workstation ansible]$ 
[student@workstation ansible]$ ansible-playbook packages.yml

第四题、使用RHEL系统脚色

第一问、配置时间同步

[student@workstation ansible]$ ls
adhoc.sh  ansible.cfg  inventory  packages.yml  roles  timesync.yml
[student@workstation ansible]$ cp -r /usr/share/ansible/roles/rhel-system-roles.timesync/ roles/timesync/

编写剧本

[student@workstation ansible]$ cat timesync.yml 
---
- name: set time sync
  hosts: all
  roles:
    - timesync
  vars:
    timesync_ntp_servers:
      - hostname: classroom.example.com
        iburst: yes
[student@workstation ansible]$
[student@workstation ansible]$ ansible-playbook --syntax-check timesync.yml 

playbook: timesync.yml
[student@workstation ansible]$ ansible-playbook timesync.yml 

验证是否同步

[student@workstation ansible]$ ansible all -a "chronyc sources -v"
serverc | CHANGED | rc=0 >>
210 Number of sources = 1

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* classroom.example.com         8   6    17     8  -5796ns[  -69us] +/-  355us

serverd | CHANGED | rc=0 >>
210 Number of sources = 1

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* classroom.example.com         8   6    17     9   +641ns[  +43us] +/-  430us

servera | CHANGED | rc=0 >>
210 Number of sources = 1

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* classroom.example.com         8   6    17     9   +760ns[  -42us] +/-  624us

bastion | CHANGED | rc=0 >>
210 Number of sources = 1

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* classroom.example.com         8   6    17     9  -3282ns[  -64us] +/- 1160us

serverb | CHANGED | rc=0 >>
210 Number of sources = 1

  .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
 / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
| /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
||                                                 .- xxxx [ yyyy ] +/- zzzz
||      Reachability register (octal) -.           |  xxxx = adjusted offset,
||      Log2(Polling interval) --.      |          |  yyyy = measured offset,
||                                \     |          |  zzzz = estimated error.
||                                 |    |           \
MS Name/IP address         Stratum Poll Reach LastRx Last sample               
===============================================================================
^* classroom.example.com         8   6    17     9   +611ns[  +41us] +/-  731us

[student@workstation ansible]$

第二问、配置selinux

拉取角色

[student@workstation ansible]$ cp -r /usr/share/ansible/roles/rhel-system-roles.selinux/ roles/selinux
[student@workstation ansible]$ ls roles/selinux/
COPYING  library  meta  README.html  README.md  semaphore  tasks  tests  vars
[student@workstation ansible]$

编写剧本

[student@workstation ansible]$ vim selinux.yml
[student@workstation ansible]$ cat selinux.yml 
---
- name: use system roles to configure selinux
  hosts: all
  roles:
    - role: selinux
  vars:
    selinux_policy: targeted
    selinux_state: enforcing
[student@workstation ansible]$

检查语法,执行剧本

[student@workstation ansible]$ ansible-playbook --syntax-check selinux.yml 

playbook: selinux.yml
[student@workstation ansible]$ ansible-playbook selinux.yml 

第五题、使用Ansible Galaxy安装角色

编写剧本

[student@workstation ansible]$ vim roles/requirements.yml
[student@workstation ansible]$ cat roles/requirements.yml
---
- name: balancer
  src: http://content.example.com/haproxy.tar.gz

- name: phpinfo
  src: http://content.example.com/phpinfo.tar.gz
[student@workstation ansible]$ 

执行剧本

[student@workstation ansible]$ ansible-galaxy install -r roles/requirements.yml -p roles/
- downloading role from http://content.example.com/haproxy.tar.gz
- extracting balancer to /home/student/ansible/roles/balancer
- balancer was installed successfully
- downloading role from http://content.example.com/phpinfo.tar.gz
- extracting phpinfo to /home/student/ansible/roles/phpinfo
- phpinfo was installed successfully
[student@workstation ansible]$ 

验证

[student@workstation ansible]$ pwd
/home/student/ansible
[student@workstation ansible]$ ls roles/
balancer  phpinfo  requirements.yml  selinux  timesync

第六题、创建和使用角色

初始化角色

[student@workstation roles]$ pwd
/home/student/ansible/roles
[student@workstation roles]$
[student@workstation roles]$ ansible-galaxy init apache
- apache was created successfully
[student@workstation roles]$
[student@workstation roles]$ ls
apache  balancer  phpinfo  requirements.yml  selinux  timesync
[student@workstation roles]$ vim apache/tasks/main.yml 
[student@workstation roles]$ cat apache/tasks/main.yml
---
# tasks file for apache
- name: install http
  yum:
    name: httpd
    state: present

- name: config system service
  service:
    name: "{{ item }}"
    state: started
    enabled: yes
  loop:
    - httpd
    - firewalld

- name: firewalld service
  firewalld:
    zone: public
    service: http
    permanent: yes
    immediate: yes
    state: enabled

- name: user templates
  template:
    src: index.html.j2
    dest: /var/www/html/index.html
    owner: apache
    group: apache
    mode: '0644'
[student@workstation roles]$ 
[student@workstation roles]$ vim apache/templates/index.html.j2
[student@workstation roles]$ cat apache/templates/index.html.j2
Welcome to {{ ansible_facts.fqdn }} on {{ ansible_facts.default_ipv4.address }}
[student@workstation roles]$
[student@workstation roles]$ vim ../newrole.yml
[student@workstation roles]$ cat ../newrole.yml
---
- name: use http role
  hosts: webservers
  roles:
    - apache
[student@workstation roles]$

执行剧本

[student@workstation ansible]$ pwd
/home/student/ansible
[student@workstation ansible]$ 
[student@workstation ansible]$ ansible-playbook newrole.yml

在这里插入图片描述

第七题、从Ansible Galaxy使用角色

环境配置【考试不用】

[student@workstation ansible]$ ssh root@bastion
[root@bastion ~]# systemctl stop httpd
[root@bastion ~]# systemctl disable httpd
Removed /etc/systemd/system/multi-user.target.wants/httpd.service.
[root@bastion ~]# exit
logout
Connection to bastion closed.
[student@workstation ansible]$

编写剧本

[student@workstation ansible]$ vim roles.yml
[student@workstation ansible]$ cat roles.yml
- name: gather all need vars
  hosts: all

- name: deploy haproxy
  hosts: balancers
  roles:
    - balancer

- name: deploy basic php env on webwerver
  hosts: webservers
  roles:
    - phpinfo
[student@workstation ansible]$ 

执行剧本

[student@workstation ansible]$ ansible-playbook --syntax-check roles.yml 

playbook: roles.yml
[student@workstation ansible]$ ansible-playbook roles.yml

在这里插入图片描述
访问,考试时,hello.php用浏览器访问验证

[student@workstation ansible]$ curl bastion
Welcome to serverc.lab.example.com on 172.25.250.12
[student@workstation ansible]$ curl bastion
Welcome to serverd.lab.example.com on 172.25.250.13
[student@workstation ansible]$ curl serverc/hello.php
Hello PHP World form serverc.lab.example.com
[student@workstation ansible]$ curl serverd/hello.php
Hello PHP World form serverd.lab.example.com

第八题、创建和使用逻辑卷

第一问

因为虚拟机只有一块盘,做完题要还原磁盘才能做第二问。下载还原磁盘的剧本【考试环境不用这个操作】

[student@workstation ansible]$ wget http://content.example.com/lv_pre.yml
--2023-06-04 19:54:09--  http://content.example.com/lv_pre.yml
Resolving content.example.com (content.example.com)... 172.25.254.254
Connecting to content.example.com (content.example.com)|172.25.254.254|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 623
Saving to: ‘lv_pre.yml’

lv_pre.yml                      100%[======================================================>]     623  --.-KB/s    in 0s      

2023-06-04 19:54:09 (41.2 MB/s) - ‘lv_pre.yml’ saved [623/623]

[student@workstation ansible]$
[student@workstation ansible]$ ansible-playbook lv_pre.yml 
[student@workstation ansible]$ ansible all -a 'vgs'
serverd | CHANGED | rc=0 >>
  VG       #PV #LV #SN Attr   VSize    VFree   
  research   1   0   0 wz--n- 1020.00m 1020.00m

serverc | CHANGED | rc=0 >>
  VG       #PV #LV #SN Attr   VSize    VFree   
  research   1   0   0 wz--n- 1020.00m 1020.00m

serverb | CHANGED | rc=0 >>
  VG       #PV #LV #SN Attr   VSize  VFree 
  research   1   0   0 wz--n- <2.00g <2.00g

servera | CHANGED | rc=0 >>
  VG       #PV #LV #SN Attr   VSize  VFree 
  research   1   0   0 wz--n- <2.00g <2.00g

bastion | CHANGED | rc=0 >>


[student@workstation ansible]$ 

编写剧本创建逻辑卷

[student@workstation ansible]$ vim lv.yml 
[student@workstation ansible]$ cat lv.yml
---
- name: create lvm
  hosts: all
  tasks:
    - name: create a lvm
      block:
        - name: create 1500M ;v
          lvol:
            vg: research
            lv: data
            size: 1500m
      
      rescue:
        - name: sorry lvm too big
          debug:
            msg: "Could not create logical volume with that size"

        - name: create 800m lv
          lvol: 
            vg: research
            lv: data
            size: 800m

      always:
        - name: make demand fs
          filesystem:
            dev: /dev/research/data
            fstype: ext4
          when: "'research' in ansible_facts.lvm.vgs"

        - name: show other debug info
          debug:
            msg: "Volume group does not exist"
          when: "'research' not in ansible_facts.lvm.vgs"
[student@workstation ansible]$ 

检查语法,执行剧本

[student@workstation ansible]$ ansible-playbook --syntax-check lv.yml 

playbook: lv.yml
[student@workstation ansible]$ ansible-playbook lv.yml

在这里插入图片描述
验证
在这里插入图片描述

第二问

下载并执行环境准备剧本【考试时不用】

[student@workstation ansible]$ wget http://content.example.com/part_pre.yml
--2023-06-04 21:20:12--  http://content.example.com/part_pre.yml
Resolving content.example.com (content.example.com)... 172.25.254.254
Connecting to content.example.com (content.example.com)|172.25.254.254|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 386
Saving to: ‘part_pre.yml’

part_pre.yml                    100%[======================================================>]     386  --.-KB/s    in 0s      

2023-06-04 21:20:12 (33.8 MB/s) - ‘part_pre.yml’ saved [386/386]

[student@workstation ansible]$ 
[student@workstation ansible]$ vim  part_pre.yml
[student@workstation ansible]$ ansible-playbook part_pre.yml

在这里插入图片描述
在这里插入图片描述
编写剧本

[student@workstation ansible]$ vim partition.yml
[student@workstation ansible]$ cat partition.yml
---
- name: create partition with a proper size
  hosts: all
  tasks:
    - name: show if vdb exits
      debug:
        msg: "Disk does not exits "
      when: "ansible_facts.devices.vdb is not defined"
      failed_when: "ansible_facts.devices.vdb is not defined"

    - name: create a partition
      block:
        - name: create 1500m partiton
          parted:
            device: /dev/vdb
            number: 1
            state: present
            part_start: 1MiB
            part_end: 1500MiB
            force: true

      rescue:
        - name: show debug info1
          debug:
            msg: "Could not create partion of that size"

        - name: create 800m partition
          parted:
            device: /dev/vdb
            number: 1
            state: present
            part_start: 1MiB
            part_end: 800MiB
            force: true

      always:
        - name: create fs
          filesystem: 
            dev: /dev/vdb1
            fstype: ext4
            force: true
          when: ansible_facts.devices.vdb

        - name: mount fs
          mount:
            path: /newpart
            src: /dev/vdb1
            state: mounted
            fstype: ext4
          when: ansible_facts.devices.vdb
[student@workstation ansible]$ 

检查语法,执行

[student@workstation ansible]$ ansible-playbook --syntax-check partition.yml 

playbook: partition.yml
[student@workstation ansible]$ ansible-playbook partition.yml

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/610790.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

一文搞定国民N32G435高负载串口通信

副标题&#xff1a;USRAT无硬件双缓冲条件下的软件双缓冲 一、前言 在单片机中&#xff0c;USART的通信一般都是最常用也最先去接触的串口外设&#xff0c;在一般的小数据量应用中一般不需要考虑USART串口&#xff08;以下简称为串口&#xff09;的高负载能力&#xff0c;比如…

第六十五天学习记录:高等数学:函数与极限(宋浩板书)

C语言学习后&#xff0c;曾为先学C还是数据结构纠结了半天。在看数据结构前言的时候&#xff0c;发现学习数据结构之前还需要一定的数学基础。虽然涉及到的数学基础不多&#xff0c;但想到以前大学高数&#xff0c;现代不是60分万岁就是不到80分&#xff0c;好像就概率论稍微了…

【Python】Python系列教程-- Python3 循环语句(十七)

文章目录 前言while 循环无限循环while 循环使用 else 语句简单语句组for 语句for...elserange() 函数break 和 continue 语句及循环中的 else 子句pass 语句 前言 往期回顾&#xff1a; Python系列教程–Python3介绍&#xff08;一&#xff09;Python系列教程–Python3 环境…

Treap C++代码实现

一、全部代码 #include <iostream> #include <cstdlib> #include <time.h>using namespace std;//Treap结构 struct TreapNode {TreapNode *pLeft, *pRight;int value, fix; };//左旋 void TreapLeftRotate(TreapNode* &pCur){//首先&#xff0c;找到当…

平衡树原理讲解

平衡树——Treap 文章目录 平衡树——TreapBST定义性质操作插入insert(o, v)删除del(o, v)找前驱 / 后继get_prev(o)、get_next(o)查找最大 / 最小值get_min(o)、get_max(o)求元素排名get_rank(o)查找排名为 k k k的元素get_value_by_rank 平衡树左旋、右旋zag(o)、zig(o)左旋右…

Vue路由(vue-router)详细讲解指南

Vue Router 是 Vue.js 官方的路由管理器。它和 Vue.js 的核心深度集成&#xff0c;让构建单页面应用变得易如反掌。路由实际上就是可以理解为指向&#xff0c;就是我在页面上点击一个按钮需要跳转到对应的页面&#xff0c;这就是路由跳转&#xff1b; 首先我们来学习三个单词&…

运维小白必学篇之基础篇第八集:LVM实验

LVM实验 实验一&#xff1a; 使用/dev/sdb磁盘完成以下操作&#xff1a; 1、创建5个物理卷&#xff0c;组成大小为10G的卷组vgtest 2、创建大小为3G的逻辑卷lv1&#xff0c;格式化xfs文件系统&#xff0c;实现开机自动挂载 3、为lv1逻辑卷扩容至5G&#xff0c;然后查看扩容之…

男子路遇“纸片鸟”,AI帮忙免惹祸

据报道&#xff0c;近日&#xff0c;河南洛阳一网友在路边偶遇一只“纸片鸟”&#xff0c;小鸟远看像一张纸片&#xff0c;样子十分奇特&#xff0c;而且还死死地盯着自己&#xff0c;像是求救&#xff0c;后来他用手机一查发现是二级保护动物“黄斑苇鳽”&#xff0c;便报警处…

排水管网监测预警系统:为城市排水建设提质增效

最近&#xff0c;城市生命线安全工程占据着行业的头条榜单&#xff0c;与民众生活密不可分的城市基础设施&#xff0c;包括城市的燃气、桥梁、供水、排水、供热、综合管廊等被称为城市生命线。城市生命线安全工程是城市更新和新型城市基础设施建设的重要内容&#xff0c;其主要…

数说故事×中广协丨广告代言人内容商业沙龙走进大湾区

以“娱时俱进&#xff0c;内容赋能”为主题的广告代言人内容商业沙龙&#xff08;大湾区站&#xff09;&#xff0c;近日在广州市白云区美湾广场成功举行。 沙龙由中国广告协会作为指导单位&#xff0c;广东省广告协会与中国广告协会广告代言人工作委员会联合主办&#xff0c;广…

机器视觉陶瓷板外观缺陷检测系统应用

随着科技的不断发展&#xff0c;机器视觉技术在工业领域的应用越来越广泛。其中&#xff0c;机器视觉陶瓷板外观缺陷检测系统是一项十分重要的技术。该系统利用计算机视觉技术对陶瓷板表面的缺陷进行自动化检测&#xff0c;大大提高了生产效率和产品质量。 机器视觉陶瓷板外观…

智能应用搭建平台——LCHub低代码表单 vs 流程表单 vs 仪表盘

1. LCHub低代码如何选择 「流程表单」:填报数据,并带有流程审批功能,适合报销、请假申请或其他工作流; 「表单」:填报数据,并带有数据协作功能,如修改、删除、导入、导出,并可以给不同的人不同的管理权限; 「仪表盘」:数据分析处理、结果展示功能,如数据汇总、趋…

如何实现Web3去中心化云计算的大规模采用?

随着区块链技术的迅猛发展&#xff0c;Web3去中心化云计算正在逐渐崭露头角。它以分布式、安全和透明的特点&#xff0c;为用户和企业提供了许多独特的优势。 然而&#xff0c;要实现Web3去中心化云计算的大规模采用&#xff0c;仍然面临着一些挑战。本文将探讨这些挑战&#x…

[EuroSys2023 Best Poster] 面向动态图的极低时延GNN推理采样服务

作者&#xff1a;沈雯婷 GraphLearn是阿里云机器学习平台PAI 团队和达摩院智能计算实验室图计算团队共建的工业界大规模图神经网络训练框架, 也是一站式图计算平台GraphScope的图学习引擎。GraphLearn最新开源了面向动态图的GNN在线推理实时采样服务(DGS)。DGS具备处理实时高吞…

端口占用解决报错:Web server failed to start. Port 8080 was already in use.

报错信息如下: Description: Web server failed to start.Port 8080 was already in use. Action: Identify and stop the process thats listening on port 8080 or configure this application to listen on another port. 当idea项目启动时报这个错&#xff0c;意思是端…

2019年一月联考逻辑真题

2019年一月联考逻辑真题 三、逻辑推理&#xff1a;第 26&#xff5e;55 小题&#xff0c;每小题 2 分&#xff0c;共 60 分。下列每题给出的 A、B、C、D、 E 五个选项中&#xff0c;只有一项是符合试题要求的。请在答题卡上将所选项的字母涂黑。 真题&#xff08;2019-26&#…

【数据结构】虽然很难很抽象,但是你还是得努力弄懂的数据结构——链表,基本上你每一段代码都可能会用到

链表解决了顺序表插入或删除元素麻烦的问题&#xff0c;链表的存储结构是用一组任意的存储单元来存放线性表的数据元素&#xff0c;这组存储单元可以是连续的&#xff0c;也可以是不连续的。 对每个数据元素ai&#xff0c;除了存储其本身的信息之外&#xff0c;还需存储一个指…

【Vue】详解Vue生命周期

Vue实例的生命周期全过程&#xff08;图&#xff09; &#xff08;这里的红边圆角矩形内的都是对应的Vue实例的钩子函数&#xff09; 在beforeCreate和created钩子函数间的生命周期 在beforeCreate和created之间&#xff0c;进行数据观测(data observer) &#xff0c;也就是在这…

港联证券投资前瞻:新能源汽车再迎助力 科技巨头持续加注机器人领域

上周五&#xff0c;A股主要股指全线走高&#xff0c;沪指涨近1%&#xff0c;上证50指数涨近2%。截至收盘&#xff0c;沪指涨0.79%报3230.07点&#xff0c;深成指涨1.5%报10998.08点&#xff0c;创业板指涨1.22%报2233.27点&#xff0c;上证50指数涨1.73%&#xff1b;两市合计成…

圆梦,终于进阿里了,分享面试题

前面我说过&#xff1a;能去大厂就去大厂&#xff0c;有机会就去争取&#xff0c;年纪轻轻的&#xff0c;多努力就完事了。 总有黑粉怼我&#xff1a;进大厂哪有你说的那么简单&#xff0c;呵呵…… 我笑而不语&#xff0c;你自己都不相信自己&#xff0c;还怎么进&#xff1…