Журнал лабораторных работ

Содержание

Журнал

Четверг (04/07/11)

/dev/pts/3
10:47:35
#host m4.almaty.unix.bas
m4.almaty.unix.bas has address 192.169.15.4
10:47:39
#ping almaty.unix.bas
PING almaty.unix.bas (192.168.15.3) 56(84) bytes of data.
64 bytes from linux3.unix.bas (192.168.15.3): icmp_seq=1 ttl=64 time=1.87 ms
64 bytes from linux3.unix.bas (192.168.15.3): icmp_seq=2 ttl=64 time=0.109 ms
--- almaty.unix.bas ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.109/0.989/1.870/0.881 ms
10:48:24
#ping m2.almaty.unix.bas
PING m2.almaty.unix.bas (192.168.15.2) 56(84) bytes of data.
64 bytes from linux2.unix.bas (192.168.15.2): icmp_seq=1 ttl=64 time=0.146 ms
64 bytes from linux2.unix.bas (192.168.15.2): icmp_seq=2 ttl=64 time=0.152 ms
64 bytes from linux2.unix.bas (192.168.15.2): icmp_seq=3 ttl=64 time=0.145 ms
--- m2.almaty.unix.bas ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 0.145/0.147/0.152/0.014 ms
10:48:30
#ping m5.almaty.unix.bas
PING m5.almaty.unix.bas (192.168.15.5) 56(84) bytes of data.
64 bytes from linux5.unix.bas (192.168.15.5): icmp_seq=1 ttl=64 time=1.19 ms
64 bytes from linux5.unix.bas (192.168.15.5): icmp_seq=2 ttl=64 time=0.157 ms
--- m5.almaty.unix.bas ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.157/0.677/1.198/0.521 ms
10:48:35
#ping m4.almaty.unix.bas
PING m4.almaty.unix.bas (192.169.15.4) 56(84) bytes of data.
--- m4.almaty.unix.bas ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1000ms
прошло 77 минут
12:06:09
#/etc/init.d/named
Usage: /etc/init.d/named {start|stop|status|restart|condrestart|reload|configtest|probe}
12:06:13
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:
Error in named configuration:
/etc/named.zones:6: missing ';' before '}'
/etc/named.zones:13: missing ';' before '}'
/etc/named.zones:6: missing ';' before '}'
/etc/named.zones:13: missing ';' before '}'
                                                           [FAILED]
12:06:18
#vim /etc/named.conf
12:08:42
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
12:08:46
#ls /var/named/slaves/
almaty.unix.bas
12:08:56
#vim /etc/named.
12:08:56
#vim /etc/named.zones
12:11:52
#~
 25         // query-source-v6 port 53;
 26
 27         allow-query     { any; };
 28         allow-query-cache { any; };
 29
 30         forward only;
 31         forwarders {
 32                 192.168.15.253;
 33                 };
 34         version "unknown";
