目前分類:RH133 (30)

瀏覽方式: 標題列表 簡短摘要
LAB

1. Nis

#authconfig-tui (加入nis server: server1.example.com)
%因沒有nis server,無法實作

#getent passwd (如果有查到代表成功~)


aquatower 發表在 痞客邦 留言(0) 人氣()

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)

aquatower 發表在 痞客邦 留言(0) 人氣()

LAB

1.create accounts
for user in joshua alex dax
do
useradd $user
echo 'passowrd' |passwd --stdin $user
done

2. create groups

aquatower 發表在 痞客邦 留言(0) 人氣()

User Administration

%user's home directories get populated with the files from "/etc/skel/*"


1. Command:
(1)user administration

#useradd [options] username

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

(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

aquatower 發表在 痞客邦 留言(0) 人氣()

Advanced Filesystem Management

Tools:

#tar

#dump
#restore
Ex:
dump -0u -f /dev/nst0 /dev/hda2

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

Filesystem

entry in #/etc/fstab

partitions
-------------------------
5(or f)--Extended
82 --linux swap
83 --linux (ext2, ext3)
8e --linux LVM

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

Cron

#crontab [-u user] file
#crontab [-l | -r | -e]

restrict allow user
/etc/cron.allow (預設不存在, all user都允許, 除非黑名單deny, 才不允許使用)
/etc/cron.deny


aquatower 發表在 痞客邦 留言(0) 人氣()

CUPS

config file: /etc/cups/cupsd.conf, /etc/cups/printers.conf

config tool: system-config-printer


1.使用#system-config-printer 設定印表機
因測試需要設定二台

aquatower 發表在 痞客邦 留言(0) 人氣()

NTP: Network Time Protocol

config file: /etc/ntp.conf

config tool: #system-config-date


#vi /etc/ntp.conf

---略---

aquatower 發表在 痞客邦 留言(0) 人氣()

System Logging

1. /var/log/*

/var/log/dmesg
/var/log/messages
/var/log/maillog
/var/log/secure
/var/log/audit/audit.log
#ausearch -uj

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

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'

aquatower 發表在 痞客邦 留言(0) 人氣()

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

aquatower 發表在 痞客邦 留言(0) 人氣()

1 2