LINUX.ORG.RU

Сообщения lolshchto

 

backup from linux to windows

есть один сервер, на нём висит сайт, общим размером (загруженные файлы, база, программный код) около 40 гигабайт. делать резервное копирование тупым пакованием всего в архив не подходит, место быстро заканчивается, что как бы и не удивительно. вообще можно было всё так и оставить паковаться в огромные архивы и затем удалять старые таким же методом. НО, клиент хочет иметь возможность сидя у себя за ноутбуком «нажимать на кнопочку» и чтобы бекап копировался ему на внешний хард. В этом собственно и есть вопрос, каким образом можно организовать что-то подобное? например если бы была физическая возможность подключить внешний диск к серверу, то я бы это легко организовал с помощью какого-нибудь rsync+udev, тогда бы и нажимать на кнопочку «копировать» не нужно было бы, но как такое сделать для моей ситуации, когда данные нужно передавать по интернету + копировать не весь архив, а только новые и изменённые файлы.

lolshchto
()

mysql local-infile=1 не срабатывает

debian 7.1
mysql 5.5
php5.4
при попытке выполнить запрос из php

LOAD DATA LOCAL INFILE '/var/www/file.txt' REPLACE INTO TABLE tbl FIELDS TERMINATED BY '|' ENCLOSED BY '' IGNORE 1 LINES
получаю ошибку
1148: The used command is not allowed with this MySQL version.

добавил во все возможные секции client, mysql, mysqld, mysqld_safe в файле /etc/mysql/my.cnf

local-infile=1

перезагрузку mysql делал, ошибка не исчезает. в гугле только это и советуют, бла-бла добавьте в [client] local-infile, но это нихера не работает. что я делаю не так?

 ,

lolshchto
()

зависает на Verifying DMI Pool Data после обновления ubuntu из 11.10 до 12.10

в биосе приоритетным стоит hdd, загрузится можно лишь нажав f12 и выбрав в ручную hdd из списка, хотя он и так отмечен крестиком, вроде как должен быть по умолчанию.

какие могут быть причины такого поведения?

lolshchto
()

монтирование внешнего винта (usb) при подключении к ubuntu

если комп работает без монитора и подключить к нему жесткий диск, он не монтируется автоматически (смотрю статус через ssh), хотя это происходит если сначала залогинится под юзером в GUI, иначе приходится делать sudo umount /dev/sdb1 /media/hdd

как сделать чтобы винт автоматически понтировался в /media/hdd если нет ни одного юзера работающего под GUI, то есть воткнул его в usb и он с ним можно работать?

и сразу тут же вопрос, как после монтирования выполнить свой скрипт, который будет сливать заранее указанные файлы на только что смонтированный диск?

было бы идеально если бы он ещё и авторазмонтировался после завершения выполнения скрипта :D

lolshchto
()

есть один сервер

нужно установить http://dklab.ru/lib/dklab_realplexor/ чтобы запустить его на том же сервере, есть несколько вариантов: - разместить на поддомене - проксировать через nginx

вариант с поддоменом не подходит, так как у меня просто нет ещё одного ip, я так понимаю без участия провайдера, либо ещё одной линии мне не обойтись

вариант с nginx не подходит, потому что nginx повесить на 80 порт не могу, там уже висит апач с десятком сайтов

что делать хз. посоветуйте что-то..

lolshchto
()

не компилируется faac

в первый раз вижу чтобы ./configure останавливался с такой вот ошибкой «.in'ig.status: error: cannot find input file: `»

./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking dependency style of g++... (cached) gcc3
checking how to run the C++ preprocessor... g++ -E
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC -DPIC
checking if g++ PIC flag -fPIC -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking for u_int32_t... yes
checking for u_int16_t... yes
checking for int32_t... yes
checking for int16_t... yes
checking whether strcasecmp is declared... yes
checking for getopt_long in -lgnugetopt... no
checking whether MP4Create is declared... no
checking whether MP4MetadataDelete is declared... no
configure: *** Building with internal mp4v2 ***
checking whether byte ordering is bigendian... no
checking for ANSI C header files... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking mathf.h usability... no
checking mathf.h presence... no
checking for mathf.h... no
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking whether strchr is declared... yes
checking whether memcpy is declared... yes
checking whether strsep is declared... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for off_t... yes
checking for in_port_t... yes
checking for socklen_t... yes
checking for fpos_t.__pos... yes
configure: creating ./config.status
.in'ig.status: error: cannot find input file: `

