/l3/users/alexp/nt-voip/linux4.univ.nt/root :1 :2 :3 :4 :5 :6 :7 |
|
#history
1 useradd alexp 2 passwd alexp 3 cd /tmp 4 wget http://xgu.ru/lilalo/install 5 vim install 6 nano install 7 nano install 8 nano install 9 bash install 10 nano /root/.bashrc 11 nano /home/user/.bashrc 12 . ~/.bashrc 13 history |
#nano install
|
#l3-agent
l3-agent is already running: pid=4543; pidfile=/root/.lilalo/l3-agent.pid |
#nano ~/.bash_profile
--- /tmp/l3-saved-4575.30886.31177 2011-10-17 12:43:11.000000000 +0300 +++ /root/.bash_profile 2011-10-17 12:43:37.000000000 +0300 @@ -1,2 +1,2 @@ l3-agent - +. ~/.bashrc |
#l3-agent
bash: logout: not login shell: use `exit' |
#l3-agent
|
#l3-agent
|
#l3-agent
|
#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 |
#route -n
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.15.253 0.0.0.0 UG 0 0 0 eth0 192.168.15.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 |
#nano /etc/network
|
#nano /etc/network/
|
#nano /etc/network/interfaces
--- /tmp/l3-saved-5082.10844.6631 2011-10-17 14:08:35.000000000 +0300 +++ /etc/network/interfaces 2011-10-17 14:09:07.000000000 +0300 @@ -15,4 +15,4 @@ gateway 192.168.15.253 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 10.0.35.1 - dns-search univ.nt + dns-search unix.nt |
#This file describes the network interfaces available on your system
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default switch.unix.nt 0.0.0.0 UG 0 0 0 eth0 localnet * 255.255.255.0 U 0 0 0 eth0 |
#dpkg -L asterisk | less
|
#dpkg -L asterisk
/. /etc /etc/logrotate.d /etc/logrotate.d/asterisk /etc/init.d /etc/init.d/asterisk /etc/default /etc/default/asterisk /etc/asterisk /usr ... /var/lib/asterisk/sounds/custom /var/lib/asterisk/moh /var/log /var/log/asterisk /var/log/asterisk/cdr-csv /var/log/asterisk/cdr-custom /usr/share/man/man8/rasterisk.8.gz /usr/share/asterisk/sounds/custom /usr/share/asterisk/sounds/recordings /usr/sbin/rasterisk |
#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 |
#apt-cache show asterisk-mp3
Package: asterisk-mp3 Priority: optional Section: comm Installed-Size: 108 Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org> Architecture: i386 Source: asterisk-addons Version: 1.6.2.1-1 Depends: asterisk-1.6.2, libc6 (>= 2.1.3) Filename: pool/main/a/asterisk-addons/asterisk-mp3_1.6.2.1-1_i386.deb ... Asterisk is an Open Source PBX and telephony toolkit. . This package provides read-only native support for MP3 files for the Asterisk PBX. This should allow you to, e.g, play MP3 files using Playback() or Background() from the dialplan. . For more information about the Asterisk PBX, have a look at the Asterisk package. Homepage: http://www.asterisk.org/ Tag: role::shared-lib, works-with::audio, works-with-format::mp3 |
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart. |
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk. Starting Asterisk PBX: asterisk. |
#asterisk -vvvvv
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 Asterisk already running on /var/run/asterisk/asterisk.ctl. Use 'asterisk -r' to connect. |
#ps aux | grep asterisk
asterisk 8617 0.4 0.2 48280 18220 ? Ssl 14:43 0:00 /usr/sbin/asterisk -p -U asterisk asterisk 8618 0.0 0.0 2936 564 ? S 14:43 0:00 astcanary /var/run/asterisk/alt.asterisk.canary.tweet.tweet.tweet 8617 root 8684 0.0 0.0 3904 724 pts/2 S+ 14:44 0:00 grep asterisk |
#cat /etc/asterisk/
adsi.conf codecs.conf indications.conf res_odbc.conf adtranvofr.conf console.conf jabber.conf res_pgsql.conf agents.conf dbsep.conf jingle.conf res_snmp.conf ais.conf dnsmgr.conf logger.conf rpt.conf alarmreceiver.conf dsp.conf manager.conf rtp.conf alsa.conf dundi.conf manager.d/ say.conf amd.conf enum.conf meetme.conf sip.conf asterisk.adsi extconfig.conf mgcp.conf sip_notify.conf asterisk.conf extensions.ael minivm.conf skinny.conf cdr_adaptive_odbc.conf extensions.conf misdn.conf sla.conf cdr.conf extensions.lua modules.conf smdi.conf cdr_custom.conf extensions_minivm.conf musiconhold.conf telcordia-1.adsi cdr_manager.conf features.conf muted.conf udptl.conf cdr_odbc.conf festival.conf osp.conf unistim.conf cdr_pgsql.conf followme.conf oss.conf usbradio.conf cdr_sqlite3_custom.conf func_odbc.conf phone.conf users.conf cdr_tds.conf gtalk.conf phoneprov.conf voicemail.conf chan_dahdi.conf h323.conf queuerules.conf vpb.conf cli_aliases.conf http.conf queues.conf cli.conf iax.conf res_config_sqlite.conf cli_permissions.conf iaxprov.conf res_ldap.conf |
#cat /etc/asterisk/asterisk.conf
[directories](!) ; remove the (!) to enable this astetcdir => /etc/asterisk astmoddir => /usr/lib/asterisk/modules astvarlibdir => /var/lib/asterisk astdbdir => /var/lib/asterisk astkeydir => /var/lib/asterisk astdatadir => /usr/share/asterisk astagidir => /usr/share/asterisk/agi-bin astspooldir => /var/spool/asterisk astrundir => /var/run/asterisk ... ; Changing the following lines may compromise your security. ;[files] ;astctlpermissions = 0660 ;astctlowner = root ;astctlgroup = apache ;astctl = asterisk.ctl [compat] pbx_realtime=1.6 res_agi=1.6 app_set=1.6 |
#cat /etc/asterisk/
adsi.conf codecs.conf indications.conf res_odbc.conf adtranvofr.conf console.conf jabber.conf res_pgsql.conf agents.conf dbsep.conf jingle.conf res_snmp.conf ais.conf dnsmgr.conf logger.conf rpt.conf alarmreceiver.conf dsp.conf manager.conf rtp.conf alsa.conf dundi.conf manager.d/ say.conf amd.conf enum.conf meetme.conf sip.conf asterisk.adsi extconfig.conf mgcp.conf sip_notify.conf asterisk.conf extensions.ael minivm.conf skinny.conf cdr_adaptive_odbc.conf extensions.conf misdn.conf sla.conf cdr.conf extensions.lua modules.conf smdi.conf cdr_custom.conf extensions_minivm.conf musiconhold.conf telcordia-1.adsi cdr_manager.conf features.conf muted.conf udptl.conf cdr_odbc.conf festival.conf osp.conf unistim.conf cdr_pgsql.conf followme.conf oss.conf usbradio.conf cdr_sqlite3_custom.conf func_odbc.conf phone.conf users.conf cdr_tds.conf gtalk.conf phoneprov.conf voicemail.conf chan_dahdi.conf h323.conf queuerules.conf vpb.conf cli_aliases.conf http.conf queues.conf cli.conf iax.conf res_config_sqlite.conf cli_permissions.conf iaxprov.conf res_ldap.conf |
#asterisk -r
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. ========================================================================= Connected to Asterisk 1.6.2.9-2+squeeze3 currently running on linux4 (pid = 8617) linux4*CLI> exit |
#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 linux4 (pid = 8617) ... [ Context 'dundi-e164-local' created by 'pbx_config' ] Include => 'dundi-e164-canonical' [pbx_config] Include => 'dundi-e164-customers' [pbx_config] Include => 'dundi-e164-via-pstn' [pbx_config] [ Context 'dundi-e164-via-pstn' created by 'pbx_config' ] [ Context 'dundi-e164-customers' created by 'pbx_config' ] [ Context 'dundi-e164-canonical' created by 'pbx_config' ] -= 82 extensions (200 priorities) in 49 contexts. =- linux4*CLI> quit Executing last minute cleanups |
#/etc/dhcp/dhclient-e
dhclient-enter-hooks.d/ dhclient-exit-hooks.d/ |
#/etc/dhcp/dhcp3-server
bash: /etc/dhcp/dhcp3-server: No such file or directory |
#/etc/init.d/dhcp3-server
bash: /etc/init.d/dhcp3-server: No such file or directory |
#aptitude install dhcp3-server
The following NEW packages will be installed: dhcp3-server isc-dhcp-server The following packages will be upgraded: isc-dhcp-common 1 packages upgraded, 2 newly installed, 0 to remove and 15 not upgraded. Need to get 719 kB of archives. After unpacking 926 kB will be used. The following packages have unmet dependencies: isc-dhcp-client: Depends: isc-dhcp-common (= 4.1.1-P1-15+squeeze2) but 4.1.1-P1-15+squeeze3 is to be installed. The following actions will resolve these dependencies: Remove the following packages: ... 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-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) ... Current status: 14 updates [-2]. |
#/etc/init.d/dhcp3-server
bash: /etc/init.d/dhcp3-server: No such file or directory |
#/etc/init.d/dhcp3-server stop
bash: /etc/init.d/dhcp3-server: No such file or directory |
#ps
PID TTY TIME CMD 5082 pts/2 00:00:00 bash 8460 pts/2 00:00:00 less 8716 pts/2 00:00:00 man 8727 pts/2 00:00:00 pager 9283 pts/2 00:00:00 ps |
#ps aux | grep dhcp
root 9305 0.0 0.0 3904 724 pts/2 S+ 15:07 0:00 grep dhcp |
#ifdown
ifdown: Use --help for help |
#ifdown --help
Usage: ifdown <options> <ifaces...> Options: -h, --help this help -V, --version copyright and version information -a, --all de/configure all interfaces marked "auto" --allow CLASS ignore non-"allow-CLASS" interfaces -i, --interfaces FILE use FILE for interface definitions -n, --no-act print out what would happen, but don't do it (note that this option doesn't disable mappings) -v, --verbose print out what would happen before doing it --no-mappings don't run any mappings --force force de/configuration |
#ifdown -i eth0
ifdown: Use --help for help |
#ifdown -i all
ifdown: Use --help for help |
#ifdown -a
|
#ifup -a
|
#ifconfig
eth0 Link encap:Ethernet HWaddr 2c:27:d7:29:6c:67 inet addr:192.168.15.24 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::2e27:d7ff:fe29:6c67/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:574966 errors:0 dropped:0 overruns:0 frame:0 TX packets:280338 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:806583932 (769.2 MiB) TX bytes:20223711 (19.2 MiB) Interrupt:20 Memory:fe400000-fe420000 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:33 errors:0 dropped:0 overruns:0 frame:0 TX packets:33 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:3368 (3.2 KiB) TX bytes:3368 (3.2 KiB) |
#nano /etc/network/interfaces
|
#ifdown eth0
ifdown: interface eth0 not configured |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifdown
ifdown: Use --help for help |
#ifdown --help
Usage: ifdown <options> <ifaces...> Options: -h, --help this help -V, --version copyright and version information -a, --all de/configure all interfaces marked "auto" --allow CLASS ignore non-"allow-CLASS" interfaces -i, --interfaces FILE use FILE for interface definitions -n, --no-act print out what would happen, but don't do it (note that this option doesn't disable mappings) -v, --verbose print out what would happen before doing it --no-mappings don't run any mappings --force force de/configuration |
#nano /etc/network/interfaces
|
#ifdown eth1
ifdown: interface eth1 not configured |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifup
ifup: Use --help for help |
#-h
bash: -h: command not found |
#ifup -h
Usage: ifup <options> <ifaces...> Options: -h, --help this help -V, --version copyright and version information -a, --all de/configure all interfaces marked "auto" --allow CLASS ignore non-"allow-CLASS" interfaces -i, --interfaces FILE use FILE for interface definitions -n, --no-act print out what would happen, but don't do it (note that this option doesn't disable mappings) -v, --verbose print out what would happen before doing it --no-mappings don't run any mappings --force force de/configuration |
#ifup -i eth0 -n
ifup: Use --help for help |
#ifdown -in eth0
ifdown: couldn't read interfaces file "n" |
#ifdown -i -n eth0
ifdown: couldn't read interfaces file "-n" |
#ifdown -i eth0 -n
ifdown: Use --help for help |
#ifdown -i eth0
ifdown: Use --help for help |
#ifdown eth0
ifdown: interface eth0 not configured |
#ifdowneth0
bash: ifdowneth0: command not found |
#ifdown eth0
ifdown: interface eth0 not configured |
#/etc/init.d/
acpid bootlogd cpufrequtils halt isc-dhcp-server mountall-bootclean.sh mtab.sh rcS single umountfs alsa-utils bootlogs cron hdparm kbd mountall.sh networking reboot ssh umountnfs.sh anacron bootmisc.sh dahdi hostname.sh keyboard-setup mountdevsubfs.sh network-manager rmnologin stop-bootlogd umountroot asterisk checkfs.sh dbus hwclockfirst.sh killprocs mountkernfs.sh pppd-dns rsync stop-bootlogd-single unattended-upgrades avahi-daemon checkroot.sh fancontrol hwclock.sh lm-sensors mountnfs-bootclean.sh procps rsyslog sudo urandom binfmt-support console-cyrillic fuse ifupdown loadcpufreq mountnfs.sh rc saned udev x11-common bluetooth console-setup gdm3 ifupdown-clean module-init-tools mountoverflowtmp rc.local sendsigs udev-mtab |
#/etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces ... (warning). Reconfiguring network interfaces...done. |
#/etc/init.d/networking stop
Deconfiguring network interfaces...done. |
#/etc/init.d/networking start
Configuring network interfaces...done. |
#/etc/init.d/ifupdown
Usage: /etc/init.d/ifupdown {start|stop|restart|force-reload} |
#/etc/init.d/ifupdown restart
Setting up networking.... |
#This file describes the network interfaces available on your system
bash: logout: not login shell: use `exit' |
#This file describes the network interfaces available on your system
ifdown: interface eth0 not configured |
#ifup eth0
|
#route
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default gw4.unix.nt 0.0.0.0 UG 0 0 0 eth0 192.168.40.0 * 255.255.255.0 U 0 0 0 eth0 |
#ping ya.ru
PING ya.ru (87.250.251.3) 56(84) bytes of data. 64 bytes from www.yandex.ru (87.250.251.3): icmp_req=1 ttl=56 time=22.6 ms 64 bytes from www.yandex.ru (87.250.251.3): icmp_req=2 ttl=56 time=23.0 ms 64 bytes from www.yandex.ru (87.250.251.3): icmp_req=3 ttl=56 time=22.7 ms ^C --- ya.ru ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 22.666/22.817/23.019/0.192 ms |
#ssh user@192.168.15.252
The following NEW packages will be installed: dhcp3-server isc-dhcp-server 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 403 kB of archives. After this operation, 926 kB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://10.0.35.1/debian/ squeeze/main isc-dhcp-server i386 4.1.1-P1-15+squeeze3 [377 kB] Get:2 http://10.0.35.1/debian/ squeeze/main dhcp3-server all 4.1.1-P1-15+squeeze3 [25.9 kB] Fetched 403 kB in 0s (10.6 MB/s) Preconfiguring packages ... ... pxe - free PXE daemon python-pydhcplib - Python DHCP client/server library resolvconf - name server information handler totd - Small DNS proxy that supports IPv6/IPv4 record translation wide-dhcpv6-server - DHCPv6 server for automatic IPv6 hosts configuration [root@linux5:~]# [root@linux5:~]# [root@linux5:~]# [root@linux5:~]# --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
#nano /etc/dhcp/dhcpd.conf
|
#efault-lease-time 600;39-32-1.example.org;fied, the address will belag
1 useradd alexp 2 passwd alexp 3 cd /tmp 4 wget http://xgu.ru/lilalo/install 5 vim install 6 nano install 7 nano install 8 nano install 9 bash install 10 nano /root/.bashrc ... 91 /etc/init.d/ifupdown 92 /etc/init.d/ifupdown restart 93 ifconfig 94 nano /etc/network/interfaces 95 logout 96 exit 97 nano /etc/network/interfaces 98 nano /etc/dhcp3/dhcpd.conf 99 nano /etc/dhcp/dhcpd.conf 100 history |
#/etc/init.d/dhcp3-server
bash: /etc/init.d/dhcp3-server: No such file or directory |
#/etc/init.d/dhcp-server
bash: /etc/init.d/dhcp-server: No such file or directory |
#/etc/init.d/ics-dhcp-server
bash: /etc/init.d/ics-dhcp-server: No such file or directory |
#ls
acpi debian_version hdparm.conf logrotate.conf passwd sgml adduser.conf default host.conf logrotate.d passwd- shadow adjtime defoma hostname lsb-base perl shadow- alternatives deluser.conf hosts magic pm shells anacrontab dhcp hosts.allow magic.mime polkit-1 skel apache2 dictionaries-common hosts.deny mailcap ppp snmp apm dpkg iceweasel mailcap.order profile sound apt emacs ifplugd manpath.config profile.d ssh asterisk environment init.d menu protocols ssl avahi esound initramfs-tools menu-methods pulse sudoers ... console-setup gnome-vfs-mime-magic ld.so.conf.d nsswitch.conf rmt vga cron.d gre.d libao.conf obex-data-server rpc vim cron.daily groff libaudit.conf ODBCDataSources rsyslog.conf wgetrc cron.hourly group libpaper.d odbc.ini rsyslog.d wildmidi cron.monthly group- lilalo openoffice sane.d wpa_supplicant crontab grub.d locale.alias opt securetty X11 cron.weekly gshadow locale.gen pam.conf security xdg dahdi gshadow- localtime pam.d sensors3.conf xml dbus-1 gtk-2.0 logcheck pango sensors.d debconf.conf gtkmathview login.defs papersize services |
#cd init.d/
|
#ls
acpid console-cyrillic hwclockfirst.sh mountall.sh rc.local stop-bootlogd alsa-utils console-setup hwclock.sh mountdevsubfs.sh rcS stop-bootlogd-single anacron cpufrequtils ifupdown mountkernfs.sh README sudo asterisk cron ifupdown-clean mountnfs-bootclean.sh reboot udev avahi-daemon dahdi isc-dhcp-server mountnfs.sh rmnologin udev-mtab binfmt-support dbus kbd mountoverflowtmp rsync umountfs bluetooth fancontrol keyboard-setup mtab.sh rsyslog umountnfs.sh bootlogd fuse killprocs networking saned umountroot bootlogs gdm3 lm-sensors network-manager sendsigs unattended-upgrades bootmisc.sh halt loadcpufreq pppd-dns single urandom checkfs.sh hdparm module-init-tools procps skeleton x11-common checkroot.sh hostname.sh mountall-bootclean.sh rc ssh |
#cd /
|
#/etc/init.d/isc-dhcp-server
Usage: /etc/init.d/isc-dhcp-server {start|stop|restart|force-reload|status} |
#/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 36: unexpected end of file ^ Configuration file errors encountered -- exiting |
#/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 36: expecting left brace. range ^ Configuration file errors encountered -- exiting |
#/etc/init.d/isc-dhcp-server start
Starting ISC DHCP server: dhcpd. |
#/etc/init.d/isc-dhcp-server status
Status of ISC DHCP server: dhcpd is running. |
#cat /var/lib/dhcp/dhcp.lease
cat: /var/lib/dhcp/dhcp.lease: No such file or directory |
#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 linux4 (pid = 8617) ... channel channels channelstats domains history inuse mwi objects peer peers registry sched settings subscriptions tcp users user linux4*CLI> sip show pee peers peer linux4*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] linux4*CLI> exit Executing last minute cleanups |
#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.\346 ,'\327)lg"; lease 192.168.40.200 { starts 1 2011/10/17 13:13:21; ends 1 2011/10/17 13:23:21; cltt 1 2011/10/17 13:13:21; binding state active; next binding state free; hardware ethernet 00:24:21:f6:3c:85; ... lease 192.168.40.200 { starts 1 2011/10/17 13:20:55; ends 1 2011/10/17 13:30:55; cltt 1 2011/10/17 13:20:55; binding state active; next binding state free; hardware ethernet 00:24:21:f6:3c:85; uid "\001\000$!\366<\205"; client-hostname "nf-note"; } |
#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 lease 192.168.40.200 { starts 1 2011/10/17 13:20:55; ends 1 2011/10/17 13:30:55; tstp 1 2011/10/17 13:30:55; cltt 1 2011/10/17 13:20:55; binding state active; next binding state free; hardware ethernet 00:24:21:f6:3c:85; ... lease 192.168.40.201 { starts 1 2011/10/17 13:28:20; ends 2 2011/10/18 09:28:20; cltt 1 2011/10/17 13:28:20; binding state active; next binding state free; hardware ethernet 00:19:e7:14:25:e6; uid "\001\000\031\347\024%\346"; client-hostname "SEP0019E71425E6"; } |
#ping 192.168.40.201
PING 192.168.40.201 (192.168.40.201) 56(84) bytes of data. 64 bytes from 192.168.40.201: icmp_req=1 ttl=250 time=60.3 ms 64 bytes from 192.168.40.201: icmp_req=2 ttl=250 time=69.3 ms ^C --- 192.168.40.201 ping statistics --- 3 packets transmitted, 2 received, 33% packet loss, time 2002ms rtt min/avg/max/mdev = 60.315/64.840/69.365/4.525 ms |
#ping 192.168.40.200
PING 192.168.40.200 (192.168.40.200) 56(84) bytes of data. 64 bytes from 192.168.40.200: icmp_req=7 ttl=128 time=0.802 ms 64 bytes from 192.168.40.200: icmp_req=8 ttl=128 time=0.526 ms 64 bytes from 192.168.40.200: icmp_req=9 ttl=128 time=0.477 ms 64 bytes from 192.168.40.200: icmp_req=10 ttl=128 time=0.468 ms 64 bytes from 192.168.40.200: icmp_req=11 ttl=128 time=0.501 ms 64 bytes from 192.168.40.200: icmp_req=12 ttl=128 time=0.373 ms 64 bytes from 192.168.40.200: icmp_req=13 ttl=128 time=0.442 ms 64 bytes from 192.168.40.200: icmp_req=14 ttl=128 time=0.505 ms 64 bytes from 192.168.40.200: icmp_req=15 ttl=128 time=0.420 ms ^C --- 192.168.40.200 ping statistics --- 15 packets transmitted, 9 received, 40% packet loss, time 14045ms rtt min/avg/max/mdev = 0.373/0.501/0.802/0.117 ms |
#ping 10.0.35.1
PING 10.0.35.1 (10.0.35.1) 56(84) bytes of data. 64 bytes from 10.0.35.1: icmp_req=1 ttl=63 time=0.228 ms 64 bytes from 10.0.35.1: icmp_req=2 ttl=63 time=0.246 ms 64 bytes from 10.0.35.1: icmp_req=3 ttl=63 time=0.263 ms 64 bytes from 10.0.35.1: icmp_req=4 ttl=63 time=0.245 ms ^C --- 10.0.35.1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 2999ms rtt min/avg/max/mdev = 0.228/0.245/0.263/0.019 ms |
adsi.conf codecs.conf indications.conf res_odbc.conf adtranvofr.conf console.conf jabber.conf res_pgsql.conf agents.conf dbsep.conf jingle.conf res_snmp.conf ais.conf dnsmgr.conf logger.conf rpt.conf alarmreceiver.conf dsp.conf manager.conf rtp.conf alsa.conf dundi.conf manager.d/ say.conf amd.conf enum.conf meetme.conf sip.conf asterisk.adsi extconfig.conf mgcp.conf sip_notify.conf asterisk.conf extensions.ael minivm.conf skinny.conf cdr_adaptive_odbc.conf extensions.conf misdn.conf sla.conf cdr.conf extensions.lua modules.conf smdi.conf cdr_custom.conf extensions_minivm.conf musiconhold.conf telcordia-1.adsi cdr_manager.conf features.conf muted.conf udptl.conf cdr_odbc.conf festival.conf osp.conf unistim.conf cdr_pgsql.conf followme.conf oss.conf usbradio.conf cdr_sqlite3_custom.conf func_odbc.conf phone.conf users.conf cdr_tds.conf gtalk.conf phoneprov.conf voicemail.conf chan_dahdi.conf h323.conf queuerules.conf vpb.conf cli_aliases.conf http.conf queues.conf cli.conf iax.conf res_config_sqlite.conf cli_permissions.conf iaxprov.conf res_ldap.conf
[directories](!) ; remove the (!) to enable this astetcdir => /etc/asterisk astmoddir => /usr/lib/asterisk/modules astvarlibdir => /var/lib/asterisk astdbdir => /var/lib/asterisk astkeydir => /var/lib/asterisk astdatadir => /usr/share/asterisk astagidir => /usr/share/asterisk/agi-bin astspooldir => /var/spool/asterisk astrundir => /var/run/asterisk astlogdir => /var/log/asterisk [options] ;verbose = 3 ;debug = 3 ;alwaysfork = yes ; same as -F at startup ;nofork = yes ; same as -f at startup ;quiet = yes ; same as -q at startup ;timestamp = yes ; same as -T at startup ;execincludes = yes ; support #exec in config files ;console = yes ; Run as console (same as -c at startup) ;highpriority = yes ; Run realtime priority (same as -p at startup) ;initcrypto = yes ; Initialize crypto keys (same as -i at startup) ;nocolor = yes ; Disable console colors ;dontwarn = yes ; Disable some warnings ;dumpcore = yes ; Dump core on crash (same as -g at startup) ;languageprefix = yes ; Use the new sound prefix path syntax ;internal_timing = yes ;systemname = my_system_name ; prefix uniqueid with a system name for global uniqueness issues ;autosystemname = yes ; automatically set systemname to hostname - uses 'localhost' on failure, or systemname if set ;maxcalls = 10 ; Maximum amount of calls allowed ;maxload = 0.9 ; Asterisk stops accepting new calls if the load average exceed this limit ;maxfiles = 1000 ; Maximum amount of openfiles ;minmemfree = 1 ; in MBs, Asterisk stops accepting new calls if the amount of free memory falls below this watermark ;cache_record_files = yes ; Cache recorded sound files to another directory during recording ;record_cache_dir = /tmp ; Specify cache directory (used in conjunction with cache_record_files) ;transmit_silence_during_record = yes ; Transmit SLINEAR silence while a channel is being recorded ;transmit_silence = yes ; Transmit silence while a channel is in a waiting state, a recording only state, or when DTMF is ; being generated. Note that the silence internally is generated in raw signed linear format. ; This means that it must be transcoded into the native format of the channel before it can be sent ; to the device. It is for this reason that this is optional, as it may result in requiring a ; temporary codec translation path for a channel that may not otherwise require one. ;transcode_via_sln = yes ; Build transcode paths via SLINEAR, instead of directly ;sendfullybooted = yes ; Send the FullyBooted AMI event on AMI login and when all modules are finished loading ;runuser = asterisk ; The user to run as ;rungroup = asterisk ; The group to run as ;lightbackground = yes ; If your terminal is set for a light-colored background documentation_language = en_US ; Set the Language you want Documentation displayed in. Value is in the same format as locale names ;hideconnect = yes ; Hide messages displayed when a remote console connects and disconnects ; Changing the following lines may compromise your security. ;[files] ;astctlpermissions = 0660 ;astctlowner = root ;astctlgroup = apache ;astctl = asterisk.ctl [compat] pbx_realtime=1.6 res_agi=1.6 app_set=1.6
# 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 lease 192.168.40.200 { starts 1 2011/10/17 13:20:55; ends 1 2011/10/17 13:30:55; tstp 1 2011/10/17 13:30:55; cltt 1 2011/10/17 13:20:55; binding state active; next binding state free; hardware ethernet 00:24:21:f6:3c:85; uid "\001\000$!\366<\205"; client-hostname "nf-note"; } server-duid "\000\001\000\001\026.\346 ,'\327)lg"; lease 192.168.40.201 { starts 1 2011/10/17 13:28:20; ends 2 2011/10/18 09:28:20; cltt 1 2011/10/17 13:28:20; binding state active; next binding state free; hardware ethernet 00:19:e7:14:25:e6; uid "\001\000\031\347\024%\346"; client-hostname "SEP0019E71425E6"; }
Время первой команды журнала | 11:29:31 2011-10-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 15:31:32 2011-10-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 21.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 10.00 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.91 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.57 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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