LAB
1. Nis
#authconfig-tui (加入nis server: server1.example.com)
%因沒有nis server,無法實作
#getent passwd (如果有查到代表成功~)
目前分類:RH133 (30)
- Aug 09 Sun 2009 14:59
[雜記]RHCE筆記整理-RH133-Unit8(2)
- Aug 09 Sun 2009 14:19
[雜記]RHCE筆記整理-RH133-Unit8(1)
Advanced User Administration
1.Network Users (NIS, LDAP, Winbind, SMB)
#authconfig-tui (加入nis server) [圖形介面: #system-config-authentication]
Configuration file: /etc/nsswitch.conf
#getent passwd(查users)
2.ACLs(Access Control Lists)
- Aug 09 Sun 2009 14:08
[雜記]RHCE筆記整理-RH133-Unit6(2)
LAB
1.create accounts
for user in joshua alex dax
do
useradd $user
echo 'passowrd' |passwd --stdin $user
done
2. create groups
- Aug 09 Sun 2009 13:39
[雜記]RHCE筆記整理-RH133-Unit6(1)
User Administration
%user's home directories get populated with the files from "/etc/skel/*"
1. Command:
(1)user administration
#useradd [options] username
- Aug 09 Sun 2009 12:34
[雜記]RHCE筆記整理-RH133-Unit9(5)
LAB
%add a new partion and set to LVM
1. create LVM (partition type: 8e)
[root@server1 ~]# pvcreate /dev/sdb8
Physical volume "/dev/sdb8" successfully created
[root@server1 ~]# vgcreate vg0 /dev/sdb8
- Aug 09 Sun 2009 12:01
[雜記]RHCE筆記整理-RH133-Unit9(4)
LAB
%Raid ( a disk fail)
1.create raid5
#mdadm -C /dev/md0 -l 5 -n 3 /dev/sdb{5,6,7}
#mkfs.ext3 /dev/md0
#cat /proc/mdstat
- Aug 09 Sun 2009 11:53
[雜記]RHCE筆記整理-RH133-Unit9(3)
LAB:
Raid
1. create raid1
Disk /dev/sdb: 3253 MB, 3253469184 bytes
101 heads, 62 sectors/track, 1014 cylinders
Units = cylinders of 6262 * 512 = 3206144 bytes
- Aug 04 Tue 2009 00:05
[雜記]RHCE筆記整理-RH133-Unit9(2)
(2) Creating Logical Volumes
1. fdisk /dev/sdb (Partition Type: 8e)
2. pvcreate /dev/sdb2
3. vgcreate vg0 /dev/sdb2
4. lvcreate -L 100M -n data vg0
5. mkfs.ext3 /dev/vg0/data
%check
#pvs
- Aug 03 Mon 2009 23:43
[雜記]RHCE筆記整理-RH133-Unit9(1)
Advanced Filesystem Management
Tools:
#tar
#dump
#restore
Ex:
dump -0u -f /dev/nst0 /dev/hda2
- Aug 03 Mon 2009 23:21
[雜記]RHCE筆記整理-RH133-Unit5(3)
LAB
%create a new filesystem
#fdisk -l /dev/sdb
Disk /dev/sdb: 3253 MB, 3253469184 bytes
101 heads, 62 sectors/track, 1014 cylinders
Units = cylinders of 6262 * 512 = 3206144 bytes
- Aug 03 Mon 2009 23:09
[雜記]RHCE筆記整理-RH133-Unit5(2)
Mounting NFS Filesystems
(1)掛載 /etc/fstab
#vi /etc/fstab
%add
#server1:/var/ftp/pub/RHEL5 /mnt/server1 nfs defaults,noauto 0 0
%remount
#mount -a
- Jul 21 Tue 2009 23:59
[雜記]RHCE筆記整理-RH133-Unit5(1)
Filesystem
entry in #/etc/fstab
partitions
-------------------------
5(or f)--Extended
82 --linux swap
83 --linux (ext2, ext3)
8e --linux LVM
- Jul 21 Tue 2009 23:44
[雜記]RHCE筆記整理-RH133-Unit4(7)
Lab
1. using cron
job runs every ten minutes today between the hours of 0800 and 1700
#crontab -e
*/10 8-17 * * * /usr/bin/free
#Mail to user
- Jul 21 Tue 2009 23:24
[雜記]RHCE筆記整理-RH133-Unit4(6)
Cron
#crontab [-u user] file
#crontab [-l | -r | -e]
restrict allow user
/etc/cron.allow (預設不存在, all user都允許, 除非黑名單deny, 才不允許使用)
/etc/cron.deny
- Jul 21 Tue 2009 23:12
[雜記]RHCE筆記整理-RH133-Unit4(5)
CUPS
config file: /etc/cups/cupsd.conf, /etc/cups/printers.conf
config tool: system-config-printer
1.使用#system-config-printer 設定印表機
因測試需要設定二台
- Jul 21 Tue 2009 23:06
[雜記]RHCE筆記整理-RH133-Unit4(4)
NTP: Network Time Protocol
config file: /etc/ntp.conf
config tool: #system-config-date
#vi /etc/ntp.conf
---略---
- Jul 21 Tue 2009 22:58
[雜記]RHCE筆記整理-RH133-Unit4(3)
System Logging
1. /var/log/*
/var/log/dmesg
/var/log/messages
/var/log/maillog
/var/log/secure
/var/log/audit/audit.log
#ausearch -uj
- Jul 21 Tue 2009 22:45
[雜記]RHCE筆記整理-RH133-Unit4(2)
VNC
Vnc server port:5800, 5900
Server(192.168.0.254)
1.安裝vnc-server套件
#yum install vnc-server
[root@server1 ~]# rpm -qa|grep vnc-server
- Jul 19 Sun 2009 21:07
[雜記]RHCE筆記整理-RH133-Unit4(1)
System Services
1.SSH: Secure Shell
can copy files securely
#scp host:/etc/hosts /etc/hosts
can execute commands remotely
#ssh root@host 'ifconfig eth0'
- Jul 19 Sun 2009 20:53
[雜記]RHCE筆記整理-RH133-Unit3(2)
Lab1
1.安裝kernel-doc
2./usr/share/doc/$(uname-r)/Documentation/networking/ip-sysctl.txt
3.value : net.ipv4.icmp_echo_ignore_all
4.寫入/proc
5. 寫入/etc/sysctl.conf
6. load sysctl.conf