делал следующее:

aclocal -I .
autoheader
libtoolize --automake
automake --add-missing
autoconf
./configure

lolshchto
()

как полностью снести mysql?

переносил пользователей из старого сервера, вроде как не затрагивал рутов и других системных пользователей, но меня всё равно не пускает теперь в pma. пробовал сбросить рутовый пароль, но не смог остановить сам mysql,

/etc/init.d/mysql stop
Stopping MySQL database server: mysqld failed!
снести тоже не получается.
aptitude purge mysql-server-5.1
The following packages will be REMOVED:  
  mysql-server-5.1{p} mysql-server-core-5.1{u} 
0 packages upgraded, 0 newly installed, 2 to remove and 6 not upgraded.
Need to get 0 B of archives. After unpacking 26.5 MB will be freed.
Do you want to continue? [Y/n/?] 
(Reading database ... 70184 files and directories currently installed.)
Removing mysql-server-5.1 ...
Stopping MySQL database server: mysqld failed!
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing mysql-server-5.1 (--purge):
 subprocess installed pre-removal script returned error exit status 1
configured to not write apport reports
                                      Stopping MySQL database server: mysqld failed!
invoke-rc.d: initscript mysql, action "stop" failed.
Starting MySQL database server: mysqld already running.
Errors were encountered while processing:
 mysql-server-5.1
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:

lolshchto
()

rhythmbox не интегрируется в меню управления звуком

