/l3/users/andr/nt-voip/linux5.linux5.unix.nt/root :1 :2 :3 |
|
#history
1 useradd andr 2 passwd andr 3 cd/tmp 4 wget http://xgu.ru/lilalo/install 5 vim install 6 nano install 7 nano install 8 bash install 9 nano /root/.bashrc 10 nano /home/user/.bashrc 11 . ~/.bashrc 12 history |
#apt-get install build-essential
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: binutils dpkg-dev fakeroot g++ g++-4.4 gcc gcc-4.4 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libstdc++6-4.4-dev linux-libc-dev make manpages-dev patch Suggested packages: binutils-doc debian-keyring g++-multilib g++-4.4-multilib gcc-4.4-doc libstdc++6-4.4-dbg gcc-multilib autoconf automake1.9 libtool flex bison gdb gcc-doc gcc-4.4-multilib libmudflap0-4.4-dev gcc-4.4-locales libgcc1-dbg libgomp1-dbg libmudflap0-dbg libcloog-ppl0 libppl-c2 libppl7 glibc-doc libstdc++6-4.4-doc make-doc ed diffutils-doc The following NEW packages will be installed: binutils build-essential dpkg-dev fakeroot g++ g++-4.4 gcc gcc-4.4 libalgorithm-diff-perl libalgorithm-diff-xs-perl libalgorithm-merge-perl libc-dev-bin libc6-dev libdpkg-perl libstdc++6-4.4-dev linux-libc-dev make manpages-dev patch ... update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode. Setting up libalgorithm-diff-perl (1.19.02-2) ... Setting up libalgorithm-diff-xs-perl (0.04-1) ... Setting up libalgorithm-merge-perl (0.08-2) ... Setting up manpages-dev (3.27-1) ... Setting up libstdc++6-4.4-dev (4.4.5-8) ... Setting up g++-4.4 (4.4.5-8) ... Setting up g++ (4:4.4.5-1) ... update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode. Setting up build-essential (11.5) ... |
#cd /tmp
|
#wget http://xgu.ru/lilalo/install
--2011-10-17 12:40:16-- http://xgu.ru/lilalo/install Resolving xgu.ru... 91.205.16.235 Connecting to xgu.ru|91.205.16.235|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5285 (5.2K) [text/plain] Saving to: “install” 100%[======================================================================================================================================================================================================>] 5,285 --.-K/s in 0.001s 2011-10-17 12:40:16 (3.76 MB/s) - “install” saved [5285/5285] |
#apt-cache search asterisk
asterisk-mobile - bluetooth mobile devices support for Asterisk asterisk-mp3 - MP3 format support (format_mp3) for the Asterisk PBX asterisk-mysql - MySQL support for the Asterisk PBX (cdr mainly) asterisk-ooh323c - H.323 protocol support for Asterisk (ooh323c stack) asterisk-chan-capi - Common ISDN API 2.0 implementation for Asterisk asterisk-core-sounds-en-g722 - asterisk PBX sound files - English/g722 asterisk-core-sounds-en-gsm - asterisk PBX sound files - English/gsm asterisk-core-sounds-en-wav - asterisk PBX sound files - English/wav asterisk-core-sounds-es-g722 - asterisk PBX sound files - Spanish/g722 asterisk-core-sounds-es-gsm - asterisk PBX sound files - Spanish/gsm ... dahdi-source - DAHDI telephony interface - source code for kernel driver dahdi - utilities for using the DAHDI kernel modules iaxmodem - software modem with IAX2 connectivity libasterisk-agi-perl - Collections of Perl modules to be used with Asterisk PBX AGI libnetsds-perl - Service Delivery Suite framework op-panel - switchboard type application for the Asterisk PBX libopenr2-3 - MFC/R2 (telephony) call setup library python-asterisk - Asterisk Manager API interface module for Python asterisk-prompt-es - Spanish prompts for the Asterisk PBX dahdi-firmware-nonfree - DAHDI non-free firmware |
#atp-get install asterisk asterisk-config asterisk-sounds-main asterisk-sounds-extra
bash: atp-get: command not found |
#apt-get install asterisk asterisk-config asterisk-sounds-main asterisk-sounds-extra
Package configuration ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ⤠Configuring libvpb0 âââââââââââââââââââ â This is the numeric code for the region your phone system will be operating in (eg. 61 for Australia or 33 for France). It is used to configure the default regional standards that Voicetronix telephony hardware should comply with. â â â â ITU-T telephone code: â â â â3801______________________________________________________________________________________________________________________________________________________________________________________________________________________________________ â â â â <Ok> â â â ... Setting up unixodbc (2.2.14p2-1) ... Setting up asterisk (1:1.6.2.9-2+squeeze3) ... Adding system user for Asterisk Adding user `asterisk' to group `dialout' ... Adding user asterisk to group dialout Done. Adding user `asterisk' to group `audio' ... Adding user asterisk to group audio Done. Starting Asterisk PBX: asterisk. |
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart. |
#asterisk -rvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux5 (pid = 11784) ... ss7 stun timing transcoder udptl ulimit unistim voicemail linux5*CLI> sip show p peers peer linux5*CLI> sip show peers Name/username Host Dyn Nat ACL Port Status 0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline] linux5*CLI> sip reload Reloading SIP linux5*CLI> quit Executing last minute cleanups |
#nano /etc/networkinterfases
|
#nano /etc/network/interfaces
--- /tmp/l3-saved-7412.15954.13240 2011-10-17 15:10:17.000000000 +0300 +++ /etc/network/interfaces 2011-10-17 15:13:31.000000000 +0300 @@ -8,11 +8,12 @@ # The primary network interface allow-hotplug eth0 iface eth0 inet static - address 192.168.15.23 + address 192.168.30.1 netmask 255.255.255.0 - network 192.168.15.0 - broadcast 192.168.15.255 - gateway 192.168.15.253 + network 192.168.30.0 + broadcast 192.168.30.255 + gateway 192.168.30.254 # dns-* options are implemented by the resolvconf package, if installed - dns-nameservers 192.168.15.253 + dns-nameservers 192.168.30.254 dns-search linux5.unix.nt + |
#ifup etho
Ignoring unknown interface etho=etho. |
#ifup eth0
ifup: interface eth0 already configured |
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:19:88 inet addr:192.168.15.23 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:1988/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:584847 errors:0 dropped:0 overruns:0 frame:0 TX packets:283020 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:825798883 (787.5 MiB) TX bytes:20149322 (19.2 MiB) Interrupt:20 Memory:fe500000-fe520000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:0 TX packets:2 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:190 (190.0 B) TX bytes:190 (190.0 B) |
#ifdown eth0
SIOCDELRT: No such process |
#ifup eth0
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:46:19:88 inet addr:192.168.30.1 Bcast:192.168.30.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe46:1988/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:584865 errors:0 dropped:0 overruns:0 frame:0 TX packets:283049 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:825803126 (787.5 MiB) TX bytes:20153021 (19.2 MiB) Interrupt:20 Memory:fe500000-fe520000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3 errors:0 dropped:0 overruns:0 frame:0 TX packets:3 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:270 (270.0 B) TX bytes:270 (270.0 B) |
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gw3.unix.nt 0.0.0.0 UG 0 0 0 eth0 192.168.30.0 * 255.255.255.0 U 0 0 0 eth0 |
#ping ya.ru
PING ya.ru (87.250.250.203) 56(84) bytes of data. 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=1 ttl=57 time=25.2 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=2 ttl=57 time=22.9 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=3 ttl=57 time=22.6 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=4 ttl=57 time=22.4 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=5 ttl=57 time=22.4 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=6 ttl=57 time=22.4 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=7 ttl=57 time=22.4 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=8 ttl=57 time=22.7 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=9 ttl=57 time=22.3 ms ... 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=16 ttl=57 time=22.2 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=17 ttl=57 time=22.5 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=18 ttl=57 time=22.8 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=19 ttl=57 time=22.7 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=20 ttl=57 time=22.6 ms 64 bytes from www.yandex.ru (87.250.250.203): icmp_req=21 ttl=57 time=22.8 ms ^C --- ya.ru ping statistics --- 21 packets transmitted, 21 received, 0% packet loss, time 20026ms rtt min/avg/max/mdev = 22.130/22.701/25.286/0.649 ms |
#apt-get install dhcp3-server
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: isc-dhcp-client isc-dhcp-common isc-dhcp-server Suggested packages: resolvconf avahi-autoipd isc-dhcp-server-ldap The following NEW packages will be installed: dhcp3-server isc-dhcp-server The following packages will be upgraded: ... Unpacking dhcp3-server (from .../dhcp3-server_4.1.1-P1-15+squeeze3_all.deb) ... Processing triggers for man-db ... Setting up isc-dhcp-common (4.1.1-P1-15+squeeze3) ... Setting up isc-dhcp-client (4.1.1-P1-15+squeeze3) ... Setting up isc-dhcp-server (4.1.1-P1-15+squeeze3) ... Generating /etc/default/isc-dhcp-server... Starting ISC DHCP server: dhcpdcheck syslog for diagnostics. ... failed! failed! invoke-rc.d: initscript isc-dhcp-server, action "start" failed. Setting up dhcp3-server (4.1.1-P1-15+squeeze3) ... |
#ssh user@192.168.15.252
# No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. #subnet 10.152.187.0 netmask 255.255.255.0 { #} # This is a very basic subnet declaration. #subnet 10.254.239.0 netmask 255.255.255.224 { # range 10.254.239.10 10.254.239.20; # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; #} # This declaration allows BOOTP clients to get dynamic addresses, ... # } # pool { # allow members of "foo"; # range 10.17.224.10 10.17.224.250; # } # pool { # deny members of "foo"; # range 10.0.29.10 10.0.29.230; # } #} |
#nano /etc/dhcp/dhcpd.conf
--- /tmp/l3-saved-7412.10591.17129 2011-10-17 16:05:41.000000000 +0300 +++ /etc/dhcp/dhcpd.conf 2011-10-17 16:12:16.000000000 +0300 @@ -10,8 +10,8 @@ ddns-update-style none; # option definitions common to all supported networks... -option domain-name "example.org"; -option domain-name-servers ns1.example.org, ns2.example.org; +option domain-name "unix.nt"; +option domain-name-servers 10.0.35.1 default-lease-time 600; max-lease-time 7200; @@ -32,8 +32,8 @@ # This is a very basic subnet declaration. -#subnet 10.254.239.0 netmask 255.255.255.224 { -# range 10.254.239.10 10.254.239.20; +subnet 192.168.30.0 netmask 255.255.255.0 { + range 192.168.30.200 192.168.30.250;} # option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; #} |
#/etc/init.d/isc-dhcp-server start
dhcpd self-test failed. Please fix the config file. The error was: Internet Systems Consortium DHCP Server 4.1.1-P1 Copyright 2004-2010 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ /etc/dhcp/dhcpd.conf line 16: semicolon expected. default-lease-time ^ Configuration file errors encountered -- exiting |
#/etc/init.d/isc-dhcp-server status
Status of ISC DHCP server: dhcpd is running. |
#cat /var/lib/dhcp/dhcpd.leases
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.1.1-P1 server-duid "\000\001\000\001\026.\347F,'\327F\031\210"; lease 192.168.30.200 { starts 1 2011/10/17 13:28:19; ends 1 2011/10/17 13:38:19; cltt 1 2011/10/17 13:28:19; binding state active; next binding state free; hardware ethernet 00:19:56:fd:71:26; ... lease 192.168.30.201 { starts 1 2011/10/17 13:30:29; ends 1 2011/10/17 13:40:29; cltt 1 2011/10/17 13:30:29; binding state active; next binding state free; hardware ethernet 00:1d:09:d2:91:d1; uid "\001\000\035\011\322\221\321"; client-hostname "itt_puchek"; } |
#ping 192.168.30.201
PING 192.168.30.201 (192.168.30.201) 56(84) bytes of data. From 192.168.30.1 icmp_seq=191 Destination Host Unreachable From 192.168.30.1 icmp_seq=192 Destination Host Unreachable From 192.168.30.1 icmp_seq=193 Destination Host Unreachable From 192.168.30.1 icmp_seq=194 Destination Host Unreachable From 192.168.30.1 icmp_seq=195 Destination Host Unreachable From 192.168.30.1 icmp_seq=196 Destination Host Unreachable From 192.168.30.1 icmp_seq=197 Destination Host Unreachable From 192.168.30.1 icmp_seq=198 Destination Host Unreachable From 192.168.30.1 icmp_seq=199 Destination Host Unreachable ... From 192.168.30.1 icmp_seq=206 Destination Host Unreachable From 192.168.30.1 icmp_seq=207 Destination Host Unreachable From 192.168.30.1 icmp_seq=208 Destination Host Unreachable From 192.168.30.1 icmp_seq=209 Destination Host Unreachable From 192.168.30.1 icmp_seq=210 Destination Host Unreachable From 192.168.30.1 icmp_seq=211 Destination Host Unreachable ^C --- 192.168.30.201 ping statistics --- 213 packets transmitted, 0 received, +21 errors, 100% packet loss, time 213639ms pipe 3 |
#ping 192.168.30.201
PING 192.168.30.201 (192.168.30.201) 56(84) bytes of data. 64 bytes from 192.168.30.201: icmp_req=1 ttl=128 time=0.261 ms 64 bytes from 192.168.30.201: icmp_req=2 ttl=128 time=0.314 ms 64 bytes from 192.168.30.201: icmp_req=3 ttl=128 time=0.316 ms 64 bytes from 192.168.30.201: icmp_req=4 ttl=128 time=0.301 ms ^C --- 192.168.30.201 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.261/0.298/0.316/0.022 ms |
#nano /etc/asterisk/cip.conf
|
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed
.aptitude/ .asterisk_history .bash_history .bash_profile .bashrc install .l3rc .lilalo/ .profile .ssh/ |
#nano /etc/asterisk/cip.conf | sed 's/;.*//' | expand | greg -xv ' *' |less
|
#cat /etc/asterisk/cip.conf.SAVED | sed 's/;.*//' | expand | greg -xv ' *' > /etc/asterisk/sip.conf
bash: greg: command not found cat: /etc/asterisk/cip.conf.SAVED: No such file or directory |
#cat /etc/asterisk/sip.conf.SAVED | sed 's/;.*//' | expand | greg -xv ' *' > /etc/asterisk/sip.conf
bash: greg: command not found |
#cat /etc/asterisk/sip.conf.SAVED | sed 's/;.*//' | expand | grep -xv ' *' > /etc/asterisk/sip.conf
|
#cat /etc/asterisk/sip.conf.SAVED | sed 's/;.*//' | expand | grep -xv ' *' | head -7 > /etc/asterisk/sip.conf
|
#cat /etc/asterisk/sip.conf
|
#cat /etc/asterisk/sip.conf
|
#[general]
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux5 (pid = 11784) Verbosity is at least 2 linux5*CLI> quit Executing last minute cleanups |
#mv /etc/asterisk/extentions.conf /etc/asterisk/extensions.conf.SAVED
mv: cannot stat `/etc/asterisk/extentions.conf': No such file or directory |
#mv /etc/asterisk/extensions.conf /etc/asterisk/extensions.conf.SAVED
|
#[default]
|
#nano /etc/asterisk/extentions.conf
|
#[default]
|
#mv /etc/asterisk/extentions.conf /etc/asterisk/extensions.conf
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7412.29575.14940 2011-10-17 18:14:52.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 18:18:53.000000000 +0300 @@ -2,3 +2,4 @@ exten => 1399,1,Playback(demo-thanks) exten => 1399,n,Playback(demo-thanks) exten => 1399,n,Playback(demo-thanks) +exten => _140X,1,Dial(SIP/${EXTEN}) |
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-7412.10221.22781 2011-10-17 18:24:34.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-17 18:24:50.000000000 +0300 @@ -2,4 +2,4 @@ exten => 1399,1,Playback(demo-thanks) exten => 1399,n,Playback(demo-thanks) exten => 1399,n,Playback(demo-thanks) -exten => _140X,1,Dial(SIP/${EXTEN}) +exten => _130X,1,Dial(SIP/${EXTEN}) |
#ssh user@192.168.15.252
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that a host key has just been changed. The fingerprint for the RSA key sent by the remote host is 23:4b:a2:99:88:79:fc:35:b7:62:e8:6b:0d:d0:e1:4b. Please contact your system administrator. Add correct host key in /home/user/.ssh/known_hosts to get rid of this message. Offending RSA key in /home/user/.ssh/known_hosts:40 ... Warning: Permanently added '192.168.10.1' (RSA) to the list of known hosts. root@192.168.10.1's password: Linux linux1 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 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: Mon Oct 17 12:51:28 2011 from 10.0.35.1 l3-agent is already running: pid=2179; pidfile=/root/.lilalo/l3-agent.pid |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux5 (pid = 1161) ... == Using SIP RTP CoS mark 5 -- Executing [1301@default:1] Dial("SIP/1302-0000000a", "SIP/1301") in new stack == Using SIP RTP CoS mark 5 -- Called 1301 -- SIP/1301-0000000b is ringing -- SIP/1301-0000000b answered SIP/1302-0000000a -- Native bridging SIP/1302-0000000a and SIP/1301-0000000b == Spawn extension (default, 1301, 1) exited non-zero on 'SIP/1302-0000000a' linux5*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux5 (pid = 1161) Verbosity is at least 5 linux5*CLI> quit Executing last minute cleanups |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux5 (pid = 1161) ... == Using SIP RTP CoS mark 5 [Oct 18 12:36:05] NOTICE[1184]: chan_sip.c:20276 handle_request_invite: Call from 'mn' to extension '1101' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Oct 18 12:36:18] NOTICE[1184]: chan_sip.c:20276 handle_request_invite: Call from 'mn' to extension '3101' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Oct 18 12:36:47] NOTICE[1184]: chan_sip.c:20276 handle_request_invite: Call from '1301' to extension '21' rejected because extension not found in context 'default'. == Using SIP RTP CoS mark 5 [Oct 18 12:36:58] NOTICE[1184]: chan_sip.c:20276 handle_request_invite: Call from '1301' to extension '1201' rejected because extension not found in context 'default'. linux5*CLI> quit Executing last minute cleanups |
#apt-get install sendmail sendmail-bin sensible-mda
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: m4 procmail sendmail-base sendmail-cf Suggested packages: sendmail-doc rmail logcheck resolvconf sasl2-bin Recommended packages: default-mta mail-transport-agent fetchmail The following NEW packages will be installed: ... Updating /etc/mail/access... Linking /etc/aliases to /etc/mail/aliases Updating /etc/mail/aliases... /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total Warning: 3 database(s) sources were not found, (but were created) please investigate. Starting Mail Transport Agent (MTA): sendmail. Setting up sensible-mda (8.14.3-9.4) ... Setting up sendmail (8.14.3-9.4) ... |
#apt-get install vim
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: vim-runtime Suggested packages: ctags vim-doc vim-scripts The following NEW packages will be installed: vim vim-runtime 0 upgraded, 2 newly installed, 0 to remove and 14 not upgraded. ... Setting up vim-runtime (2:7.2.445+hg~cb94c42c0e1a-1) ... Processing /usr/share/vim/addons/doc Setting up vim (2:7.2.445+hg~cb94c42c0e1a-1) ... update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode. update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode. update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode. update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode. update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode. update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode. update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode. |
#MAILER(`smtp')dnl
(Reading database ... 111106 files and directories currently installed.) Removing sendmail ... |
#dpkg -P sendmail-bin
dpkg: dependency problems prevent removal of sendmail-bin: sensible-mda depends on sendmail-bin | mail-transport-agent; however: Package sendmail-bin is to be removed. Package mail-transport-agent is not installed. Package sendmail-bin which provides mail-transport-agent is to be removed. sensible-mda depends on sendmail-bin | mail-transport-agent; however: Package sendmail-bin is to be removed. Package mail-transport-agent is not installed. Package sendmail-bin which provides mail-transport-agent is to be removed. dpkg: error processing sendmail-bin (--purge): dependency problems - not removing Errors were encountered while processing: sendmail-bin |
#dpkg -P sendmail-bin sensible-mds
dpkg: dependency problems prevent removal of sendmail-bin: sensible-mda depends on sendmail-bin | mail-transport-agent; however: Package sendmail-bin is to be removed. Package mail-transport-agent is not installed. Package sendmail-bin which provides mail-transport-agent is to be removed. sensible-mda depends on sendmail-bin | mail-transport-agent; however: Package sendmail-bin is to be removed. Package mail-transport-agent is not installed. Package sendmail-bin which provides mail-transport-agent is to be removed. dpkg: error processing sendmail-bin (--purge): dependency problems - not removing dpkg: warning: ignoring request to remove sensible-mds which isn't installed. Errors were encountered while processing: sendmail-bin |
#dpkg -P sendmail-bin sensible-mda
(Reading database ... 111100 files and directories currently installed.) Removing sensible-mda ... Purging configuration files for sensible-mda ... Removing sendmail-bin ... Purging configuration files for sendmail-bin ... dpkg: warning: while removing sendmail-bin, directory '/usr/share/doc/sendmail' not empty so not removed. dpkg: warning: while removing sendmail-bin, directory '/var/run/sendmail/mta' not empty so not removed. dpkg: warning: while removing sendmail-bin, directory '/var/run/sendmail/stampdir' not empty so not removed. dpkg: warning: while removing sendmail-bin, directory '/var/run/sendmail' not empty so not removed. dpkg: warning: while removing sendmail-bin, directory '/var/lib/sendmail' not empty so not removed. Processing triggers for man-db ... |
#apt-get install sensible-mda sendmail-bin sendmail
Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: sendmail-doc rmail sasl2-bin The following NEW packages will be installed: sendmail sendmail-bin sensible-mda 0 upgraded, 3 newly installed, 0 to remove and 14 not upgraded. Need to get 0 B/1,354 kB of archives. After this operation, 2,552 kB of additional disk space will be used. ... Creating /etc/mail/sendmail.cf... Creating /etc/mail/submit.cf... Informational: confCR_FILE file empty: /etc/mail/relay-domains Informational: confCT_FILE file empty: /etc/mail/trusted-users Updating /etc/mail/access... Updating /etc/mail/aliases... /etc/mail/aliases: 4 aliases, longest 10 bytes, 66 bytes total Starting Mail Transport Agent (MTA): sendmail. Setting up sensible-mda (8.14.3-9.4) ... Setting up sendmail (8.14.3-9.4) ... |
#MAILER(`smtp')dnl
linux5 |
#hostname -f
linux5.linux5.unix.nt |
#vim /etc/hosts
|
#vim /etc/hosts
--- /tmp/l3-saved-5427.1409.2255 2011-10-18 14:25:30.000000000 +0300 +++ /etc/hosts 2011-10-18 14:25:46.000000000 +0300 @@ -1,5 +1,5 @@ 127.0.0.1 localhost -192.168.15.23 linux5.unix.nt linux5 +192.168.30.1 linux3.unix.nt linux3 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback |
#cat /etc/hosts
127.0.0.1 localhost 192.168.30.1 linux3.unix.nt linux3 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters |
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-5427.215.23737 2011-10-18 14:25:54.000000000 +0300 +++ /etc/mail/sendmail.mc 2011-10-18 14:26:07.000000000 +0300 @@ -96,6 +96,11 @@ dnl # include(`/etc/mail/m4/dialup.m4')dnl include(`/etc/mail/m4/provider.m4')dnl +dnl # Masquerading options +FEATURE(`always_add_domain')dnl +MASQUERADE_AS(`linux9.unix.nt')dnl +FEATURE(`allmasquerade')dnl +FEATURE(`masquerade_envelope')dnl dnl # dnl # Default Mailer setup MAILER_DEFINITIONS |
#cat /etc/hostname
linux5 |
#echo linux3 > /etc/hostname
|
#host 192.168.50.1
1.50.168.192.in-addr.arpa domain name pointer linux5.unix.nt. |
#host linux5.unix.nt
linux5.unix.nt has address 192.168.50.1 linux5.unix.nt has address 192.168.105.1 |
#vim /etc/mail/access
|
#vim /etc/mail/sendmail.mc
--- /tmp/l3-saved-5801.13931.13602 2011-10-18 14:35:06.000000000 +0300 +++ /etc/mail/sendmail.mc 2011-10-18 14:35:17.000000000 +0300 @@ -96,6 +96,11 @@ dnl # include(`/etc/mail/m4/dialup.m4')dnl include(`/etc/mail/m4/provider.m4')dnl +dnl # Masquerading options +FEATURE(`always_add_domain')dnl +MASQUERADE_AS(`linux2.unix.nt')dnl +FEATURE(`allmasquerade')dnl +FEATURE(`masquerade_envelope')dnl dnl # dnl # Default Mailer setup MAILER_DEFINITIONS |
#divert(-1)dnl
# # Mail aliases for sendmail # # You must run newaliases(1) after making changes to this file. # # Required aliases postmaster: root MAILER-DAEMON: postmaster # Common aliases abuse: postmaster spam: postmaster # Other aliases [1]+ Stopped less /etc/aliases |
#apt-get install qpopper
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: openbsd-inetd tcpd The following NEW packages will be installed: openbsd-inetd qpopper tcpd 0 upgraded, 3 newly installed, 0 to remove and 14 not upgraded. Need to get 488 kB of archives. After this operation, 909 kB of additional disk space will be used. ... Selecting previously deselected package openbsd-inetd. Unpacking openbsd-inetd (from .../openbsd-inetd_0.20080125-6_i386.deb) ... Selecting previously deselected package qpopper. Unpacking qpopper (from .../qpopper_4.0.9.dfsg-1.2_i386.deb) ... Processing triggers for man-db ... Setting up tcpd (7.6.q-19) ... Setting up openbsd-inetd (0.20080125-6) ... Stopping internet superserver: inetd. Not starting internet superserver: no services enabled. Setting up qpopper (4.0.9.dfsg-1.2) ... |
#vim /etc/mail/access
|
#fg
# # Blacklisted users # #Connect:rampellsoft.com 554 Email directly, not through didtheyreadit.com reject@ REJECT #cyberpromo.com REJECT #From:MAILER-DAEMON@store2.netvisao.pt REJECT # # Block invalid IPs # ... # # Don't offer AUTH on local network #SRV_Features:192.168.1 A # # Hosts with to allow relaying # # # Hosts that validly forward to me #GreetPause:<ip> 0 #ClientRate:<ip> 30 |
#fg
# Defaults GreetPause: 5000 ClientRate: 10 ClientConn: 10 # # Don't offer AUTH on local network #SRV_Features:192.168.1 A # # Hosts with to allow relaying # ... #cyberpromo.com REJECT #From:MAILER-DAEMON@store2.netvisao.pt REJECT # # Block invalid IPs # #Connect:0 REJECT whilst invalid, this also blocks sendmail -bs -Am Connect:169.254 REJECT Connect:192.0.2 REJECT Connect:224 REJECT Connect:255 REJECT |
#nano /etc/mail/access
--- /tmp/l3-saved-2408.15870.9880 2011-10-18 14:59:01.000000000 +0300 +++ /etc/mail/access 2011-10-18 14:59:42.000000000 +0300 @@ -97,7 +97,7 @@ #Connect:172.29 RELAY #Connect:172.30 RELAY #Connect:172.31 RELAY -#Connect:192.168 RELAY +Connect:192.168.30 RELAY #GreetPause:192.168 0 #ClientRate:192.168 0 #ClientConn:192.168 0 |
#/etc/mail/access
linux3 |
#127.0.0.1 localhost
|
#This file describes the network interfaces available on your system
|
#nano /etc/asterisk/extensions.conf
--- /tmp/l3-saved-6432.29648.31467 2011-10-18 15:48:25.000000000 +0300 +++ /etc/asterisk/extensions.conf 2011-10-18 15:48:40.000000000 +0300 @@ -1,8 +1,8 @@ [default] -;---------------- -;RESOURCES -;---------------- +; ---------------- +; RESOURCES +; ---------------- [internal] |
#asterisk -rvvvvv
Asterisk 1.6.2.9-2+squeeze3, Copyright (C) 1999 - 2010 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. ========================================================================= == Parsing '/etc/asterisk/asterisk.conf': == Found == Parsing '/etc/asterisk/extconfig.conf': == Found Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux3 (pid = 1161) Verbosity is at least 5 linux3*CLI> linux3*CLI> == Using SIP RTP CoS mark 5 [Oct 18 15:52:03] NOTICE[1184]: chan_sip.c:20276 handle_request_invite: Call from '1301' to extension '1401' rejected because extension not found in context 'default'. linux3*CLI> quit Executing last minute cleanups |
#vim /etc/asterisk/sip.conf
--- /tmp/l3-saved-7017.17182.7735 2011-10-18 15:52:14.000000000 +0300 +++ /etc/asterisk/sip.conf 2011-10-18 15:52:26.000000000 +0300 @@ -1,4 +1,4 @@ -\[general] +[general] context=default allowoverlap=no udpbindaddr=0.0.0.0 |
#{EXTEN},10)
|
linux5
127.0.0.1 localhost 192.168.30.1 linux3.unix.nt linux3 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
# The format of this file is documented in the dhcpd.leases(5) manual page. # This lease file was written by isc-dhcp-4.1.1-P1 server-duid "\000\001\000\001\026.\347F,'\327F\031\210"; lease 192.168.30.200 { starts 1 2011/10/17 13:28:19; ends 1 2011/10/17 13:38:19; cltt 1 2011/10/17 13:28:19; binding state active; next binding state free; hardware ethernet 00:19:56:fd:71:26; uid "\001\000\031V\375q&"; client-hostname "SEP001956FD7126"; } lease 192.168.30.201 { starts 1 2011/10/17 13:30:27; ends 1 2011/10/17 13:40:27; cltt 1 2011/10/17 13:30:27; binding state active; next binding state free; hardware ethernet 00:1d:09:d2:91:d1; uid "\001\000\035\011\322\221\321"; client-hostname "itt_puchek"; } lease 192.168.30.201 { starts 1 2011/10/17 13:30:29; ends 1 2011/10/17 13:40:29; cltt 1 2011/10/17 13:30:29; binding state active; next binding state free; hardware ethernet 00:1d:09:d2:91:d1; uid "\001\000\035\011\322\221\321"; client-hostname "itt_puchek"; }
Время первой команды журнала | 11:31:07 2011-10-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 14:59:55 2011-10-18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 26.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 5.79 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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