考点一:超户密码修改--->详情见https://mp.csdn.net/mdeditor/86634793#
1.修改命令启动行:rw rd.break
2.启动后,修改root用户密码:chroot /sysroot/ ----> echo modtweed | passwd --stdin root
3.创建文件:touch /.autorelabel
4.两次退出
【注意】:创建文件时,文件名称不能补齐,必须记住。
考点二:修改主机名称
hostnamectl set-hostname 主机名称 ##更改主机名称
hostname ##查看主机名称
考点三:配置网络
1.查看网卡:ifconfig
2.设置网络:nmtui
3.查看网关:route -n
4.查看dns:cat /etc/resolv.conf
设置网络:
(删除旧的,添加新的)
(设置网络)
【注意】:如果不输入ip后“/24”,系统会自动补为“/32”;这时,物理机在连接虚拟机时,就会连接不上。
考点四:设置SELinux
vim /etc/sysconfig/selinux
SELINUX=enforcing / disabled ##设置selinux打开或关闭
getenforce ##查看selinux状态
(设置完后,重启虚拟机)
考点五:升级内核版本
1.下载内核版本:wget http://172.25.1.254/update/kernel-3.10.0-123.1.2.el7.x86_64.rpm
2.解压包:rpm -ivh kernel-3.10.0-123.1.2.el7.x86_64.rpm
3.查看内核启动序号:vim /boot/grub2/grub.cfg (顺序为0,1,2,……)
4.设置系统默认启动内核:grub2-set-default 0
5.重启系统:reboot
6. 查看内核版本:uname -r
考点六:配置私人yum源 --->详情见https://mp.csdn.net/postedit/86556372
1.查看本地yum源:
[root@server1 ~]# cd /etc/yum.repos.d/ [root@server1 yum.repos.d]# ls westos.repo
2.删除原有的,创建新的yum源:
[root@server1 yum.repos.d]# rm -fr * [root@server1 yum.repos.d]# ls [root@server1 yum.repos.d]# vim exam.repo [exam] name=exam baseurl=http://content.example.com/rhel7.0/x86_64/dvd gpgcheck=0
3.清除本地yum源缓存:
[root@server1 yum.repos.d]# yum clean all Loaded plugins: langpacks Cleaning repos: exam Cleaning up everything
4.列出yum源信息:
[root@server1 yum.repos.d]# yum repolist Loaded plugins: langpacks exam | 4.1 kB 00:00 (1/2): exam/group_gz | 134 kB 00:00 (2/2): exam/primary_db | 3.4 MB 00:00 repo id repo name status exam exam 4,305 repolist: 4,305
考点七:调整逻辑卷
###1.缩减:ext4格式###
1.查看文件系统挂载大小:
[root@server1 ~]# df -H Filesystem Size Used Avail Use% Mounted on /dev/vda1 11G 3.4G 7.5G 31% / devtmpfs 481M 0 481M 0% /dev tmpfs 497M 0 497M 0% /dev/shm tmpfs 497M 14M 484M 3% /run tmpfs 497M 0 497M 0% /sys/fs/cgroup /dev/mapper/vg0-vo 496M 2.5M 463M 1% /home
2.卸载:umount /home/
3.查看挂载:df
4.检测文件系统:
[root@server1 ~]# e2fsck -f /dev/mapper/vg0-vo e2fsck 1.42.9 (28-Dec-2013) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information /dev/mapper/vg0-vo: 34/126976 files (0.0% non-contiguous), 26589/507904 blocks [只要没有报错,就算没问题]
5.缩小文件系统:
[root@server1 ~]# resize2fs /dev/mapper/vg0-vo 230M resize2fs 1.42.9 (28-Dec-2013) Resizing the filesystem on /dev/mapper/vg0-vo to 235520 (1k) blocks. The filesystem on /dev/mapper/vg0-vo is now 235520 blocks long.
6.缩小设备:
[root@server1 ~]# lvreduce -L 230M /dev/vg0/vo Rounding size to boundary between physical extents: 232.00 MiB WARNING: Reducing active logical volume to 232.00 MiB THIS MAY DESTROY YOUR DATA (filesystem etc.) Do you really want to reduce vo? [y/n]: y Reducing logical volume vo to 232.00 MiB Logical volume vo successfully resized
7.挂载:mount -a
8.查看挂载大小:
[root@server1 ~]# df -H Filesystem Size Used Avail Use% Mounted on /dev/vda1 11G 3.4G 7.5G 31% / devtmpfs 481M 0 481M 0% /dev tmpfs 497M 0 497M 0% /dev/shm tmpfs 497M 14M 484M 3% /run tmpfs 497M 0 497M 0% /sys/fs/cgroup /dev/mapper/vg0-vo 226M 2.2M 207M 2% /home
(分区大小很少能够完全符合要求的大小,所以在 区间内就可以)
###2.热拉伸:不用卸载
##1)ext4格式:
1.查看文件系统挂载大小:df -H
2.查看文件系统格式:
[root@server1 ~]# blkid /dev/vda1: UUID="9bf6b9f7-92ad-441b-848e-0257cbb883d1" TYPE="xfs" /dev/vdb1: UUID="SIaPf4-OdHu-OzAW-NlQG-vZ3D-X8ZO-1FK3Ih" TYPE="LVM2_member" /dev/mapper/vg0-vo: UUID="12294be2-bdad-4817-b162-038e22313d9f" TYPE="ext4" (查看格式)
3.拉伸设备:
[root@server1 ~]# lvextend -L 300M /dev/vg0/vo Extending logical volume vo to 300.00 MiB Logical volume vo successfully resized
4.拉伸文件到充满设备:
[root@server1 ~]# resize2fs /dev/vg0/vo resize2fs 1.42.9 (28-Dec-2013) Filesystem at /dev/vg0/vo is mounted on /home; on-line resizing required old_desc_blocks = 2, new_desc_blocks = 3 The filesystem on /dev/vg0/vo is now 307200 blocks long.
##2)xfs格式:
1.拉伸设备:lvextend -L 300M /dev/vg0/vo
2.拉伸文件到设备:xfs_growfs /dev/vg0/vo
考点八:创建用户 --->详情见https://mp.csdn.net/mdeditor/85646295#
1.创建组:groupadd 组名
2.创建用户:
useradd -G 组名 用户名 ##创建从属组用户 useradd -s /sbin/nologin 用户名 ##创建(在系统汇总没有可以交互的 shell)用户 useradd -u 用户id 用户名 ##创建指定id的用户
3.设置用户密码:echo 密码 | passwd --stdin 用户名
考点九:文件权限
1.拷贝文件: cp 被拷贝文件 文件
2.查看文件属性:ll 文件 (查看文件所有者,所属组,权限)
补充:修改文件所有者: chown 用户 文件
修改文件所属组: chgrp 用户 文件
3.设置其他用户对文件的权限:
[root@server1 ~]# setfacl -m u:natasha:rw /var/tmp/fstab ##用户 natasha 能够对文件/var/tmp/fstab/具有读写权限 [root@server1 ~]# setfacl -m u:harry:0 /var/tmp/fstab ##用户 harry 对文件/var/tmp/fstab 既不能读也不能写
4.查看文件的所有权限:
[root@server1 ~]# getfacl /var/tmp/fstab getfacl: Removing leading '/' from absolute path names # file: var/tmp/fstab # owner: root # group: root user::rw- user:natasha:rw- user:harry:--- group::r-- mask::rw- other::r--
考点十:配置 cron 任务
用户 natasha 必须配置一个定时任务,每天在本地时间 14:23 时执行命令/bin/echo hiya
1.查看服务状态:
systemctl status crond.service ##注意服务不是开机自启的话一定要设置开机自启 systemctl enable crond.service
2.创建定时任务:
[root@server1 ~]# crontab -e -u natasha no crontab for natasha - using an empty one crontab: installing new crontab ##内容: 23 14 * * * /bin/echo hiya ##解释:分 时 每月中的第几天 月 每一周的第几天 执行操作
3.查看任务是否设置成功:(两种方法)
[root@server1 ~]# cat /var/spool/cron/natasha 23 14 * * * /bin/echo hiya [root@server1 ~]# crontab -u natasha -l 23 14 * * * /bin/echo hiya
考点十一:创建共享目录
1.创建一个共享目录/home/managers:mkdir -p /home/managers
2.设置目录的所有者为sysmgrs:chgrp sysmgrs /home/managers/
3.设置sysmgrs 组成员对目录有读写和执行的权限。除此之外的其他所有用户没有任何权限(root 用户除外):
[root@server1 ~]# chmod 770 /home/managers/ [root@server1 ~]# ll -d /home/managers/ ##查看目录权限 drwxrwx---. 2 root sysmgrs 1024 Jun 20 02:44 /home/managers/
4.在/home/managers 目录中创建的文件,其组所有权会自动设置为属于 sysmgrs组:
[root@server1 ~]# chmod g+s /home/managers/ [root@server1 ~]# cd /home/managers/ [root@server1 managers]# ls [root@server1 managers]# touch file [root@server1 managers]# ll total 1 -rw-r--r--. 1 root sysmgrs 0 Jun 27 00:11 file [root@server1 managers]# rm -fr file [root@server1 managers]# cd
考点十二:配置 ntp
配置您的系统,让其作为一个 classroom.example.com 的 ntp 客户端
1.查看服务状态:systemctl status chronyd.service (服务开启,开机自启)
2.修改配置文件:
[root@server1 ~]# vim /etc/chrony.conf server classroom.example.com iburst
3.重启服务:systemctl restart chronyd.service
4.查看时间是否同步:
[root@server1 ~]# chronyc sources -v 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 || / 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 37 4 -52us[ -28ms] +/- 124us
【注意】:如果上述操作完成后,显示“^?”,说明还是没有时间同步成功,可以通过多次重启时间服务,查看是否同步;
如果还是没有同步成功,那么查看时区是否一致。
考点十三:ldap 验证服务
a) 绑定到外部ldap验证服务,由系统classroom.example.com 提供
b) 账户信息和验证信息都是 ldap 提供,验证服务器 dn 是:dc=example,dc=com
c) 需要使用的证书进行加密,证书可以在下面的链接中下载:
http://classroom.example.com/pub/example-ca.crt
d) 当正确完成配置后,用户 ldapuser1 应该能够登陆到您的系统中,但是没有家目录解答:
1.安装包:yum install -y sssd authconfig-gtk
2.配置ldap服务:authconfig-gtk
3.检测用户是否存在:grep ldapuser1 /etc/passwd
4.切换用户,查看家目录:
[root@server1 ~]# su - ldapuser1 su: warning: cannot change directory to /home/guests/ldapuser1: No such file or directory mkdir: cannot create directory '/home/guests': Permission denied -bash-4.2$
考点十四:配置 autofs
a) 配置 autofs 实现 ldap 用户家目录自动挂载
b) Classroom.example.com通过 nfs 输出/home/guests 目录到您的系统目录中(包含了用户 ldapuser1 的主目录)
c) ldapuser1 的家目录应该挂载到本地的/home/guests/ldapuser1 目录下并且读写挂载,nfs挂载版本为3
d) 用户对其家目录必须可以写
e) ldapuser1 用户密是 password解答:
1.安装包,启动服务并开机自启:
[root@server1 ~]# yum install -y autofs [root@server1 ~]# systemctl start autofs [root@server1 ~]# systemctl enable autofs.service ln -s '/usr/lib/systemd/system/autofs.service' '/etc/systemd/ system/multi-user.target.wants/autofs.service'
2.查看ldapuser1用户:
[root@server1 ~]# getent passwd ldapuser1 ldapuser1:*:1701:1701:LDAP Test User 1:/home/guests/ldapuser1:/bin/bash
3.编辑配置文件:
[root@server1 ~]# vim /etc/auto.master /home/guests /etc/auto.ldap [root@server1 ~]# vim /etc/auto.ldap ldapuser1 -rw,vers=3 classroom.example.com:/home/guests/ldapuser1
4.重启服务:systemctl restart autofs.service
5.切换用户查看挂载:
[root@server1 ~]# su - ldapuser1 Last login: Thu Jun 20 03:26:35 EDT 2019 on pts/0 [ldapuser1@server1 ~]$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda1 10473900 3543116 6930784 34% / devtmpfs 464528 0 464528 0% /dev tmpfs 484920 0 484920 0% /dev/shm tmpfs 484920 12696 472224 3% /run tmpfs 484920 0 484920 0% /sys/fs/cgroup /dev/mapper/vg0-vo 289171 2132 268383 1% /home classroom.example.com:/home/guests/ldapuser1 10473984 3534080 6939904 34% /home/guests/ldapuser1 [ldapuser1@server1 ~]$ su - ldapuser1 Password: Last login: Thu Jun 20 04:13:27 EDT 2019 on pts/0 [ldapuser1@server1 ~]$ logout [ldapuser1@server1 ~]$ logout
考点十五:添加 swap 分区---->详情见https://mp.csdn.net/postedit/86883012
在系统中添加一个大小为 756M 的 swap 分区,当系统启动时,swap可以自动挂载
1.查看网卡:
[root@server1 ~]# fdisk -l Disk /dev/vda: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x00013f3e Device Boot Start End Blocks Id System /dev/vda1 * 2048 20970332 10484142+ 83 Linux Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x09ee18d7 Device Boot Start End Blocks Id System /dev/vdb1 2048 1026047 512000 8e Linux LVM Disk /dev/mapper/vg0-vo: 314 MB, 314572800 bytes, 614400 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
2.建立分区:
[root@server1 ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n ##新建 Partition type: p primary (1 primary, 0 extended, 3 free) e extended Select (default p): Using default response p Partition number (2-4, default 2): First sector (1026048-20971519, default 1026048): Using default value 1026048 Last sector, +sectors or +size{K,M,G} (1026048-20971519, default 20971519): +756M ##指定大小 Partition 2 of type Linux and of size 756 MiB is set Command (m for help): t ##指定分区格式 Partition number (1,2, default 2): 2 Hex code (type L to list all codes): 82 (swap格式) Changed type of partition 'Linux' to 'Linux swap / Solaris' Command (m for help): p ##查看 Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x09ee18d7 Device Boot Start End Blocks Id System /dev/vdb1 2048 1026047 512000 8e Linux LVM /dev/vdb2 1026048 2574335 774144 82 Linux swap / Solaris Command (m for help): wq ##保存退出 The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.
3.同步分区列表:partprobe
4.格式化分区:
[root@server1 ~]# mkswap /dev/vdb2 Setting up swapspace version 1, size = 774140 KiB no label, UUID=db9604bd-4df3-4341-a283-60ecc0b3c4e3
5.设置自动挂载:
[root@server1 ~]# vim /etc/fstab /dev/vdb2 swap swap defaults 0 0
6.查看swap挂载:
[root@server1 ~]# swapon -a ##刷新 [root@server1 ~]# swapon -s ##查看 Filename Type Size Used Priority /dev/vdb2 partition 774140 0 -1
【注意】:如果已经有3个分区了,那么,从第4个开始设置为扩展分区。
考点十六:查找文件
找出所有用户为 jacques 的文件,并且把他们的拷贝放到/root/findfiles 目录中
1.新建目录:mkdir -p /root/findfiles
2.查找文件并导入:
[root@server1 ~]# find / -user jacques -exec cp -rp {} /root/findfiles/ \; find: ‘/proc/3137/task/3137/fd/6’: No such file or directory find: ‘/proc/3137/task/3137/fdinfo/6’: No such file or directory find: ‘/proc/3137/fd/6’: No such file or directory find: ‘/proc/3137/fdinfo/6’: No such file or directory cp: cannot overwrite non-directory ‘/root/findfiles/jacques’ with directory ‘/home/jacques’
3.查看目录:
[root@server1 ~]# ll /root/findfiles total 8 drwxr-xr-x. 2 jacques jacques 6 Jan 26 2014 extensions -rw-r--r--. 1 jacques jacques 4 Jul 10 2014 gnome-initial-setup-done -rw-rw----. 1 jacques mail 0 Jun 19 23:54 jacques -rw-r--r--. 1 jacques jacques 1443 Jul 10 2014 monitors.xml drwxr-xr-x. 2 jacques jacques 6 Jan 26 2014 plugins
考点十七:查找字符串
a)在文件/usr/share/xml/iso-codes/iso_639_3.xml 中查找到所有包含字符 ng 的行
b)将找出的行按照先后顺序复制到/root/list 文件中,/root/list 文件不要包含空行
c)所有行的内容必须为文件中原始的标准副本1.查找内容并导入文件:grep ng /usr/share/xml/iso-codes/iso_639_3.xml > /root/list
2.编辑副本文件:
vim /root/list :%s/^I//g (:%s/ctrl+v+ctrl+i//g) ##删除tab键产生的空格 :%s/^ *//g ##删除开头的空格
考点十八:归档文件---->详情见https://mp.csdn.net/postedit/86548462
#########gz格式:
[root@server1 ~]# tar zcf /root/backup.tar.gz /usr/local
tar: Removing leading `/' from member names
[root@server1 ~]# ll /root/backup.tar.gz
-rw-r--r--. 1 root root 1943 Jun 20 04:39 /root/backup.tar.gz
#########bz2格式:
[root@server1 ~]# tar jcf /root/backup.tar.bz2 /usr/local
tar: Removing leading `/' from member names
[root@server1 ~]# ll /root/backup.tar.bz2
-rw-r--r--. 1 root root 1878 Jun 20 04:40 /root/backup.tar.bz2
#########xz格式:
[root@server1 ~]# tar Jcf /root/backup.tar.xz /usr/local
tar: Removing leading `/' from member names
[root@server1 ~]# ll /root/backup.tar.xz
-rw-r--r--. 1 root root 1816 Jun 20 04:42 /root/backup.tar.xz
[root@server1 ~]# file /root/backup.tar*
/root/backup.tar.bz2: bzip2 compressed data, block size = 900k
/root/backup.tar.gz: gzip compressed data, from Unix, last modified: Thu Jun 20 04:39:13 2019
/root/backup.tar.xz: XZ compressed data
考点十九:创建逻辑卷---->详情见https://mp.csdn.net/postedit/87173740
a)创建一个逻辑卷,qagroup 卷组中的逻辑卷物理扩展单元为 16M
b)逻辑卷名称为 qa,属于 qagroup 卷组,并且逻辑卷的大小为 60 个物理扩展单元
c)使用 ext3 文件系统格式并且自动挂载到/mnt/qa 目录下
解答:1.创建一个逻辑卷:
[root@server1 ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition type: p primary (2 primary, 0 extended, 2 free) e extended Select (default p): Using default response p Partition number (3,4, default 3): First sector (2574336-20971519, default 2574336): Using default value 2574336 Last sector, +sectors or +size{K,M,G} (2574336-20971519, default 20971519): +1G Partition 3 of type Linux and of size 1 GiB is set Command (m for help): t Partition number (1-3, default 3): 3 Hex code (type L to list all codes): 8e ##LVM 格式 Changed type of partition 'Linux' to 'Linux LVM' Command (m for help): p Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x09ee18d7 Device Boot Start End Blocks Id System /dev/vdb1 2048 1026047 512000 8e Linux LVM /dev/vdb2 1026048 2574335 774144 82 Linux swap / Solaris /dev/vdb3 2574336 4671487 1048576 8e Linux LVM Command (m for help): wq The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 16: Device or resource busy. The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8) Syncing disks.
(如果新建n后,出现e,说明使用的是拓展分区,则直接一路回车创建扩展分区,
然后n,回车,1G,t,5,8e,p,wq)2.同步分区表:partprobe
3.将物理分区转化为物理卷:
[root@server1 ~]# pvcreate /dev/vdb3 Physical volume "/dev/vdb3" successfully created [root@server1 ~]# pvs PV VG Fmt Attr PSize PFree /dev/vdb1 vg0 lvm2 a-- 496.00m 196.00m /dev/vdb3 lvm2 a-- 1.00g 1.00g
4.将物理卷添加到物理卷组:
[root@server1 ~]# vgcreate qagroup /dev/vdb3 -s 16M Volume group "qagroup" successfully created
5.从物理卷组拿出一部分为逻辑卷:
[root@server1 ~]# lvcreate -l 60 -n qa qagroup Logical volume "qa" created
6.格式化逻辑卷:
root@server1 ~]# mkfs.ext3 /dev/qagroup/qa mke2fs 1.42.9 (28-Dec-2013) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 61440 inodes, 245760 blocks 12288 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=251658240 8 block groups 32768 blocks per group, 32768 fragments per group 7680 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376 Allocating group tables: done Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done
(也可以格式化为ext4格式【mkfs.ext4】,xfs格式【mkfs.xfs】,vfat格式【mkfs.vfat】 等等)
7.查看格式:
[root@server1 ~]# blkid /dev/vda1: UUID="9bf6b9f7-92ad-441b-848e-0257cbb883d1" TYPE="xfs" /dev/vdb1: UUID="SIaPf4-OdHu-OzAW-NlQG-vZ3D-X8ZO-1FK3Ih" TYPE="LVM2_member" /dev/vdb2: UUID="db9604bd-4df3-4341-a283-60ecc0b3c4e3" TYPE="swap" /dev/vdb3: UUID="7KvDRB-exJK-9Ose-NQsF-ahxk-6GFH-ZtOFfu" TYPE="LVM2_member" /dev/mapper/vg0-vo: UUID="12294be2-bdad-4817-b162-038e22313d9f" TYPE="ext4" /dev/mapper/qagroup-qa: UUID="c29a9cd7-1a58-4eac-9c3e-88f1f0f52d40" SEC_TYPE="ext2" TYPE="ext3"
8.创建挂载目录:mkdir /mnt/qa
9.设置开机自启:
[root@server1 ~]# vim /etc/fstab /dev/qagroup/qa /mnt/qa ext3 defaults 0 0
(在格式处改为ext4或xfs即可)
10.挂载并查看:
[root@server1 ~]# mount -a ##挂载 [root@server1 ~]# df ##查看挂载 Filesystem 1K-blocks Used Available Use% Mounted on /dev/vda1 10473900 3543224 6930676 34% / devtmpfs 464528 0 464528 0% /dev tmpfs 484920 0 484920 0% /dev/shm tmpfs 484920 12712 472208 3% /run tmpfs 484920 0 484920 0% /sys/fs/cgroup /dev/mapper/vg0-vo 289171 2147 268368 1% /home /dev/mapper/qagroup-qa 951192 1224 884432 1% /mnt/qa
考试心得:
1)考试时如果遇到问题,不能及时解决,不要慌;只要平时练习到位,大不了,从新再做一遍。
2)考试时,注意看题目要求,不要误把练习当考试。
3)做完之后要复查,看看重启后会不会有不一样的情况出现。
祝愿大家考试都能顺利通过!!!