ubuntu 12.04
не понятно почему перестал запускаться rhythmbox из меню, того где можно регулировать громкость (скрин http://i.imgur.com/pKgDq.jpg), даже если его запустить из терминала, то всё равно в этом меню ничего не происходит, как будто он не запущен, кнопки влево вправо не работают.. также пропала возможность управлять им через клавиатуру. раньше например запускал проигрыватель через ctrl+alt+a сейчас ничего не происходит. сносил и ставил его уже несколько раз.

lolshchto
()

после замены сетевой карты не раздаётся инет в локальную сеть

есть локальная сеть на несколько машин. все win7 и есть ещё одна с ubuntu-server 10.10, убунту работает как шлюз и сервер печати (присоединён epson stylus photo 1410), на нём стоит две сетевухи eth0 и eth2. eth0 смотрит внутрь сети и соответственно eth2 в интернет. до этого было наоборот, та сетевуха что смотрит в локальную сеть, смотрела в инет, но начались глюки при печати из внутренней сети. при отправке документа на печать сетевуха падала, то есть внутрь не шёл даже ping. я заменил их местами, настроил /etc/network/interfaces , на шлюзе инет появился, в локальную сеть тоже пинг идёт. но из локальной сети нет доступа к инету, например делаю ping ya.ru мне в ответ:

Обмен пакетами с ya.ru [87.250.250.3] с 32 байтами данных: превышен ожидания для запроса.

на шлюзе

cat /proc/sys/net/ipv4/ip_forward
1
iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             192.168.0.104       
ACCEPT     all  --  anywhere             192.168.0.53        

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
cat /etc/network/interfaces
auto lo
iface lo inet loopback

iface eth2 inet dhcp
hwaddress ether 002191ff8f79
auto eht2

iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
auto eth0

lolshchto
()

не собирается ffmpeg-php. debian

debian squeeze
пытаюсь установить ffmpeg-php.0.5.3
сам ffmpeg собран, и вроде нормально работает, а вот к php никак не могу вот ошибки которые появляются при «make»

/bin/bash /root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/libtool --mode=compile gcc  -I. -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3 -DPHP_ATOM_INC -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/include -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/main -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/  -DHAVE_CONFIG_H  -g -O2 -Wall -fno-strict-aliasing   -c /root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c -o ffmpeg-php.lo 
libtool: compile:  gcc -I. -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3 -DPHP_ATOM_INC -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/include -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/main -I/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/usr/local/include/libavcodec/ -I/usr/local/include/libavformat/ -I/usr/local/include/libavutil/ -I/usr/local/include/libswscale/ -I/usr/local/include/libavfilter/ -I/usr/local/include/libavdevice/ -DHAVE_CONFIG_H -g -O2 -Wall -fno-strict-aliasing -c /root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c  -fPIC -DPIC -o .libs/ffmpeg-php.o
In file included from /usr/include/x86_64-linux-gnu/sys/stat.h:107,
                 from /usr/include/php5/main/php_streams.h:28,
                 from /usr/include/php5/main/php.h:401,
                 from /root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c:40:
/usr/include/x86_64-linux-gnu/bits/stat.h:91: error: field ‘st_atim’ has incomplete type
/usr/include/x86_64-linux-gnu/bits/stat.h:92: error: field ‘st_mtim’ has incomplete type
/usr/include/x86_64-linux-gnu/bits/stat.h:93: error: field ‘st_ctim’ has incomplete type
In file included from /usr/include/php5/main/php_streams.h:28,
                 from /usr/include/php5/main/php.h:401,
                 from /root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c:40:
/usr/include/x86_64-linux-gnu/sys/stat.h:367: error: array type has incomplete element type
/usr/include/x86_64-linux-gnu/sys/stat.h:374: error: array type has incomplete element type
In file included from /usr/include/php5/main/php.h:407,
                 from /root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c:40:
/usr/include/php5/TSRM/tsrm_virtual_cwd.h:198: error: expected specifier-qualifier-list before ‘time_t’
/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c: In function ‘zm_startup_ffmpeg’:
/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c:91: warning: implicit declaration of function ‘avcodec_init’
/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c:110: warning: implicit declaration of function ‘avcodec_build’
/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c: In function ‘zm_shutdown_ffmpeg’:
/root/tmp/php-ffmpeg/f53/ffmpeg-php-0.5.3/ffmpeg-php.c:121: warning: implicit declaration of function ‘av_free_static’
make: *** [ffmpeg-php.lo] Error 1
гугл меня скоро забанит на самом деле, уже вдоль и поперёк его перерыл.. подскажите что не хватает?

lolshchto
()

ffmpeg_movie. getFrame всегда возвращает false

хотя getFramesCount показывает что их больше тысячи (для примера).

вот ответ на команду ffmpeg -i 1.flv (1.flv тестовый файлс которым проблемы в getFrame())

ffmpeg version N-42520-gab46300 Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul 15 2012 06:19:17 with gcc 4.4.7
  configuration: 
  libavutil      51. 64.100 / 51. 64.100
  libavcodec     54. 40.100 / 54. 40.100
  libavformat    54. 16.104 / 54. 16.104
  libavdevice    54.  1.100 / 54.  1.100
  libavfilter     3.  2.100 /  3.  2.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
Input #0, flv, from '1.flv':
  Metadata:
    starttime       : 0
    totalduration   : 333
    totaldatarate   : 526
    bytelength      : 21864175
    canseekontime   : true
    sourcedata      : BD5BA7AC9HH1342876884093335
    purl            : 
    pmsg            : 
  Duration: 00:05:32.76, start: 0.000000, bitrate: 525 kb/s
    Stream #0:0: Video: h264 (Main), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 431 kb/s, 25 tbr, 1k tbn, 50 tbc
    Stream #0:1: Audio: aac, 44100 Hz, stereo, s16, 98 kb/s
ещё появляются нотисы на конструктор ffmpeg_movie

Notice: ffmpeg_movie::__construct() []: Unsupported video codec (7)

lolshchto
()

upload_tmp_dir не срабатывает

apache2 debian php5.2
в настройках хоста указано:
DocumentRoot /home/user/site.com
php_admin_value open_basedir «/home/user/:.»
php_admin_value upload_tmp_dir «/home/user/tmp»

в phpinfo() видно что upload_tmp_dir такой же как и в настройке хоста. есть говноскрипт (писал не я), который загружает аватар пользователя, примерно следующего содержания

//говнокод
$avat_size=$_FILES['file']['size'];
$avat_name=$_FILES['file']['name'];
$size = GetImageSize($_FILES['file']['tmp_name']);
//другой говнокод
самое интересное что временный файл всё-равно заливается в /tmp

Warning: getimagesize() [function.getimagesize]: open_basedir restriction in effect. File(/tmp/phpHq9AVa) is not within the allowed path(s): (/home/user/:.)

как так? кто сталкивался? (на сервере ещё куча сайтов, у других нет проблем с загрузкой файлов)

upd: проблема была в том что владельцем /home/user/tmp был root.

lolshchto
()

скриншот вебсайта

в php на данный момент нет встроенного механизма для этих целей. но уже существует много сайтов-сервисов предоставляющих такую возможность. Вот захотелось и мне сделать со своим блекджеком и шлюхами, но для личных целей. судя по мануалам из google, это делается довольно просто

exec('khtml2png2 http://www.google.com google.png');
предварительно запустив Xvfb и экспортировать DISPLAY, оно то вроде и работает если тестить php -r 'exec(...', а из под пользователя www-data такое не прокатывает.
<?php
exec("Xvfb :2 -screen 0 1024x768x24&");
exec("export DISPLAY=localhost:2.0");
exec("khtml2png2 http://www.google.com/ /var/www/google.png");

вот что в логе

_XSERVTransSocketINETCreateListener: ...SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn't already running
khtml2png2: cannot connect to X server

как стартовать иподключится к X server из под пользователя www-data?

lolshchto
()

PTY allocation request failed on channel 0 (debian)

если логинится по shh то в приветствии появилась надпись

PTY allocation request failed on channel 0

бла бла стандартное приветствие

и отсутствует привычная оболочка, тоесть как бы все, почти все, базовые команды работают в нормальном режиме, но например пропала привычная надпись
user@server # пропали алиасы команд, ещё например top не запускается, пишет

TERM environment variable not set

раньше через клавишу Tab была автозаполнение, а сейчас просто табуляция ставится. очень похоже на sh вместо bash, хотя не уверен. не очень разбираюсь в этом..

lolshchto
()

не могу залогинится под рутом debian 6

на virtualbox поставил сегодня debian в качестве полигона для тестов. при установке пароль для root выставил как цифра «1», а для пользователя user - цифру «2». после установки под user залогинится получается, а под root никак, зайти через ctrl+alt+f1 не получается так как эта комбинация не доходит до виртуалки, а перехватывается самой хост системой. пользователь user почему-то не имеет права использовать sudo.. не пойму где я накосячил.. переустанавливать - это снова убить два часа, как-то не хочется.

lolshchto
()

найти забытый порт от ssh

было дело осенью, собрал полигон на debian из старенького компа для тестирования и просто «поиграться». помню что ssh ставил и сменил порт на нечто вроде 7765 но точно не помню номер порта.. nmap не видит ничего кроме 3 портов (80,53,111) точно знаю что есть и от ssh. чем ещё можно порты просканировать? или может есть что-то вроде брута для обнаружения нужного порта?

lolshchto
()

установка grub вручную

знаю что боян и тем много было, юзал поиск и по форуму и по гуглу. уже часа 4 не могу понять что я делаю не так, ведь ошибок нет. переносил ось на другой винт. сделал бекап через remastersys. 2 попытки уставить его были успешны на 99% grub на отрез отказывался ставится, повторно делал бекап, проверял md5 всё ок. а grub по прежнему не хотел ставится и предлагал установить его в ручную уже потом. что я собственно и пытаюсь сделать. загрузился в livecd примонтировал корень, установил в него grub. после ребута grub появился но, он выглядит не так как обычно, тоесть запускается некая оболочка ожидающая команд для подгрузки kernel.
тоесть зайти в ось можно только выполнив следующее

root (hd0,0)
kernel /boot/vmlinuz-2.6.35-31-generic-pae root=/dev/sda1
initrd /boot/initrd.img-2.6.35-31-generic-pae
boot
#пошла нормальная загрузка
пробовал ставить grub2 и grub уже из под загрузившейся системы. результат всегда один. даже поле всяческих grub-update и grub-install. пробовал ставить lilo. liloconfig сообщил следующее (UUID=2eb8a55f-6280-4f16-8fd3-2b51692b5c83 это /dev/sda1)

Согласно конфигурационному файлу /etc/fstab будет взято устройство UUID=2eb8a55f-6280-4f16-8fd3-2b51692b5c83 в качестве устройства для корневой │ │ файловой системы. Оно не похоже на «обычное» блочное устройство. Или у вас неправильный fstab и вы должны исправить его, или вы используете аппаратуру │ │ (типа RAID-массива), с которой эта простая программа настройки не знает что делать.

fstab -l

Диск /dev/sda: 160.0 ГБ, 160041885696 байт
255 heads, 63 sectors/track, 19457 cylinders
Units = цилиндры of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00097856

Устр-во Загр     Начало       Конец       Блоки   Id  Система
/dev/sda1               1        4869    39101440   83  Linux
/dev/sda2            4869       19458   117186561    5  Расширенный
/dev/sda5            4869        5476     4881408   82  Linux своп / Solaris
/dev/sda6            5476        9124    29296640   83  Linux
/dev/sda7            9124       19458    83006464   83  Linux
uname -a
Linux server 2.6.35-31-generic-pae #62-Ubuntu SMP Tue Nov 8 15:43:23 UTC 2011 i686 GNU/Linux

и немножко не по теме, может подскажите ламеру почему ssh не принимает соединение

Read from socket failed: Connection reset by peer

порт открыт, конфиг идентичен тому что был на старом винте..

lolshchto
()

dns-server на машине из локальной сети

есть сервер (ubuntu-server внутрь 192.168.0.100) как шлюз для интернета в локальной сети, за одно ещё и как вторичный dns-сервер для нескольких сайтов. на наделе собрал ещё один на debain (192.168.0.21). в панели домена указал ip конторы где всё это находится как первичный dns-сервер. биндится нормально. адрес site.com указывает на ip главного сервера. вопрос в следующем, как сделать так чтобы бинд на шлюзе на заканчивался а проходил во внутрь локали на свежесобранный сервер? можно было бы просто пробросить 53 порт на 192.168.0.21, но хочется чтобы шлюз и дальше оставался вторичным сервером для остальных сайтов, а выбранный домен искался дальше в локальной сети. в голове крутятся несколько вариантов:
1) убрать запись о домене на шлюзе (будет ли шлюз опрашивать всех «подчинённых» в частности debian, который как раз так и будет отвечать?)
2) изменить запись на шлюзе, а именно указать site.com in a 192.168.0.21

