/l3/users/roman-sidorenko/asterisk/debian4/root :1 :2 :3 :4 :5 :6 :7 |
|
#vim zapata.conf
--- /tmp/l3-saved-7292.1571.25363 2009-12-09 04:01:37.000000000 -1000 +++ zapata.conf 2009-12-09 04:02:45.000000000 -1000 @@ -47,7 +47,7 @@ ; ; Default context ; -context=default +;context=default ; ; Switchtype: Only used for PRI. ; |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#vim extensions.conf
|
#:q
adsi.conf features.conf phone.conf adtranvofr.conf festival.conf privacy.conf agents.conf followme.conf queues.conf alarmreceiver.conf func_odbc.conf res_odbc.conf alsa.conf gtalk.conf res_pgsql.conf amd.conf h323.conf res_snmp.conf asterisk.adsi http.conf rpt.conf asterisk.conf iax.conf rtp.conf cdr.conf iax.conf.SAVED say.conf cdr_custom.conf iaxprov.conf sip.conf ... cdr_tds.conf manager.conf sla.conf codecs.conf manager.d/ smdi.conf dnsmgr.conf meetme.conf telcordia-1.adsi dundi.conf mgcp.conf udptl.conf enum.conf misdn.conf users.conf esel.conf modules.conf voicemail.conf extconfig.conf musiconhold.conf vpb.conf extensions.ael muted.conf watchdog.conf extensions.conf osp.conf zapata.conf extensions.conf.SAVED oss.conf |
#vim extensions.conf
--- /tmp/l3-saved-7292.14193.5710 2009-12-09 04:07:37.000000000 -1000 +++ extensions.conf 2009-12-09 04:08:13.000000000 -1000 @@ -12,7 +12,8 @@ ;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup - +[trans-Poltava] +include => outbound [outbound] exten => 4000,1,Dial(SIP/vkiev/${EXTEN}) |
#vim sip.conf
--- /tmp/l3-saved-7292.30932.6172 2009-12-09 04:08:17.000000000 -1000 +++ sip.conf 2009-12-09 04:08:44.000000000 -1000 @@ -38,6 +38,7 @@ ;call-limit=1 ;limitonpeers=yes usecallerid=no +context=trans-Poltava [vkiev] type=friend |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... == Parsing '/etc/asterisk/users.conf': Found \ -- Executing [202@internal:1] Answer("SIP/kiev-093e1898", "") in new stack -- Executing [202@internal:2] Wait("SIP/kiev-093e1898", "1") in new stack -- Executing [202@internal:3] Playback("SIP/kiev-093e1898", "alba") in new stack -- <SIP/kiev-093e1898> Playing 'alba' (language 'en') == Spawn extension (internal, 202, 3) exited non-zero on 'SIP/kiev-093e1898' [Dec 9 04:09:56] NOTICE[7415]: chan_sip.c:14035 handle_request_invite: Call from 'kiev' to extension '380674074085' rejected because extension not found. debian4*CLI> quit Executing last minute cleanups |
#vim sip.conf
|
#:q
register => nt:1234@xgu.ru/vkiev [201] type=friend host=dynamic secret=1234 callerid="Roman Sidorenko-MegaPhone" context=blackL, 683C [203] type=friend host=dynamic ... ; 192.168.101.3 secret=1234 ;call-limit=1 ;limitonpeers=yes usecallerid=no context=trans-Poltava [vkiev] type=friend host=xgu.ru ;secret=1234 |
#vim sip.conf
--- /tmp/l3-saved-7292.4309.26584 2009-12-09 04:12:49.000000000 -1000 +++ sip.conf 2009-12-09 04:13:08.000000000 -1000 @@ -1,5 +1,5 @@ [general] -context=internal +context=default register => kiev:1234@192.168.101.3/poltava register => fromDeb4:123@192.168.102.2/fromDeb4 |
#/etc/init
init.d/ initramfs-tools/ |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': Found == Parsing '/etc/asterisk/extconfig.conf': Found Connected to Asterisk 1.4.21.2~dfsg-3 currently running on debian4 (pid = 7600) Verbosity was 0 and is now 4 -- Saved useragent "Asterisk PBX" for peer poltava debian4*CLI> quit Executing last minute cleanups |
#vim extensions.conf
--- /tmp/l3-saved-7292.7133.18635 2009-12-09 04:13:47.000000000 -1000 +++ extensions.conf 2009-12-09 04:13:52.000000000 -1000 @@ -12,7 +12,7 @@ ;exten => 202,n,Playback(demo-congrats) exten => 202,n,Hangup -[trans-Poltava] +[transPoltava] include => outbound [outbound] |
#vim sip.conf
--- /tmp/l3-saved-7292.790.7758 2009-12-09 04:13:56.000000000 -1000 +++ sip.conf 2009-12-09 04:14:01.000000000 -1000 @@ -35,7 +35,7 @@ host=dynamic secret=1234 usecallerid=no -context=trans-Poltava +context=transPoltava [vkiev] type=friend |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#ssh 192.168.101.3
root@192.168.101.3's password: Linux debian3 2.6.26-2-686 #1 SMP Wed Nov 4 20:45:37 UTC 2009 i686 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Tue Dec 8 21:56:58 2009 from 192.168.7.101 |
#screen -x
|
#screen
|
#asterisk -rvvvv
Asterisk 1.4.21.2~dfsg-3, Copyright (C) 1999 - 2008 Digium, Inc. and others. Created by Mark Spencer <markster@digium.com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'core show license' for details. ========================================================================= This package has been modified for the Debian GNU/Linux distribution Please report all bugs to http://bugs.debian.org/asterisk ========================================================================= ... [Dec 9 11:24:31] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #4) [Dec 9 11:24:51] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #5) [Dec 9 11:25:11] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #6) [Dec 9 11:25:31] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #7) [Dec 9 11:25:51] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #8) [Dec 9 11:26:11] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #9) [Dec 9 11:26:31] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #10) [Dec 9 15:18:43] NOTICE[7821]: chan_sip.c:7517 sip_reg_timeout: -- Registration for 'nt@xgu.ru' timed out, trying again (Attempt #1) debian4*CLI> quit Executing last minute cleanups |
#vim extensions.conf
|
#exten => 999,n,Echo
|
#dmesg
[ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 2.6.26-2-686 (Debian 2.6.26-19) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Wed Aug 19 06:06:52 UTC 2009 [ 0.000000] BIOS-provided physical RAM map: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable) [ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved) [ 0.000000] BIOS-e820: 00000000000e4000 - 0000000000100000 (reserved) [ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf790000 (usable) [ 0.000000] BIOS-e820: 00000000bf790000 - 00000000bf79e000 (ACPI data) [ 0.000000] BIOS-e820: 00000000bf79e000 - 00000000bf7e0000 (ACPI NVS) ... [ 12.402623] Adding 996020k swap on /dev/sda2. Priority:-1 extents:1 across:996020k [ 12.816412] EXT3 FS on sda1, internal journal [ 13.283864] loop: module loaded [ 14.691527] e1000: eth1: e1000_watchdog: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [ 16.029238] NET: Registered protocol family 10 [ 16.030624] lo: Disabled Privacy Extensions [ 19.930677] usbvideo: Packet Statistics: Total=32. Empty=0. Usage=100% [ 19.930682] usbvideo: Transfer Statistics: Transferred=0 B Usage=0% [ 28.162838] eth1: no IPv6 routers present [ 269.682730] Registered tone zone 8 (Norway) |
#apt-get update
Hit http://10.0.35.1 lenny Release.gpg Get:1 http://security.debian.org lenny/updates Release.gpg [835B] Ign http://security.debian.org lenny/updates/main Translation-en_US Ign http://10.0.35.1 lenny/main Translation-en_US Get:2 http://security.debian.org lenny/updates Release [40.8kB] Hit http://10.0.35.1 lenny Release Get:3 http://security.debian.org lenny/updates/main Packages [243kB] Ign http://10.0.35.1 lenny/main Packages/DiffIndex Ign http://10.0.35.1 lenny/main Sources/DiffIndex Ign http://10.0.35.1 lenny/main Packages Ign http://10.0.35.1 lenny/main Sources Get:4 http://security.debian.org lenny/updates/main Sources [63.8kB] Hit http://10.0.35.1 lenny/main Packages Hit http://10.0.35.1 lenny/main Sources Fetched 348kB in 1s (213kB/s) Reading package lists... Done |
#apt-get install
adsi.conf features.conf phone.conf adtranvofr.conf festival.conf privacy.conf agents.conf followme.conf queues.conf alarmreceiver.conf func_odbc.conf res_odbc.conf alsa.conf gtalk.conf res_pgsql.conf amd.conf h323.conf res_snmp.conf asterisk.adsi http.conf rpt.conf asterisk.conf iax.conf rtp.conf cdr.conf iax.conf.SAVED say.conf cdr_custom.conf iaxprov.conf sip.conf ... cdr_tds.conf manager.conf sla.conf codecs.conf manager.d/ smdi.conf dnsmgr.conf meetme.conf telcordia-1.adsi dundi.conf mgcp.conf udptl.conf enum.conf misdn.conf users.conf esel.conf modules.conf voicemail.conf extconfig.conf musiconhold.conf vpb.conf extensions.ael muted.conf watchdog.conf extensions.conf osp.conf zapata.conf extensions.conf.SAVED oss.conf |
#apt-get install fe
features.conf festival.conf |
#. /etc/bash_completion
|
#apt-get install fe
feed2imap festival-italian festvox-kdlpc16k feh festival-mr festvox-kdlpc8k fence festival-te festvox-mr-nsk fence-gnbd festival-voice festvox-rablpc16k fenix festlex-cmu festvox-rablpc8k fenix-dev festlex-ifd festvox-suopuhe-common fenix-plugin-mpeg festlex-oald festvox-suopuhe-lj fenix-plugins festlex-poslex festvox-suopuhe-mv fenix-plugins-system festvox-czech-ph festvox-te-nsk ferm festvox-don fet ferret festvox-ellpc11k fetchexc festival festvox-hi-nsk fetchmail festival-czech festvox-italp11k fetchmail-common festival-dev festvox-italp16k fetchmailconf festival-doc festvox-itapc11k fetchmail-ssl festival-freebsoft-utils festvox-itapc16k fetchyahoo festival-gaim festvox-kallpc16k feynmf festival-hi festvox-kallpc8k |
#apt-get install fest
festival festlex-ifd festvox-kallpc8k festival-czech festlex-oald festvox-kdlpc16k festival-dev festlex-poslex festvox-kdlpc8k festival-doc festvox-czech-ph festvox-mr-nsk festival-freebsoft-utils festvox-don festvox-rablpc16k festival-gaim festvox-ellpc11k festvox-rablpc8k festival-hi festvox-hi-nsk festvox-suopuhe-common festival-italian festvox-italp11k festvox-suopuhe-lj festival-mr festvox-italp16k festvox-suopuhe-mv festival-te festvox-itapc11k festvox-te-nsk festival-voice festvox-itapc16k festlex-cmu festvox-kallpc16k |
#apt-get install festival
festival festival-freebsoft-utils festival-mr festival-czech festival-gaim festival-te festival-dev festival-hi festival-voice festival-doc festival-italian |
#apt-get install festival
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: esound-clients esound-common festlex-cmu festlex-poslex festvox-kallpc16k libaudiofile0 libesd0 libestools1.2 sgml-base Suggested packages: festival-freebsoft-utils festival-gaim pidgin-festival esound sgml-base-doc The following NEW packages will be installed: esound-clients esound-common festival festlex-cmu festlex-poslex ... Setting up libaudiofile0 (0.2.6-7) ... Setting up esound-common (0.2.36-3) ... Setting up libesd0 (0.2.36-3) ... Setting up esound-clients (0.2.36-3) ... Setting up libestools1.2 (1:1.2.96~beta-2) ... Setting up sgml-base (1.26) ... Setting up festival (1.96~beta-7) ... Setting up festlex-cmu (1.4.0-6) ... Setting up festlex-poslex (1.4.0-5) ... Setting up festvox-kallpc16k (1.4.0-5) ... |
#chmod +x /etc/init.d/festival
|
#vi /etc/default/festival
--- /dev/null 2009-12-08 04:42:44.502473027 -1000 +++ /etc/default/festival 2009-12-09 22:45:43.000000000 -1000 @@ -0,0 +1 @@ +RUN_FESTIVAL=yes |
#/etc/init.d/festival restart
Restarting Festival server: festivalNo /usr/bin/festival found running; none killed. . |
#netstat -tapnu
Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:43046 0.0.0.0:* LISTEN 2018/rpc.statd tcp 0 0 127.0.0.1:5038 0.0.0.0:* LISTEN 7795/asterisk tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 2007/portmap tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN 7795/asterisk tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2292/sshd tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2577/exim4 tcp 0 0 192.168.102.1:22 192.168.102.2:42894 ESTABLISHED 7947/5 tcp 0 0 192.168.102.1:37315 192.168.101.3:22 ESTABLISHED 7892/ssh tcp 0 0 192.168.102.1:47788 212.26.146.51:18030 TIME_WAIT - tcp 0 0 192.168.102.1:47789 212.26.146.51:18030 TIME_WAIT - tcp6 0 0 :::22 :::* LISTEN 2292/sshd udp 0 0 0.0.0.0:922 0.0.0.0:* 2018/rpc.statd udp 0 0 0.0.0.0:2727 0.0.0.0:* 7795/asterisk udp 0 0 0.0.0.0:4520 0.0.0.0:* 7795/asterisk udp 0 0 0.0.0.0:48445 0.0.0.0:* 2018/rpc.statd udp 0 0 0.0.0.0:67 0.0.0.0:* 2676/dhcpd3 udp 0 0 0.0.0.0:5060 0.0.0.0:* 7795/asterisk udp 0 0 0.0.0.0:4569 0.0.0.0:* 7795/asterisk udp 0 0 0.0.0.0:111 0.0.0.0:* 2007/portmap |
#ps auxw | grep fest
root 9074 0.0 0.0 3116 728 pts/6 S+ 22:49 0:00 grep fest |
#/etc/init.d/festival restart
Restarting Festival server: festivalNo /usr/bin/festival found running; none killed. . |
#/etc/init.d/festival restart
Restarting Festival server: festivalNo /usr/bin/festival found running; none killed. . |
#vim /etc/festival.scm
--- /dev/null 2009-12-08 04:42:44.502473027 -1000 +++ /etc/festival.scm 2009-12-09 22:52:30.000000000 -1000 @@ -0,0 +1,16 @@ + ;; Enable access to localhost (needed by debian users) + (set! server_access_list '("localhost\\.localdomain" "localhost")) + + ;;; Command for Asterisk begin + + (define (tts_textasterisk string mode) + "(tts_textasterisk STRING MODE) + Apply tts to STRING. This function is specifically designed for + use in server mode so a single function call may synthesize the string. + This function name may be added to the server safe functions." + (let ((wholeutt (utt.synth (eval (list 'Utterance 'Text string))))) + (utt.wave.resample wholeutt 8000) + (utt.wave.rescale wholeutt 5) + (utt.send.wave.client wholeutt))) + + ;;; Command for Asterisk end |
#cd /etc/asterisk/
|
#vim extensions.conf
--- /tmp/l3-saved-7988.20388.12741 2009-12-09 22:53:08.000000000 -1000 +++ extensions.conf 2009-12-09 22:54:25.000000000 -1000 @@ -5,6 +5,8 @@ exten => _2XX,n,Dial(SIP/${EXTEN}) exten => 221,1,Dial(ZAP/G1) +exten => 222,1,Answer +exten => 222,n,Festival(My mega festival) exten => 202,1,Answer exten => 202,n,Wait(1) |
#vim extensions.conf
|
#vim extensions.conf
--- /tmp/l3-saved-7292.30392.20739 2009-12-09 23:00:24.000000000 -1000 +++ extensions.conf 2009-12-09 23:13:48.000000000 -1000 @@ -6,7 +6,7 @@ exten => 221,1,Dial(ZAP/G1) exten => 222,1,Answer -exten => 222,n,Festival(My mega festival) +exten => 222,n,Festival('Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs.') exten => 202,1,Answer exten => 202,n,Wait(1) |
#screen -ls
|
#screen -x
|
#screen -ls
|
#screen
|
#apt-get install bind9
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: bind9utils Suggested packages: bind9-doc resolvconf ufw The following NEW packages will be installed: bind9 bind9utils 0 upgraded, 2 newly installed, 0 to remove and 26 not upgraded. ... Setting up bind9utils (1:9.5.1.dfsg.P3-1) ... Setting up bind9 (1:9.5.1.dfsg.P3-1) ... Adding group `bind' (GID 110) ... Done. Adding system user `bind' (UID 108) ... Adding new user `bind' (UID 108) with group `bind' ... Not creating home directory `/var/cache/bind'. wrote key file "/etc/bind/rndc.key" # Starting domain name service...: bind9. |
#vi /etc/bind/named.conf.local
|
#~
// If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. forwarders { 10.0.35.1; }; ... ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/bind/named.conf.options" 20 lines, 566 characters written |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9. Starting domain name service...: bind9. |
#vi /etc/resolv.conf
--- /tmp/l3-saved-9764.10051.21590 2009-12-09 23:16:50.000000000 -1000 +++ /etc/resolv.conf 2009-12-09 23:16:56.000000000 -1000 @@ -1 +1 @@ -nameserver 10.0.35.1 +nameserver 127.0.0.1 |
#ping ya.ru
PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=49 time=52.7 ms ^C --- ya.ru ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 52.765/52.765/52.765/0.000 ms |
#vi /etc/bind
--- /dev/null 2009-12-08 04:42:44.502473027 -1000 +++ /etc/bind/kiev.unix.nt 2009-12-09 23:20:34.000000000 -1000 @@ -0,0 +1,4 @@ +@ SOA kiev.unix.nt. igor.chub.in. 1 3600 3600 3600 3600 + NS kiev.unix.nt. + A 192.168.102.1 + MX 10 kiev.unix.nt. |
#vi /etc/bind/kiev.unix.nt
|
#cat /etc/bind/kiev.unix.nt
@ SOA kiev.unix.nt. igor.chub.in. 1 3600 3600 3600 3600 NS kiev.unix.nt. A 192.168.102.1 MX 10 kiev.unix.nt. |
#/etc/init.d/bind9 restart
Stopping domain name service...: bind9. Starting domain name service...: bind9. |
#dig @127.0.0.1 kiev.unix.nt a
; <<>> DiG 9.5.1-P3 <<>> @127.0.0.1 kiev.unix.nt a ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23461 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;kiev.unix.nt. IN A ;; ANSWER SECTION: kiev.unix.nt. 3600 IN A 192.168.102.1 ;; AUTHORITY SECTION: kiev.unix.nt. 3600 IN NS kiev.unix.nt. ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Wed Dec 9 23:22:33 2009 ;; MSG SIZE rcvd: 60 |
#vi /etc/bind/named.conf.options
--- /tmp/l3-saved-9764.27956.5834 2009-12-09 23:23:09.000000000 -1000 +++ /etc/bind/named.conf.options 2009-12-09 23:23:20.000000000 -1000 @@ -15,6 +15,7 @@ }; auth-nxdomain no; # conform to RFC1035 + listen-on { any; }; listen-on-v6 { any; }; }; |
#tail /var/log/daemon.log
Dec 9 23:23:23 debian4 named[10248]: automatic empty zone: B.E.F.IP6.ARPA Dec 9 23:23:23 debian4 named[10248]: command channel listening on 127.0.0.1#953 Dec 9 23:23:23 debian4 named[10248]: command channel listening on ::1#953 Dec 9 23:23:23 debian4 named[10248]: zone 0.in-addr.arpa/IN: loaded serial 1 Dec 9 23:23:23 debian4 named[10248]: zone 127.in-addr.arpa/IN: loaded serial 1 Dec 9 23:23:23 debian4 named[10248]: zone 255.in-addr.arpa/IN: loaded serial 1 Dec 9 23:23:23 debian4 named[10248]: zone localhost/IN: loaded serial 2 Dec 9 23:23:23 debian4 named[10248]: /etc/bind/kiev.unix.nt:1: no TTL specified; using SOA MINTTL instead Dec 9 23:23:23 debian4 named[10248]: zone kiev.unix.nt/IN: loaded serial 1 Dec 9 23:23:23 debian4 named[10248]: running |
#dig @192.168.102.2 asterisk.obukhov.unix.nt
; <<>> DiG 9.5.1-P3 <<>> @192.168.102.2 asterisk.obukhov.unix.nt ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36802 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;asterisk.obukhov.unix.nt. IN A ;; ANSWER SECTION: asterisk.obukhov.unix.nt. 3600 IN CNAME obukhov.unix.nt. obukhov.unix.nt. 3600 IN A 192.168.102.2 ;; AUTHORITY SECTION: obukhov.unix.nt. 3600 IN NS obukhov.unix.nt. ;; Query time: 0 msec ;; SERVER: 192.168.102.2#53(192.168.102.2) ;; WHEN: Wed Dec 9 23:26:40 2009 ;; MSG SIZE rcvd: 86 |
#ls -l\
> ls -l\ > |
#ls -l
total 48 -rw-r--r-- 1 root root 237 2009-07-28 19:52 db.0 -rw-r--r-- 1 root root 271 2009-07-28 19:52 db.127 -rw-r--r-- 1 root root 237 2009-07-28 19:52 db.255 -rw-r--r-- 1 root root 353 2009-07-28 19:52 db.empty -rw-r--r-- 1 root root 270 2009-07-28 19:52 db.local -rw-r--r-- 1 root root 2878 2009-07-28 19:52 db.root -rw-r--r-- 1 root bind 119 2009-12-09 23:20 kiev.unix.nt -rw-r--r-- 1 root bind 907 2009-07-28 19:52 named.conf -rw-r--r-- 1 root bind 236 2009-12-09 23:21 named.conf.local -rw-r--r-- 1 root bind 590 2009-12-09 23:23 named.conf.options -rw-r----- 1 bind bind 77 2009-12-09 23:14 rndc.key -rw-r--r-- 1 root root 1317 2009-07-28 19:52 zones.rfc1918 |
#cat kiev.unix.nt
@ SOA kiev.unix.nt. igor.chub.in. 1 3600 3600 3600 3600 NS kiev.unix.nt. A 192.168.102.1 MX 10 kiev.unix.nt. |
#ping poltava.unix.nt
PING poltava.unix.nt (192.168.101.3) 56(84) bytes of data. 64 bytes from 192.168.101.3: icmp_seq=1 ttl=63 time=0.418 ms 64 bytes from 192.168.101.3: icmp_seq=2 ttl=63 time=0.275 ms ^C --- poltava.unix.nt ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 999ms rtt min/avg/max/mdev = 0.275/0.346/0.418/0.073 ms |
#ls -l
total 48 -rw-r--r-- 1 root root 237 2009-07-28 19:52 db.0 -rw-r--r-- 1 root root 271 2009-07-28 19:52 db.127 -rw-r--r-- 1 root root 237 2009-07-28 19:52 db.255 -rw-r--r-- 1 root root 353 2009-07-28 19:52 db.empty -rw-r--r-- 1 root root 270 2009-07-28 19:52 db.local -rw-r--r-- 1 root root 2878 2009-07-28 19:52 db.root -rw-r--r-- 1 root bind 119 2009-12-09 23:20 kiev.unix.nt -rw-r--r-- 1 root bind 907 2009-07-28 19:52 named.conf -rw-r--r-- 1 root bind 236 2009-12-09 23:21 named.conf.local -rw-r--r-- 1 root bind 590 2009-12-09 23:23 named.conf.options -rw-r----- 1 bind bind 77 2009-12-09 23:14 rndc.key -rw-r--r-- 1 root root 1317 2009-07-28 19:52 zones.rfc1918 |
#cat named.conf
// This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; // prime the server with knowledge of the root servers zone "." { ... }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; include "/etc/bind/named.conf.local"; |
#cat named.conf | less
|
#host poltava.unix.nt
poltava.unix.nt has address 192.168.101.3 poltava.unix.nt mail is handled by 10 poltava.unix.nt. |
#host kiev.unix.nt
kiev.unix.nt has address 192.168.102.1 kiev.unix.nt mail is handled by 10 kiev.unix.nt. |
#host obukhov.unix.nt
obukhov.unix.nt has address 192.168.102.2 |
#cat /etc/bind/kiev.unix.nt
@ SOA kiev.unix.nt. igor.chub.in. 1 3600 3600 3600 3600 NS kiev.unix.nt. A 192.168.102.1 MX 10 kiev.unix.nt. |
#dig poltava.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> poltava.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65313 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;poltava.unix.nt. IN MX ;; ANSWER SECTION: poltava.unix.nt. 2459 IN MX 10 poltava.unix.nt. ;; AUTHORITY SECTION: poltava.unix.nt. 2309 IN NS poltava.unix.nt. ;; ADDITIONAL SECTION: poltava.unix.nt. 2309 IN A 192.168.101.3 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Dec 10 00:01:16 2009 ;; MSG SIZE rcvd: 79 |
#rndc flush
|
#dig poltava.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> poltava.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52969 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;poltava.unix.nt. IN MX ;; ANSWER SECTION: poltava.unix.nt. 3588 IN MX 10 poltava.unix.nt. ;; AUTHORITY SECTION: poltava.unix.nt. 3588 IN NS poltava.unix.nt. ;; ADDITIONAL SECTION: poltava.unix.nt. 3588 IN A 192.168.101.3 ;; Query time: 3 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Dec 10 00:01:21 2009 ;; MSG SIZE rcvd: 79 |
#dig obukhov.unix.nt mx
; <<>> DiG 9.5.1-P3 <<>> obukhov.unix.nt mx ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18062 ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;obukhov.unix.nt. IN MX ;; ANSWER SECTION: obukhov.unix.nt. 3567 IN MX 10 obukhov.unix.nt. ;; AUTHORITY SECTION: obukhov.unix.nt. 3567 IN NS obukhov.unix.nt. ;; ADDITIONAL SECTION: obukhov.unix.nt. 3567 IN A 192.168.102.2 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Thu Dec 10 00:01:22 2009 ;; MSG SIZE rcvd: 79 |
#dig obukhov.unix.nt mx
^C |
#apt-get install sendmail sensible-mda
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sendmail: Depends: sendmail-bin but it is not going to be installed E: Broken packages |
#apt-get install sendmail
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: sendmail: Depends: sendmail-bin but it is not going to be installed E: Broken packages |
#apt-get install sendmail-bin
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: sendmail-base sendmail-cf Suggested packages: sendmail-doc logcheck resolvconf sasl2-bin libsasl2-modules The following packages will be REMOVED: exim4 exim4-base exim4-config exim4-daemon-light The following NEW packages will be installed: ... were not found, (but were created) please investigate. Warning: These messages were issued while creating sendmail.cf make sure they are benign before starting sendmail! Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent (MTA): sendmail . |
#hostname
debian4 |
#hostname kiev.unix.nt
|
#vi /etc/hostname
--- /tmp/l3-saved-9764.6975.32101 2009-12-10 00:51:24.000000000 -1000 +++ /etc/hostname 2009-12-10 00:51:29.000000000 -1000 @@ -1 +1 @@ -debian4 +kiev |
#vi /etc/hosts
--- /tmp/l3-saved-9764.28545.27775 2009-12-10 00:51:32.000000000 -1000 +++ /etc/hosts 2009-12-10 00:51:53.000000000 -1000 @@ -1,5 +1,6 @@ 127.0.0.1 localhost 192.168.7.4 debian4 +192.168.102.1 kiev # The following lines are desirable for IPv6 capable hosts ::1 localhost ip6-localhost ip6-loopback |
#ls -l /etc/hosts
-rw-r--r-- 1 root root 274 2009-12-10 00:51 /etc/hosts |
#hostname
kiev.unix.nt |
#apt-get install sensible-mda
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: sensible-mda 0 upgraded, 1 newly installed, 0 to remove and 26 not upgraded. Need to get 214kB of archives. After this operation, 250kB of additional disk space will be used. Get:1 http://10.0.35.1 lenny/main sensible-mda 8.14.3-5 [214kB] Fetched 214kB in 0s (4369kB/s) Selecting previously deselected package sensible-mda. (Reading database ... 53138 files and directories currently installed.) Unpacking sensible-mda (from .../sensible-mda_8.14.3-5_i386.deb) ... Processing triggers for man-db ... Setting up sensible-mda (8.14.3-5) ... |
@ SOA kiev.unix.nt. igor.chub.in. 1 3600 3600 3600 3600 NS kiev.unix.nt. A 192.168.102.1 MX 10 kiev.unix.nt.
@ SOA kiev.unix.nt. igor.chub.in. 1 3600 3600 3600 3600 NS kiev.unix.nt. A 192.168.102.1 MX 10 kiev.unix.nt.
// This is the primary configuration file for the BIND DNS server named. // // Please read /usr/share/doc/bind9/README.Debian.gz for information on the // structure of BIND configuration files in Debian, *BEFORE* you customize // this configuration file. // // If you are just adding zones, please do that in /etc/bind/named.conf.local include "/etc/bind/named.conf.options"; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; include "/etc/bind/named.conf.local";
Время первой команды журнала | 15:01:30 2009-12- 9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:56:24 2009-12-10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 11.88 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.00 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.04 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.82 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008