Sie sind auf Seite 1von 9

System=>shut Down()

Applications=>System tools=>Terminal()
Applications=>System tools=>Virtual Machine Manager()
ifconfigIP
inet addr:192.168.0.116(ip)
ssh student@192.168.0.116()
exit
cd ~()
cd ..()
cd /()
ls(!"#$)
pwd(%&'()
F12
[root@desktop12 student]# yum groupinstall chinese-support()*+)
[root@desktop12 student]#/usr/local/sbin/lab-resetvm(,-/./)
mkdir test(012test)
vi aaa(345)
a(67'()
i%&'(
o89'(
dd(:-)
:;
r<=
w>?
q
!@A
q!(@A)
wq(>?)
cat B(CD5)
rm BE-DF2
rm -rf 2E-DF2
touch B(G4DHIF0(J)
df /(KL#M)
df -h(KL#M)
fdisk -cul /dev/vda(KL)
fdisk /dev/vda(NKL)
p(OP37)
12483 cylinders(QR)
ssh root@192.168.0.116
redhat
fdisk /dev/vda(NKL)
p(KLST)
n(UNKL)
3(V37WX)
9836(pO7END'(YZ[\)
+50M(]^_`)
w(>?)
reboot(VMa)
fdisk -cul /dev/vda(!b!c%V37)
mkfs -t ext4 /dev/vda3(def)
mkdir /test(0gtest2)
ls /(!b!TEST)
vi /etc/fstab
h69
o
/dev/vda3 /test ext4 defaults 1 2
esc
:wq(>?)
mount -a(bijklmij,!ijknco)
reboot
fdisk /dev/vda(82,pqNl83)(82,83,8e)(lrO)
p(KLST)
n(UNKL)
4(V47WX)
9939(pO7END'(sYZ[\)
+100M(]^_`)
p(c%V47)
t(4system id)
4(V47WX)
82(tu834v82 swap,LrO)
w(>?)
reboot(VMa)
ssh root@192.168.0.116
redhat
fdisk /dev/vda
p(V47)
w(>?wc)
vi /etc/fstab
69
o
/dev/vda4 swap swap defaults 0 0
esc
:wq(>?)
mkswap /dev/vda4(JswapKL)
swapon -a(swapKLx)
swapon -s(swapKL)
[root@desktop16 ~]$ :lab-setup-storage(,-KL)
[root@server16 ~]$ :lab-grade-storage(KL)
/test
[root@desktop16 student]#:/usr/local/sbin/lab-resetvm(,-)
fdisk /dev/vda
n
e
4
9836
+200M
n
l
5
9836
+50M
n
l
6
10242
+60M
n
l
7
10xxx
+70M
t
5
8e
t
6
8e
t
7
8e
w
reboot
pv
yTAB
pvcreate --help(!z{r|})
pvscan()
pvcreate /dev/vda5~vda5
pvscan()
pvcreate /dev/vda6~vda6
pvscan()
pvcreate /dev/vda7~vda7
pvdisplay(O)
vg
yTAB
vgcreate --help(!z{r|})
vgcreate vg1 /dev/vda5~vda5
vgscan()
vgdisplay()
vgcreate -s 8M vg2 /dev/vda6 /dev/vda7~vda6vda7
vgcsan()
vgdisplay()
lv
yTAB
lvcreate -n lv1 -l 4 vg1
lvscan
lvdisplay
mkfs -t ext4 /dev/vg1/lv1
mkdir /test(0gtest2)
ls /(!b!TEST)
vi /etc/fstab
h69
o
/dev/vg1/lv1 /test ext4 defaults 1 2
esc
:wq(>?)
mount -a(bijklmij,!ijknco)
reboot
ssh root@192.168.0.116
redhat
df -h
lab-setup-lvm(&,-)
ssh root@192.168.0.116
redhat
fdisk /dev/vda
p
n
p
4
9836
+600M
t
4
8e
w
reboot
ssh root@192.168.0.116
redhat
mkfs -t ext4 /dev/vda4(def)
pvcreate /dev/vda4
vgcreate allison /dev/vda4
lvcreate -n custdb -L 512 allison
mkfs -t ext4 /dev/allison/custdb
mkdir /test(0gtest2)
ls /(!b!TEST)
vi /etc/fstab
/dev/allison/custdb /test ext4 defaults 1 2
lab-grade-lvm
mount -a
reboot
lvextend -L 700M /dev/allison/custdb700M
mount -a
resize2fs -p /dev/allison/custdb
lvextend -L +50M /dev/allison/custdb(!+l~)
resize2fs -p /dev/allison/custdb
umount /test
e2fsck -f /dev/allison/custdb
resize2fs -p /dev/allison/custdb 512M
lvreduce -L 512M /dev/allison/custdb
y
mount -a
clear
showmount -e instructor.example.com
mkdir /nfstest
mount instructor:/var/ftp/pub /nfstest
ls /nfstest
reboot
ls /nfstest
cd /net/instructor/var/ftp/pub
ls /etc/auto.master
vi /etc/auto.master
/misc /etc/auto.misc98~9
/nfstest /etc/auto.nfstest
vi /etc/nfstest
public -ro instructor.example.com:/var/ftp/pub
service autofs restart
service autofs reload
vi /etc/auto.master
/misc /etc/auto.misc98~9
/server /etc/auto.server
vi /etc/auto.server
public -ro instructor.example.com:/var/nfs/oshu
cat /etc/auto.master
cat /etc/auto.server
ls /server/public
vi /etc/passwd
root:x:0:0:root:/root:/bin/bash(V9)
root=B\ x= 0=ID nologin=???
useradd --help
useradd aaa
vi /etc/passwd
69aaab
exit
ssh aaa@192.168.0.116
passwd aaaaaa
aaa()
aaa(=V)
exit
ssh aaa@192.168.0.116
=aaa
VM =student
Terminal =root
system-config-authentication
user Account Database:LDAP
LDAP Search Base DN:dc=example,dc=com
Ldap Server:ldap://127.0.0.1/(4v)
Ldap Server:ldap://instrustor.example.com/
Use TLS to encrypt connections ()
Download CA Certificate

http://instrustor.example.com/pub/EXAMPLE-CA-CERT
Authentication Method:LDAP password
getent passwd ldapuser1(67llL)

[root@server12 student]# vi /etc/auto.master


/home/guests /etc/auto.ldapuser12
[root@server12 student]# vi /etc/auto.ldapuser12
ldapuser12 -rw instructor.example.com:/home/guests/ldapuser12
* -rw instructor.example.com:/home/guests/& (}\)
[root@server12 student]# service autofs stop
[root@server12 student]# service autofs start
[root@server12 student]# su ldapuser12
[ldapuser12@server12 student]$ cd ~
[ldapuser12@server12 ~]$ pwd
[student@desktop12 ~]$ ssh -X root@192.168.0.112
[root@server12 ~]# system-config-authentication
<img width=800 src="">
9879503 B:+
useradd abc
id abc
groupadd -g 1000 csie
groupadd -g 1001 cc
cat /etc/group
id abc def
id def
id def
useradd def
useradd csie
useradd cc
cat /etc/group
usermod -G csie abc
id abc
usermod -G cc def
id def
groupadd -g 1002 dahan
usermod -G abc dahan
id abc
usermod -aG dahan abc
id abc
usermod -aG cc abc
usermod -aG csie abc
id abc
su abc
su - abc
[root@server12 student]# cat /etc/passwd
[root@server12 test]# chown root.dahan /test
[root@server12 test]# chmod 775 /test
useradd usera
useradd userb
useradd userc
useradd userd
groupadd -g 1003 ga
groupadd -g 1004 gb
groupadd -g 1005 gall
usermod -aG ga usera
usermod -aG gall usera
usermod -aG ga userb
usermod -aG gall userb
usermod -aG gb userc
usermod -aG gall userc
usermod -aG gb userd
usermod -aG gall userd
cd /test
mkdir testa
mkdir testb
chmod 750 testa
chmod 750 testb
setfacl -m g:ga:rwx testa/
setfacl -m g:gb:rx testa/
setfacl -m u:userd:--- testa/
setfacl -m g:gall:rwx testb/
setfacl -m u:usera:--- testb/
[root@server12 test]# cd /etc
[root@server12 etc]# cd /etc/yum.repos.d/
[root@server12 yum.repos.d]# vi updates.repo
-------------------------------------------------
[updates]
name=red hat update
baseurl=ftp://instructor.example.com/pub/rhel6/Errata
enabled=1
gpgcheck=0
http://instructor.example.com/pub/rhel6/Errata/rhel-x86_64-server-6/
uname -r u
wget
kernel-firmware-2.6.32-71.7.1.el6.noarch.rpm
kernel-2.6.32-71.7.1.el6.x86_64.rpm
rpm -ivh
reboot
uname -r u
rpm -qa vsftpd
rpm -qa httpd
service httpd start
service vsftpd start
IP 192.168.0.XXX x
cd /var/www/html/
vi test.html
<br>A<br>
<br>9879503<br>
<br>B+<br>
IP 192.168.0.XXX/test.html
chkconfig --list sshd -9
chkconfig httpd on 6x
chkconfig vsftpd on 6x
ps aux|grep httpd
ps aux|grep vsftpd
crontab -e
1 0-1/1 * * * echo "run 23 minutes after midn, 2am, 4am ..., everyday"
************************************
VM 8V27 yA
sXXXds
setenforce 0
passwd
1234
reboot
************************************
system-config-network
************************************
system-config-date
************************************
1.
----------------------------------
[root@server12 student]# cd /
[root@server12 /]# mkdir salary
[root@server12 /]# mkdir publication
chmod 770 salary
chmod 770 publication
[root@server12 student]# useradd Mike
[root@server12 student]# useradd Jorge
[root@server12 student]# useradd Jash
[root@server12 student]# useradd Sofia
[root@server12 student]# useradd Jennifer
[root@server12 student]# useradd David
[root@server12 student]# useradd John
[root@server12 student]# useradd Josef
[root@server12 student]# groupadd -g 1000 human
[root@server12 student]# groupadd -g 1001 account
[root@server12 student]# groupadd -g 1002 general
[root@server12 student]# usermod -aG human Mike
[root@server12 student]# usermod -aG human Jorge
[root@server12 student]# usermod -aG human Jash
[root@server12 student]# usermod -aG account Sofia
[root@server12 student]# usermod -aG account Jennifer
[root@server12 student]# usermod -aG general David
[root@server12 student]# usermod -aG general John
[root@server12 student]# usermod -aG general Josef
[root@server12 student]# cd /
[root@server12 /]# setfacl -m g:account:rwx salary
[root@server12 /]# setfacl -m g:human:rx salary
[root@server12 /]# setfacl -m g:general:--- salary
[root@server12 /]# setfacl -m u:Jennifer:rx salary
[root@server12 /]# setfacl -m u:Mike:rwx salary
[root@server12 /]# setfacl -m u:David:rx salary/
[root@server12 /]# setfacl -m g:human:rx publication
[root@server12 /]# setfacl -m g:account:rx publication
[root@server12 /]# setfacl -m g:general:rx publication
[root@server12 /]# setfacl -m u:David:rwx publication
[root@server12 /]# getfacl salary
[root@server12 /]# getfacl publication
[root@server12 /]# passwd Mike
7Terminal
[Mike@server12 ~]$ cd /home/Mike
[Mike@server12 ~]$ mkdir Mikeproject
[Mike@server12 ~]$ ls
[Mike@server12 ~]$ setfacl -m u:Smith:rwx Mikeproject/
[Mike@server12 ~]$ setfacl -m u:Johnson:rwx Mikeproject/
[Mike@server12 ~]$ getfacl Mikeproject/
-----------------------------------------------
2.
---------------------------
http://instructor.example.com/pub/rhel6/Errata/rhel-x86_64-server-6/
wget kernel-firmware-2.6.32-71.7.1.el6.noarch.rpm
wget kernel-2.6.32-71.7.1.el6.x86_64.rpm
rpm -ivh kernel-firmware-2.6.32-71.7.1.el6.noarch.rpm
rpm -ivh kernel-2.6.32-71.7.1.el6.x86_64.rpm
reboot
----------------------------------------------
3.
------------------------------------------------
rpm -qa vsftpd
rpm -qa httpd
service httpd start
service vsftpd start
IP 192.168.0.XXX x
cd /var/www/html/
vi test.html
<br>A<br>
<br>9879503<br>
<br>B+<br>
IP 192.168.0.XXX/test.html
chkconfig --list sshd -9
chkconfig httpd on 6x
chkconfig vsftpd on 6x
ps aux|grep httpd
ps aux|grep vsftpd
--------------------------------------------------
4.
-----------------------
[root@server12 test]# cd /etc
[root@server12 etc]# cd /etc/yum.repos.d/
[root@server12 yum.repos.d]# vi updates.repo
-------------------------------------------------
[updates]
name=red hat update
baseurl=ftp://instructor.example.com/pub/rhel6/Errata
enabled=1
gpgcheck=0
--------------------
[root@server12 /]#yum update
--------------------------
5.
---------------------------------
crontab -u root -e
H (*= 8-12=812 */5=5 )
*/1 * * * * echo _\
cat /var/spool/mail/root

Das könnte Ihnen auch gefallen