был и третий вариант но пока писал многабукав, уже забыл.. направьте на путь истинный.

lolshchto
()

scp + cron

набросал скрипт который бекапит файлы и отправляет из через scp на другой сервер. scp запрашивает пароль, пихаю его через expect. если запускать скрипт самому ./lol.sh но всё нормально и архивируется и копируется, если же вешаю на крон этот же скрипт то он только создаёт архивы но не отправляет их.

#!/bin/bash
cd /var/www/backups
find -mtime +14 -name "backup*" -delete
cd /var/www/data
bname=backup`date "+%Y-%m-%d"`.tar.gz
mname=backup_mysql_`date "+%Y-%m-%d"`.tar.gz
pass="querty"
tar czf $bname --exclude="*.tar.gz" www pma
mv $bname ../backups/$bname
backdir="/var/www/backups/tmp"
files=(
db_name
db1_name
)
cd $backdir
for i in "${files[@]}"
do
namedb=backup_"${i}"_`date "+%Y-%m-%d"`
mysqldump -uroot -pquerty -hlocalhost "${i}" > ${namedb}.sql
tar czf ${namedb}.tar.gz ${namedb}.sql
rm ${namedb}.sql
done
tar czf ${mname} --exclude=${mname} *
mv ${mname} ../
cd ../
expect -c "
spawn scp ${bname} ${mname} user@server:/somedir
expect { 
"*password:*" { send $pass\r\n; interact } 
eof { exit }
}
exit
"
rm -rf tmp
mkdir tmp

