[root@localhost 桌面]# cat /etc/redhat-release 

CentOS Linux release 7.2.1511 (Core) 

[root@localhost ~]# chmod +x rhceexam_install.sh 

[root@localhost ~]# ./rhceexam_install.sh 

[root@server zhaopan]# mv host.img station.img /var/lib/libvirt/p_w_picpaths/



[root@server yum.repos.d]# umount /dev/cdrom

放入7.0光盘

[root@server yum.repos.d]# mount -a

[root@server yum.repos.d]# virt-manager

添加虚拟机host和station

启动station系统,进入系统没有密码需要重启系统,进入系统修改密码

修改root密码进入内核选项,选第一个按e进入linux16倒数第二行后面插入(7.0需要删除rhgb quiet)init=/bin/sh ->mount -o remount,rw /  ->echo 需要修改的密码|passwd --stdin root ->touch /.autorelabel ->exec /sbin/init


systemctl isolate graphical.target 考试时启动图形界面

systemctl set-default graphical.target 开机自动启动(默认启动图形)



hostnamectl set-hostname station.rhce.cc

[root@station ~]# nmcli connection add type ethernet con-name eth0 ifname eth0

[root@station ~]# nmcli connection modify eth0 ipv4.addresses "192.168.122.100/24"

[root@station ~]# nmcli connection modify eth0 ipv4.dns 192.168.122.10

[root@station ~]# nmcli connection modify eth0 ipv4.gateway "192.168.122.1"

[root@station ~]# nmcli connection modify eth0 ipv4.method manual

[root@station ~]# nmcli connection modify eth0 ipv4.gateway "192.168.122.1"

[root@station ~]# systemctl restart network

[root@station ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

GATEWAY=192.168.122.1

reboot

[root@station ~]# host station

station.rhce.cc has address 192.168.122.100

[root@station ~]# ping host.rhce.cc


[root@station ~]# systemctl restart network

1.

[root@station ~]# getenforce 

Permissive

[root@station ~]# setenforce 1

[root@station ~]# getenforce 

Enforcing

root@station ~]# vim /etc/selinux/config 

SELINUX=enforcing

2.

[root@station ~]# vim /etc/yum.repos.d/aa.repo

[aa]

name=aa

baseurl=ftp://server.rhce.cc/dvd

enabled=1

gpgcheck=0

3.

[root@station ~]# lvscan

  ACTIVE            '/dev/vg0/vo' [192.00 MiB] inherit

[root@station ~]# lvextend -L +98M /dev/vg0/vo

[root@station ~]# lvscan

[root@station ~]# df -hT

ot@station ~]# xfs_growfs /home/

[root@station ~]# resize2fs /dev/mapper/vg0-vo (ext4专用)

4.

[root@station ~]# groupadd adminuser

[root@station ~]# useradd -G adminuser natasha

[root@station ~]# useradd -G adminuser harry

[root@station ~]# useradd -s /sbin/nologin sarah

[root@station ~]# echo redhat |passwd --stdin natasha

[root@station ~]# echo redhat |passwd --stdin harry

[root@station ~]# echo redhat |passwd --stdin sarah

5.

[root@station ~]# cp /etc/fstab /var/tmp/fstab

[root@station ~]# ls -l /var/tmp/fstab

[root@station ~]# setfacl -m u:natasha:rw- /var/tmp/fstab 

[root@station ~]# setfacl -m u:harry:--- /var/tmp/fstab 

6.

ot@station ~]# crontab -e -u natasha

23 14 * * * /bin/echo hiya

[root@station ~]# crontab -l -u natasha

23 14 * * * /bin/echo hiya

7.

[root@station ~]# mkdir /home/admins

root@station ~]# chgrp adminuser /home/admins

[root@station ~]# chmod g+s /home/admins/

8.

[root@station ~]# firefox http://rhgls.rhce.cc/pub/updates

[root@station ~]# rpm -ivh kernel-3.10.0-229.el7.x86_64.rpm 

9.

[root@station ~]# yum list auth*

[root@station ~]# yum -y install authconfig-gtk.x86_64

[root@station ~]# authconfig-gtk &

[root@station ~]# yum -y install nss-pam-ldapd

10.

[root@station ~]# yum -y install system-config-date

11.

[root@station ~]# yum -y install autofs

[root@station ~]# vim /etc/auto.master

#(/misc   /etc/auto.misc)

/-      /etc/auto.aa

[root@station ~]# cp /etc/auto.misc /etc/auto.aa

[root@station ~]# vim /etc/auto.aa 

#(cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom)

/home/guests/ldapuser11 -fstype=nfs,rw  host.rhce.cc:/home/guests/ldapuser11

[root@station ~]# systemctl start autofs

[root@station ~]# systemctl enable autofs

12.

[root@station ~]# useradd -u 3400 alex

[root@station ~]# echo redhat |passwd --stdin alex

13.

[root@station ~]# swapon -s

[root@station ~]# fdisk /dev/vda

N   T

e   82

5

+512M

[root@station ~]# mkswap /dev/vda5

[root@station ~]# swapon /dev/vda5

[root@station ~]# swapon -s

[root@station ~]# vim /etc/fstab 

/dev/vda5       swap    swap    defaults        0       0

14.

[root@station ~]# mkdir /root/findresults

[root@station ~]# find / -user ira

[root@station ~]# find / -user ira -exec cp -a {} /root/findresults/ \;

15.

[root@station ~]# grep seismic /usr/share/dict/words 

[root@station ~]# grep seismic /usr/share/dict/words > /root/lines

16.

[root@station local]# tar jcvf /root/backup.tar.bz2 *

[root@station ~]# yum -y install bzip2.x86_64

[root@station ~]# tar jxvf backup.tar.bz2 -C /opt/

[root@station ~]# ls -l /opt/

17.

[root@station ~]# fdisk /dev/vda

N     T

6     8e

+1G

[root@station ~]# partprobe /dev/vda

[root@station ~]# pvcreate /dev/vda6

[root@station ~]# vgcreate -s 16 datastore /dev/vda6

[root@station ~]# lvcreate -n database -l 50 datastore

[root@station ~]# mkfs.ext3 /dev/datastore/database 

[root@station ~]# mkdir /mnt/database

[root@station ~]# vim /etc/fstab 

/dev/datastore/database /mnt/database   ext3    defaults        0       0

[root@station ~]# df -h