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

Содержание

Журнал

Понедельник (10/17/11)

/dev/tty1
11:47:42
#ls

/dev/pts/3
11:48:49
#cat .bash_profile
l3-agent
. ~/.bashrc
11:48:55
#pws
bash: pws: команда не найдена
11:48:56
#pwd
/home/user
11:48:58
#cd

11:49:00
#cat .bash_profile
l3-agent
. ~/.bashrc
11:49:02
#less /tmp/
11:49:33
#less /tmp/
11:49:33
#less /tmp/
11:49:33
#pwd
/root
/dev/tty1
11:49:53
#cd /tmp

11:49:55
#ls
keyring-vs8d0p  libgksu-ZS0hET  orbit-Debian-gdm  orbit-root  orbit-user  seahorse-2n4YTh  ssh-OkDwga1788  virtual-user.idagzc
11:49:55
#wget http://xgu.ru/lilalo/install
--2011-10-17 12:50:03--  http://xgu.ru/lilalo/install
Распознаётся xgu.ru... 91.205.16.235
Устанавливается соединение с xgu.ru|91.205.16.235|:80... соединение установлено.
Запрос HTTP послан, ожидается ответ... 200 OK
Длина: 5285 (5,2K) [text/plain]
Saving to: «install»
100%[======================================================================================================================================================================================================>] 5 285       --.-K/s   в 0,001s
2011-10-17 12:50:03 (3,54 MB/s) - «install» saved [5285/5285]
11:50:03
#ls
install  keyring-vs8d0p  libgksu-ZS0hET  orbit-Debian-gdm  orbit-root  orbit-user  seahorse-2n4YTh  ssh-OkDwga1788  virtual-user.idagzc
11:50:05
#vi install
--- /tmp/l3-saved-2109.14111.5264	2011-10-17 12:50:07.000000000 +0300
+++ install	2011-10-17 12:50:25.000000000 +0300
@@ -7,8 +7,8 @@
 #
 # Set this variables before installation:
 
-lilalo_user=${lilalo_user:-YOUR-L3BACKEND-USER}
-lab=${lab:-SET-YOUR-FIRSTLAB-NAME-HERE}
+lilalo_user=vadik
+lab=nt-voip
 install_l3bashrc_for_this_users=${users:-"root user"}  # users who will use l3agent and l3script
 lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
 
/dev/pts/3
11:50:39
#cd /tmp/

11:50:44
#ls
install         orbit-Debian-gdm  seahorse-2n4YTh
keyring-vs8d0p  orbit-root        ssh-OkDwga1788
libgksu-ZS0hET  orbit-user        virtual-user.idagzc
11:50:45
#cat install
#!/bin/sh
hostname=`hostname`
uname -a | grep -qi freebsd || hostname=`hostname -f`
###############################################################################
#
# Set this variables before installation:
lilalo_user=vadik
lab=nt-voip
install_l3bashrc_for_this_users=${users:-"root user"}  # users who will use l3agent and l3script
lilalo_context="/users/${lilalo_user}/${lab}/${hostname}"
...
step "Downloading l3prompt" ${wget} ${url_l3prompt}
step "Downloading l3-agent" '${wget} ${url_l3agent}; ${wget} ${url_l3config_pm}; ${wget} ${url_l3config}'
step "Downloading perl modules for l3-agent" '{ for i in ${perl_modules}; do ${wget} ${url_perl_modules}/$i.tar.gz; done; }'
step "Installing perl modules for l3-agent" '{ for i in ${perl_modules}; do tar xvfz $i.tar.gz; cd $i*[^z]; perl Makefile.PL; make; make install; cd ..; done; }'
step "Installing l3bashrc to users home directories" install_to_users_homes $install_l3bashrc_for_this_users
step "Adding l3bashrc invocation to ~/.bashrc " install_to_users_bashrc $install_l3bashrc_for_this_users
step "Adding l3-agent invocation to ~/.bash_profile " install_to_users_bash_profile $install_l3bashrc_for_this_users
cd /
rm -rf ${temp_dir}
show_final_message
11:50:47
#who
root     tty1         2011-10-17 12:47
user     tty7         2011-10-17 12:45 (:0)
user     pts/0        2011-10-17 12:51 (:0.0)
root     pts/3        2011-10-17 12:48 (:0.0)
root     pts/5        2011-10-17 12:51 (10.0.35.1)
/dev/pts/5
11:51:28
#cat ~/.l3rc
l3cd=/users/vadik/nt-voip/linux1.unix.nt/root
11:51:36
#su - user
#alias ll='ls -l'
    #alias dir='dir --color=auto'