#crontab
0 2 */7 * * root /var/www/b.sh

на мыло приходит сообщение

spawn scp backup_somedate.tar.gz backup_mysql_somedate.tar.gz user@server:/somedir user@server's password:

ида, ось debian squeeze

lolshchto
()

debian. кто много есть памяти?

переехал на новый vds. на старом debian5

             total       used       free     shared    buffers     cached
Mem:           384        130        253          0          0          0
на новом debian6 с теми же сайтами
             total       used       free     shared    buffers     cached
Mem:          1003        827        176          0         55        660
не пойму куда почти вся память бежит. а вот собственно ps aux на новом
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   8352   784 ?        Ss   Sep06   0:01 init [2]  
root         2  0.0  0.0      0     0 ?        S    Sep06   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Sep06   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    Sep06   0:00 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S    Sep06   0:00 [watchdog/0]
root         6  0.0  0.0      0     0 ?        S    Sep06   0:01 [events/0]
root         7  0.0  0.0      0     0 ?        S    Sep06   0:00 [cpuset]
root         8  0.0  0.0      0     0 ?        S    Sep06   0:00 [khelper]
root         9  0.0  0.0      0     0 ?        S    Sep06   0:00 [netns]
root        10  0.0  0.0      0     0 ?        S    Sep06   0:00 [async/mgr]
root        11  0.0  0.0      0     0 ?        S    Sep06   0:00 [pm]
root        12  0.0  0.0      0     0 ?        S    Sep06   0:00 [sync_supers]
root        13  0.0  0.0      0     0 ?        S    Sep06   0:00 [bdi-default]
root        14  0.0  0.0      0     0 ?        S    Sep06   0:00 [kintegrityd/0]
root        15  0.0  0.0      0     0 ?        S    Sep06   0:00 [kblockd/0]
root        16  0.0  0.0      0     0 ?        S    Sep06   0:00 [kacpid]
root        17  0.0  0.0      0     0 ?        S    Sep06   0:00 [kacpi_notify]
root        18  0.0  0.0      0     0 ?        S    Sep06   0:00 [kacpi_hotplug]
root        19  0.0  0.0      0     0 ?        S    Sep06   0:00 [kseriod]
root        21  0.0  0.0      0     0 ?        S    Sep06   0:00 [kondemand/0]
root        22  0.0  0.0      0     0 ?        S    Sep06   0:00 [khungtaskd]
root        23  0.0  0.0      0     0 ?        S    Sep06   0:00 [kswapd0]
root        24  0.0  0.0      0     0 ?        SN   Sep06   0:00 [ksmd]
root        25  0.0  0.0      0     0 ?        S    Sep06   0:00 [aio/0]
root        26  0.0  0.0      0     0 ?        S    Sep06   0:00 [crypto/0]
root       164  0.0  0.0      0     0 ?        S    Sep06   0:00 [ksuspend_usbd]
root       165  0.0  0.0      0     0 ?        S    Sep06   0:00 [khubd]
root       167  0.0  0.0      0     0 ?        S    Sep06   0:00 [ata/0]
root       168  0.0  0.0      0     0 ?        S    Sep06   0:00 [ata_aux]
root       169  0.0  0.0      0     0 ?        S    Sep06   0:00 [scsi_eh_0]
root       172  0.0  0.0      0     0 ?        S    Sep06   0:00 [scsi_eh_1]
root       239  0.0  0.0      0     0 ?        S    Sep06   0:00 [kstriped]
root       248  0.0  0.0      0     0 ?        S    Sep06   0:01 [kjournald]
root       318  0.0  0.0  16892   948 ?        S<s  Sep06   0:00 udevd --daemon
root       403  0.0  0.0  16864   764 ?        S<   Sep06   0:00 udevd --daemon
root       419  0.0  0.0  16864   764 ?        S<   Sep06   0:00 udevd --daemon
root       465  0.0  0.0      0     0 ?        S    Sep06   0:00 [kpsmoused]
root       473  0.0  0.0      0     0 ?        S    Sep06   0:00 [vballoon]
root       650  0.0  0.0      0     0 ?        S    Sep06   0:00 [kjournald]
root       869  0.0  0.1  58500  1708 ?        Sl   Sep06   0:00 /usr/sbin/rsyslogd -c4
root       911  0.0  0.0   3916   624 ?        Ss   Sep06   0:00 /usr/sbin/acpid
root       928  0.0  0.0  12672   396 ?        Ss   Sep06   0:00 /sbin/mdadm --monitor --pid-file /var/run/mdadm/monitor.pid --daemonise --scan --syslog
root       966  0.0  0.0      0     0 ?        S    Sep06   0:00 [kconservative/0]
ntp       1229  0.0  0.2  38332  2160 ?        Ss   Sep06   0:04 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 101:103
root      1299  0.0  0.1  22420  1032 ?        Ss   Sep06   0:00 /usr/sbin/cron
root      1335  0.0  0.2  72940  2596 ?        Ss   Sep06   0:02 sendmail: MTA: accepting connections          
root      1363  0.0  0.0   5928   612 tty1     Ss+  Sep06   0:00 /sbin/getty 38400 tty1
root      1364  0.0  0.0   5928   608 tty2     Ss+  Sep06   0:00 /sbin/getty 38400 tty2
root      1365  0.0  0.0   5928   608 tty3     Ss+  Sep06   0:00 /sbin/getty 38400 tty3
root      1366  0.0  0.0   5928   608 tty4     Ss+  Sep06   0:00 /sbin/getty 38400 tty4
root      1367  0.0  0.0   5928   608 tty5     Ss+  Sep06   0:00 /sbin/getty 38400 tty5
root      1368  0.0  0.0   5928   612 tty6     Ss+  Sep06   0:00 /sbin/getty 38400 tty6
root      5228  0.0  0.0   3952   612 ?        S    Sep07   0:00 /bin/sh /usr/bin/mysqld_safe
mysql     5339  0.0  3.0 172528 30840 ?        Sl   Sep07   0:22 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysql
root      5340  0.0  0.0   5344   688 ?        S    Sep07   0:00 logger -t mysqld -p daemon.error
root      7326  0.0  0.0      0     0 ?        S    Sep07   0:00 [flush-8:0]
root      7802  0.0  0.1  49168  1144 ?        Ss   Sep07   0:00 /usr/sbin/sshd
root     11762  0.0  0.3  70460  3360 ?        Ss   Sep07   0:00 sshd: root@pts/0 
root     11775  0.0  0.2  19320  2132 pts/0    Ss   Sep07   0:00 -bash
bind     11913  0.0  1.0 117388 11068 ?        Ssl  Sep07   0:00 /usr/sbin/named -u bind
root     12611  0.0  1.0 216292 10976 ?        Ss   00:59   0:00 /usr/sbin/apache2 -k start
www-data 12623  0.0  1.2 222964 12704 ?        S    00:59   0:00 /usr/sbin/apache2 -k start
www-data 12651  0.0  1.3 223320 13576 ?        S    01:01   0:00 /usr/sbin/apache2 -k start
www-data 12722  0.0  1.0 220748 11220 ?        S    01:22   0:00 /usr/sbin/apache2 -k start
www-data 12742  0.0  1.1 221376 11620 ?        S    01:24   0:00 /usr/sbin/apache2 -k start
www-data 12746  0.0  1.1 222488 12128 ?        S    01:26   0:00 /usr/sbin/apache2 -k start
www-data 12756  0.0  1.0 219620 11288 ?        S    01:30   0:00 /usr/sbin/apache2 -k start
www-data 12759  0.0  1.0 221176 11076 ?        S    01:31   0:00 /usr/sbin/apache2 -k start
www-data 12762  0.0  0.7 216868  7528 ?        S    01:32   0:00 /usr/sbin/apache2 -k start
www-data 12764  0.0  1.0 219700 10440 ?        S    01:33   0:00 /usr/sbin/apache2 -k start
www-data 12767  0.0  0.6 216424  7180 ?        S    01:36   0:00 /usr/sbin/apache2 -k start
www-data 12768  0.0  0.6 216292  6340 ?        S    01:36   0:00 /usr/sbin/apache2 -k start
www-data 12770  0.0  0.6 216292  6340 ?        S    01:37   0:00 /usr/sbin/apache2 -k start
www-data 12771  0.0  0.6 216292  6340 ?        S    01:37   0:00 /usr/sbin/apache2 -k start
root     12772  0.0  0.1  16332  1132 pts/0    R+   01:37   0:00 ps aux
что-то не вижу тут ~80%. это кэш хавает? или может чего не до ставил? брал с минимальными конфигами и ставил в ручную апач, похапэ, бинд...

lolshchto
()

RSS подписка на новые темы