...
 43         match-clients      { localhost; };
 44         match-destinations { localhost; };
 45         recursion yes;
 46         include "/etc/named.rfc1912.zones";
 47         include "/etc/named.zones";
 48 };
 49 view all {
 50         match-clients   { any; };
 51         recursion no;
 52         include "/etc/named.zones";
12:12:01
# 3 //
named.caching-nameserver.conf  named.rfc1912.zones
named.conf                     named.zones
12:12:01
#vim /etc/named.caching-nameserver.conf
12:12:13
# 12 // caching-nameserver package upgrade.
  1         zone "astana.unix.bas" {
  2                 type master;
  3                 file "astana.unix.bas";
  4                 allow-transfer {
  5                         192.168.15.3;
  6         };
  7 };
  8         zone "almaty.unix.bas" {
  9                 type slave;
 10                 file "slaves/almaty.unix.bas";
 11                 masters {
 12                         192.168.15.3;
 13         };
 14 };
"/etc/named.zones" 14L, 219C
12:12:24
#~
named.caching-nameserver.conf  named.rfc1912.zones
named.conf                     named.zones
12:12:24
#vim /etc/named.conf
12:12:36
#vim /var/named/
12:12:36
#vim /var/named/astana.unix.bas
12:14:12
#~
  1 $TTL    3h
  2 @       SOA     linux4.unix.bas. root.linux4.unix.bas. 2011040701 1d 1h 1w 1h
"/var/named/astana.unix.bas" 10L, 204C
  3         NS      linux4.unix.bas.
  4
            NS      linux3.unix.bas.
  5
                               4
  6 m1      A       192.168.15.1
     2                         2
...
~
~
~
~
~
~
~
~
~
"/var/named/astana.unix.bas" 11L, 226C written
12:20:37
# 16 type master;
~
~
~
:! ls
a2ps.cfg               httpd                          prelink.conf
a2ps-site.cfg          idmapd.conf                    prelink.conf.d
acpi                   init.d                         printcap
adjtime                initlog.conf                   profile
aliases                inittab                        profile.d
aliases.db             inputrc                        protocols
...
~
~
~
~
~
~
~
~
~
:q!
12:26:56
#/etc/init.d/named
Usage: /etc/init.d/named {start|stop|status|restart|condrestart|reload|configtest|probe}
12:27:01
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
12:27:05
#host host13.astana.unix.bas
Host host13.astana.unix.bas not found: 3(NXDOMAIN)
12:27:22
#tail /var/log/messages
Apr  7 16:27:05 linux4 named[7903]: zone astana.unix.bas/IN/localhost_resolver: sending notifies (serial 2011040701)
Apr  7 16:27:05 linux4 named[7903]: zone 40.168.192.in-addr.arpa/IN/localhost_resolver: sending notifies (serial 2011040701)
Apr  7 16:27:05 linux4 named[7903]: zone 40.168.192.in-addr.arpa/IN/all: sending notifies (serial 2011040701)
Apr  7 16:27:05 linux4 named[7903]: zone astana.unix.bas/IN/all: sending notifies (serial 2011040701)
Apr  7 16:27:12 linux4 named[7903]: client 192.168.15.3#18268: view all: received notify for zone '30.168.192.in-addr.arpa': not authoritative
Apr  7 16:27:12 linux4 named[7903]: client 192.168.15.3#58452: view all: received notify for zone '30.168.192.in-addr.arpa': not authoritative
Apr  7 16:27:12 linux4 named[7903]: client 192.168.15.3#58452: view all: received notify for zone 'almaty.unix.bas'
Apr  7 16:27:12 linux4 named[7903]: zone almaty.unix.bas/IN/all: notify from 192.168.15.3#58452: zone is up to date
Apr  7 16:27:12 linux4 named[7903]: client 192.168.15.3#58452: view all: received notify for zone 'almaty.unix.bas'
Apr  7 16:27:12 linux4 named[7903]: zone almaty.unix.bas/IN/all: notify from 192.168.15.3#58452: zone is up to date
12:31:07
#ls /var/named/named.broadcast
/var/named/named.broadcast
12:32:59
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
12:33:03
#host host13.astana.unix.bas
Host host13.astana.unix.bas not found: 3(NXDOMAIN)
12:33:14
#vim /etc/named.conf
12:35:31
#vim /var/named/
12:35:31
#vim /var/named/astana.unix.bas
12:43:58
#vim /var/named/40.in-addr.arpa
12:47:32
#/etc/init.d/named restart
Stopping named:                                            [  OK  ]
Starting named:                                            [  OK  ]
12:50:14
#tail /var/log/messages
Apr  7 16:50:14 linux4 named[8378]: zone localdomain/IN/localhost_resolver: loaded serial 42
Apr  7 16:50:14 linux4 named[8378]: zone localhost/IN/localhost_resolver: loaded serial 42
Apr  7 16:50:14 linux4 named[8378]: zone 40.168.192.in-addr.arpa/IN/all: loaded serial 2011040701
Apr  7 16:50:14 linux4 named[8378]: zone almaty.unix.bas/IN/all: loaded serial 2011040701
Apr  7 16:50:14 linux4 named[8378]: zone astana.unix.bas/IN/all: loaded serial 2011040701
Apr  7 16:50:14 linux4 named[8378]: running
Apr  7 16:50:14 linux4 named[8378]: zone astana.unix.bas/IN/localhost_resolver: sending notifies (serial 2011040701)
Apr  7 16:50:14 linux4 named[8378]: zone 40.168.192.in-addr.arpa/IN/localhost_resolver: sending notifies (serial 2011040701)
Apr  7 16:50:14 linux4 named[8378]: zone 40.168.192.in-addr.arpa/IN/all: sending notifies (serial 2011040701)
Apr  7 16:50:14 linux4 named[8378]: zone astana.unix.bas/IN/all: sending notifies (serial 2011040701)
прошло 13 минут
13:03:26
# 3 NS linux4.unix.bas.
eth0      Link encap:Ethernet  HWaddr 00:26:18:E4:56:60
          inet addr:192.168.15.4  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45900 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45334 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:22366346 (21.3 MiB)  TX bytes:4198411 (4.0 MiB)
          Interrupt:66 Memory:feac0000-feb00000
прошло 16 минут
13:19:59
#dhclient eth0
Internet Systems Consortium DHCP Client V3.0.5-RedHat
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/
Listening on LPF/eth0/00:26:18:e4:56:60
Sending on   LPF/eth0/00:26:18:e4:56:60
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 192.168.15.2
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.15.2
bound to 192.168.15.200 -- renewal in 9133 seconds.
13:20:09
#ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:26:18:E4:56:60
          inet addr:192.168.15.200  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:45932 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45369 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000
          RX bytes:22371522 (21.3 MiB)  TX bytes:4202803 (4.0 MiB)
          Interrupt:66 Memory:feac0000-feb00000
13:20:10
#ls /var/lib/
alternatives/     games/            misc/             rpm/              xend/
bluetooth/        hal/              mlocate/          scrollkeeper/     xenstored/
dav/              hsqldb/           multipath/        sepolgen/         xkb/
dbus/             iscsi/            nfs/              stateless/        yum/
dhclient/         libvirt/          ntp/              tpm/
dhcpv6/           logrotate.status  random-seed       xen/
13:20:10
#ifdown eth0

13:20:57
#ifup eth0

13:21:04
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:18:E4:56:60
          inet addr:192.168.15.4  Bcast:192.168.15.255  Mask:255.255.255.0
          inet6 addr: fe80::226:18ff:fee4:5660/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:46090 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45563 errors:0 dropped:0 overruns:0 carrier:2
          collisions:0 txqueuelen:1000
          RX bytes:22406503 (21.3 MiB)  TX bytes:4245172 (4.0 MiB)
          Interrupt:74 Memory:feac0000-feb00000
lo        Link encap:Local Loopback
...
          collisions:0 txqueuelen:0
          RX bytes:14713869 (14.0 MiB)  TX bytes:14713869 (14.0 MiB)
virbr0    Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          inet6 addr: fe80::200:ff:fe00:0/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:9098 (8.8 KiB)
13:21:06
#xen
xen               xend              xenstore-chmod    xenstore-ls       xentrace
xenbaked          xen-detect        xenstore-control  xenstore-read     xentrace_format
xen-bugtool       xenmon.py         xenstored         xenstore-rm       xentrace_setmask
xencons           xenperf           xenstore-exists   xenstore-write    xentrace_setsize
xenconsoled       xen-python-path   xenstore-list     xentop
13:21:06
#xen
bash: xen: command not found
13:22:53
#xen
bash: xen: command not found
13:22:55
#xen
xen               xend              xenstore-chmod    xenstore-ls       xentrace
xenbaked          xen-detect        xenstore-control  xenstore-read     xentrace_format
xen-bugtool       xenmon.py         xenstored         xenstore-rm       xentrace_setmask
xencons           xenperf           xenstore-exists   xenstore-write    xentrace_setsize
xenconsoled       xen-python-path   xenstore-list     xentop
13:22:55
#xen
xen               xend              xenstore-chmod    xenstore-ls       xentrace
xenbaked          xen-detect        xenstore-control  xenstore-read     xentrace_format
xen-bugtool       xenmon.py         xenstored         xenstore-rm       xentrace_setmask
xencons           xenperf           xenstore-exists   xenstore-write    xentrace_setsize
xenconsoled       xen-python-path   xenstore-list     xentop
13:22:55
#xen
xen               xend              xenstore-chmod    xenstore-ls       xentrace
xenbaked          xen-detect        xenstore-control  xenstore-read     xentrace_format
xen-bugtool       xenmon.py         xenstored         xenstore-rm       xentrace_setmask
xencons           xenperf           xenstore-exists   xenstore-write    xentrace_setsize
xenconsoled       xen-python-path   xenstore-list     xentop
13:22:55
#xen
bash: xen: command not found
13:23:01
#xen --help
bash: xen: command not found
13:23:03
#xend
ERROR Internal error: Could not obtain handle on privileged command interface (2 = No such file or directory)
ERROR Internal error: Could not obtain handle on privileged command interface (2 = No such file or directory)
Traceback (most recent call last):
  File "/usr/sbin/xend", line 51, in ?
    from xen.xend.server import SrvDaemon
  File "/usr/lib64/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 21, in ?
    import relocate
  File "/usr/lib64/python2.4/site-packages/xen/xend/server/relocate.py", line 26, in ?
    from xen.xend import XendDomain
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomain.py", line 33, in ?
    import XendDomainInfo
  File "/usr/lib64/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 40, in ?
    import image
  File "/usr/lib64/python2.4/site-packages/xen/xend/image.py", line 37, in ?
    xc = xen.lowlevel.xc.xc()
xen.lowlevel.xc.Error: (1, 'Internal error', 'Could not obtain handle on privileged command interface (2 = No such file or directory)')
13:23:09
#xen
xen               xend              xenstore-chmod    xenstore-ls       xentrace
xenbaked          xen-detect        xenstore-control  xenstore-read     xentrace_format
xen-bugtool       xenmon.py         xenstored         xenstore-rm       xentrace_setmask
xencons           xenperf           xenstore-exists   xenstore-write    xentrace_setsize
xenconsoled       xen-python-path   xenstore-list     xentop
13:23:09
#yum search virtmanager
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: apt.sw.be
 * updates: mirror.space.kz
Warning: No matches found for: virtmanager
No Matches found
13:24:37
#yum search virt-manager
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: apt.sw.be
 * updates: mirror.space.kz
================================== Matched: virt-manager ===================================
python-virtinst.noarch : Python modules and utilities for installing virtual machines
virt-manager.x86_64 : Virtual Machine Manager
virt-viewer.x86_64 : Virtual Machine Viewer
13:24:41
#yum -y install virt-manager.x86_64
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirror.space.kz
 * base: mirror.space.kz
 * extras: mirror.space.kz
 * rpmforge: apt.sw.be
 * updates: mirror.space.kz
Setting up Install Process
Resolving Dependencies
--> Running transaction check
...
Trying other mirror.
http://centosy4.centos.org/centos/5.5/os/x86_64/CentOS/virt-manager-0.6.1-12.el5.x86_64.rpm: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
http://ftp.chg.ru/pub/Linux/CentOS/5.5/os/x86_64/CentOS/virt-manager-0.6.1-12.el5.x86_64.rpm: [Errno 4] IOError: <urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Error Downloading Packages:
  gtk-vnc-0.3.8-3.el5.x86_64: failure: CentOS/gtk-vnc-0.3.8-3.el5.x86_64.rpm from base: [Errno 256] No more mirrors to try.
  gtk-vnc-python-0.3.8-3.el5.x86_64: failure: CentOS/gtk-vnc-python-0.3.8-3.el5.x86_64.rpm from base: [Errno 256] No more mirrors to try.
  gnome-python2-gnomekeyring-2.16.0-3.el5.x86_64: failure: CentOS/gnome-python2-gnomekeyring-2.16.0-3.el5.x86_64.rpm from base: [Errno 256] No more mirrors to try.
  virt-manager-0.6.1-12.el5.x86_64: failure: CentOS/virt-manager-0.6.1-12.el5.x86_64.rpm from base: [Errno 256] No more mirrors to try.
13:25:10
#host ya.ru

13:25:25
#exit

Пятница (04/08/11)

/dev/pts/1
05:49:33
$ssh 192.168.15.253
0.0.0.0         192.168.15.253  0.0.0.0         UG    0      0        0 eth1
[root@linux2:~]# host ya.ru
ya.ru has address 93.158.134.203
ya.ru has address 213.180.204.3
ya.ru has address 77.88.21.3
ya.ru has address 87.250.250.3
ya.ru has address 87.250.250.203
ya.ru has address 87.250.251.3
ya.ru has address 93.158.134.3
ya.ru mail is handled by 10 mx.yandex.ru.
[root@linux2:~]# more /etc/resolv.conf
nameserver 127.0.0.1
/dev/pts/3
05:49:37
$su -
Password:
05:49:41
#'/usr/share/applications/redhat-web.desktop'
bash: /usr/share/applications/redhat-web.desktop: Permission denied
05:50:21
#host ya.ru

05:58:55
#/etc/init.d/named stop
Stopping named:                                            [  OK  ]
05:59:08
#vim /etc/resolv.conf
06:00:09
#vim /etc/resolv.conf
06:00:18
#vim /etc/resolv.conf
06:00:58