#alias la='ls -A'
    #alias vdir='vdir --color=auto'
#alias l='ls -CF'
# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
if [ -f ~/.bash_aliases ]; then
...
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
    . /etc/bash_completion
fi
. /home/user/.lilalo/l3bashrc && _l3_start
[ $0 == l3script ] && . /home/user/.lilalo/l3bashrc && _l3_start                                                                             100,1       Внизу
".bashrc" 100L, 3227C записано
user@linux1:~$ exit
logout
/dev/pts/3
11:51:43
#w
 12:51:45 up 6 min,  5 users,  load average: 0,22, 0,29, 0,16
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
root     tty1                      12:47    1:20   0.20s  0.02s script -f -c ba
user     tty7     :0               12:45    6:14  10.78s  0.07s x-session-manag
user     pts/0    :0.0             12:51   29.00s  0.10s  0.10s bash
root     pts/3    :0.0             12:48    0.00s  0.00s  0.00s script -f -c ba
root     pts/5    10.0.35.1        12:51    0.00s  0.13s  0.00s script -f -c ba
/dev/pts/5
11:52:06
#ps aux | grep l3
user      1952  0.0  0.0  11776  5776 ?        Ss   12:46   0:00 l3-agent
root      2002  0.9  0.1  14448  9012 ?        Ss   12:47   0:02 l3-agent
root      2586  0.0  0.0   5076   720 pts/6    S+   12:52   0:00 grep l3
11:53:15
#vim /home/user/.bashrc
11:54:07
#. /home/user/.lilalo/l3bashrc && _l3_start
l3-agent
. ~/.bashrc
"/home/user/.bash_profile" 3L, 22C
прошло 69 минут
/dev/pts/4
13:03:27
#ssh user@192.168.15.252
RSA key fingerprint is f0:05:a6:a6:88:29:cd:4d:7a:23:9b:50:fa:00:de:0c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.15.29' (RSA) to the list of known hosts.
root@192.168.15.29's password:
Linux linux9 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.
l3-agent is already running: pid=7776; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/5
13:03:27
#ssh user@192.168.15.252
user@book:~$ пашет
bash: пашет: command not found
user@book:~$ паÑscreen -x
Attaching from inside of screen?
user@book:~$
su: Authentication failure
user@book:~$ # СÑенсÑей рут пас не логинится... Плиз хелп
user@book:~$ ыsudo su -
[sudo] password for user:
Sorry, try again.
...
root@192.168.15.29's password: 5.5
The programs included with the Debian GNU/Linux system are free software;
Linux linux9 2.6.39-bpo.2-686-pae #1 SMP Thu Aug 4 11:02:22 UTC 2011 i686
the exact distribution terms for each program are described in the
user@book:~$ ssh root@192.168.15.29
individual files in /usr/share/doc/*/copyright.
The authenticity of host '192.168.15.29 (192.168.15.29)' can't be established.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
l3-agent is already running: pid=7776; pidfile=/root/.lilalo/l3-agent.pid
прошло 17 минут
/dev/pts/1
13:20:40
#apt-get install asterisk asterisk-config asterisk-sounds-main
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Будут установлены следующие дополнительные пакеты:
  autopoint dahdi dahdi-linux debhelper fancontrol freetds-common fxload
  gettext git html2text intltool-debian libc-client2007e libcorosync4 libcurl3
  liberror-perl libgmime-2.0-2a libiksemel3 libmail-sendmail-perl libopenais3
  libopenr2-3 libpq5 libpri1.4 libradiusclient-ng2 libresample1 libsensors4
  libsnmp-base libsnmp15 libsox-fmt-alsa libsox-fmt-base libsox1b libspandsp2
  libsqlite0 libss7-1 libssh2-1 libsybdb5 libsys-hostname-long-perl
...
Настраивается пакет unixodbc (2.2.14p2-1) ...
Настраивается пакет asterisk (1:1.6.2.9-2+squeeze3) ...
Adding system user for Asterisk
Добавляется пользователь «asterisk» в группу «dialout» ...
Добавление пользователя asterisk в группу dialout
Готово.
Добавляется пользователь «asterisk» в группу «audio» ...
Добавление пользователя asterisk в группу audio
Готово.
Starting Asterisk PBX: asterisk.
/dev/pts/7
13:20:40
#apt-get install asterisk asterisk-config asterisk-sounds-main
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Будут установлены следующие дополнительные пакеты:
  autopoint dahdi dahdi-linux debhelper fancontrol freetds-common fxload
  gettext git html2text intltool-debian libc-client2007e libcorosync4 libcurl3
  liberror-perl libgmime-2.0-2a libiksemel3 libmail-sendmail-perl libopenais3
  libopenr2-3 libpq5 libpri1.4 libradiusclient-ng2 libresample1 libsensors4
  libsnmp-base libsnmp15 libsox-fmt-alsa libsox-fmt-base libsox1b libspandsp2
  libsqlite0 libss7-1 libssh2-1 libsybdb5 libsys-hostname-long-perl
...
Настраивается пакет unixodbc (2.2.14p2-1) ...
Настраивается пакет asterisk (1:1.6.2.9-2+squeeze3) ...
Adding system user for Asterisk
Добавляется пользователь «asterisk» в группу «dialout» ...
Добавление пользователя asterisk в группу dialout
Готово.
Добавляется пользователь «asterisk» в группу «audio» ...
Добавление пользователя asterisk в группу audio
Готово.
Starting Asterisk PBX: asterisk.
/dev/pts/1
13:23:56
#cd /etc/asterisk/

/dev/pts/7
13:23:56
#cd /etc/asterisk/

/dev/pts/1
13:29:37
#ls
adsi.conf                enum.conf               muted.conf
adtranvofr.conf          extconfig.conf          osp.conf
agents.conf              extensions.ael          oss.conf
ais.conf                 extensions.conf         phone.conf
alarmreceiver.conf       extensions.lua          phoneprov.conf
alsa.conf                extensions_minivm.conf  queuerules.conf
amd.conf                 features.conf           queues.conf
asterisk.adsi            festival.conf           res_config_sqlite.conf
asterisk.conf            followme.conf           res_ldap.conf
cdr_adaptive_odbc.conf   func_odbc.conf          res_odbc.conf
...
chan_dahdi.conf          jingle.conf             skinny.conf
cli_aliases.conf         logger.conf             sla.conf
cli.conf                 manager.conf            smdi.conf
cli_permissions.conf     manager.d               telcordia-1.adsi
codecs.conf              meetme.conf             udptl.conf
console.conf             mgcp.conf               unistim.conf
dbsep.conf               minivm.conf             usbradio.conf
dnsmgr.conf              misdn.conf              users.conf
dsp.conf                 modules.conf            voicemail.conf
dundi.conf               musiconhold.conf        vpb.conf
/dev/pts/7
13:29:37
#ls
adsi.conf                enum.conf               muted.conf
adtranvofr.conf          extconfig.conf          osp.conf
agents.conf              extensions.ael          oss.conf
ais.conf                 extensions.conf         phone.conf
alarmreceiver.conf       extensions.lua          phoneprov.conf
alsa.conf                extensions_minivm.conf  queuerules.conf
amd.conf                 features.conf           queues.conf
asterisk.adsi            festival.conf           res_config_sqlite.conf
asterisk.conf            followme.conf           res_ldap.conf
cdr_adaptive_odbc.conf   func_odbc.conf          res_odbc.conf
...
chan_dahdi.conf          jingle.conf             skinny.conf
cli_aliases.conf         logger.conf             sla.conf
cli.conf                 manager.conf            smdi.conf
cli_permissions.conf     manager.d               telcordia-1.adsi
codecs.conf              meetme.conf             udptl.conf
console.conf             mgcp.conf               unistim.conf
dbsep.conf               minivm.conf             usbradio.conf
dnsmgr.conf              misdn.conf              users.conf
dsp.conf                 modules.conf            voicemail.conf
dundi.conf               musiconhold.conf        vpb.conf
13:29:40
#mc
/dev/pts/1
13:29:40
#mc
прошло 13 минут
13:43:15
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart.
/dev/pts/7
13:43:15
#/etc/init.d/asterisk start
Asterisk PBX is already running. Use restart.
/dev/pts/1
13:43:23
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/7
13:43:23
#/etc/init.d/asterisk restart
Stopping Asterisk PBX: asterisk.
Starting Asterisk PBX: asterisk.
/dev/pts/1
13:43:29
#dpkg-query -L | grep aster
dpkg-query: --listfiles требует указания хотя бы одного имени пакета
Используйте параметр --help для вывода справки по запросам пакетов.
/dev/pts/7
13:43:29
#dpkg-query -L | grep aster
dpkg-query: --listfiles требует указания хотя бы одного имени пакета
Используйте параметр --help для вывода справки по запросам пакетов.
/dev/pts/1
13:43:49
#dpkg-query -L
dpkg-query: --listfiles требует указания хотя бы одного имени пакета
Используйте параметр --help для вывода справки по запросам пакетов.
/dev/pts/7
13:43:49
#dpkg-query -L
dpkg-query: --listfiles требует указания хотя бы одного имени пакета
Используйте параметр --help для вывода справки по запросам пакетов.
/dev/pts/1
13:43:53
#dpkg-query
dpkg-query: укажите требуемое действие
Используйте параметр --help для вывода справки по запросам пакетов.
/dev/pts/7
13:43:53
#dpkg-query
dpkg-query: укажите требуемое действие
Используйте параметр --help для вывода справки по запросам пакетов.
/dev/pts/1
13:43:55
#dpkg-query
adsi.conf                enum.conf                muted.conf
adtranvofr.conf          extconfig.conf           osp.conf
agents.conf              extensions.ael           oss.conf
ais.conf                 extensions.conf          phone.conf
alarmreceiver.conf       extensions.lua           phoneprov.conf
alsa.conf                extensions_minivm.conf   queuerules.conf
amd.conf                 features.conf            queues.conf
asterisk.adsi            festival.conf            res_config_sqlite.conf
asterisk.conf            followme.conf            res_ldap.conf
cdr_adaptive_odbc.conf   func_odbc.conf           res_odbc.conf
...
cdr_odbc.conf            iax.conf                 rtp.conf
cdr_pgsql.conf           iaxprov.conf             say.conf
cdr_sqlite3_custom.conf  indications.conf         sip.conf
cdr_tds.conf             jabber.conf              sip_notify.conf
chan_dahdi.conf          jingle.conf              skinny.conf
cli_aliases.conf         logger.conf              sla.conf
cli.conf                 manager.conf             smdi.conf
cli_permissions.conf     manager.d/               telcordia-1.adsi
codecs.conf              meetme.conf              udptl.conf
console.conf             mgcp.conf                unistim.conf
13:43:55