RHCSA 2.0 Speed Run
1. Set/Reset root password, Network, Hostname
- Password:
tianyun
- Hostname:
serverX.example.com
- Network
- IP address:
172.25.X.11/24
- IP gateway:
172.25.X.254
- DNS:
172.25.254.254
- Press
e
to edit grub menu
- Change
linux16 ... ro
to linux16 rw rd.break enforcing=0
- Open terminal
2. Set SELinux to enforcing
3. Set default yum repository
http://content.example.com/rhel7.0/x86_64/dvd
vim /etc/yum.repos.d/DVD.repo
5. Users, groups, supplementary groups, default shell
- Group
adminuser
- Users
natasha
, harry
belong to adminuser
- User
sarah
has no login shell
- All users' password is
tianyun
6. Set files, directories permission, ACL permission
- Copy
/etc/fstab
to /var/tmp/fstab
- User and group are
root
- No one can execute
- User
natasha
can read and write
- User
harry
has no permission
- Other user can read
- User
natasha
execute /bin/echo hello
at 14:20 everyday
cron -u natasha -e
20 14 * * * /bin/echo hello
- Create shared directory
/home/admins
belongs to group adminuser
- Group
adminuser
can read, write, and execute
- Other users have no permission
- All files created in
/home/admins
will belongs to group adminuser
automatically
9. Upgrade kernel and guarantee that grub boot it by default
- yum repository:
http://content.example.com/rhel7.0/x86_64/errata
vim /etc/yum.repos.d/kernel.repo
- install kernel:
yum install kernel
10. Use LDAP to authenticate local users
- LDAP server:
classroom.example.com
- LDAP base DN:
dc=example,dc=com
- Root CA:
http://classroom.example.com/pub/example-ca.crt
- NTP server:
classroom.example.com
13. Create user jack
, uid is 2000
14. Create a new 512M swap, swap on when booting
15. Find all files belong to alice
. And copy the files to /findfiles
16. Find all lines contain seismic
in /usr/share/dict/words
. And copy the output to /root/filelists
orderly.
grep seismic /usr/share/dict/words > /root/filelist
17. Archive and compress /etc
to /root/backup.tar.bz2
. Use bzip2
compression method.
tar cjf /root/backup.tar.bz2 /etc