Показват се публикациите с етикет debian. Показване на всички публикации
Показват се публикациите с етикет debian. Показване на всички публикации

вторник, септември 30, 2014

Downgrade PHP5.4 to PHP 5.3 (debian way)

Debian Wheezy comes with PHP 5.4 (or after upgrade from 6.0 to 7.0).
In PHP 5.4+  Magic Quotes was officially deprecated as of PHP 5.3.0 and removed in PHP 5.4, due to security concerns. Anyway - many old web applications depends of this feature so if you need downgrade your php installation (coz of lazy developers) here are steps:

  • First, add Debian Squeeze repositories as an additional source of packages to /etc/apt/sources.list.
deb http://ftp.debian.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free


  • Then, add these to pin your old PHP 5.3 packages, to /etc/apt/preferences.d/preferences. If you don’t have this file, create an empty one.

Package: php5*
Pin: release a=oldstable
Pin-Priority: 700


Package: libapache2-mod-php5
Pin: release a=oldstable
Pin-Priority: 700


Package: php-pear
Pin: release a=oldstable
Pin-Priority: 700


Package: php-apc
Pin: release a=oldstable
Pin-Priority: 700


Package: *
Pin: release a=stable
Pin-Priority: 600

  •  This will list your PHP packages
PHP=$(dpkg -l|grep php|grep 5.4.4|awk '{print $2}')

  • Finally, reinstall:
# apt-get update
# apt-get install --reinstall $PHP

сряда, август 28, 2013

Proftpd & FileZilla troubles

Като допълнение на това: FTP access-2
[ Нещата явно са се случили след ъпдейта от Debian 6 към Debian 7 Поне нищо друго не ми хрумва ]
Като цяло оплакването, е че не работи FTP съръвъра... в частност - не работи през FileZilla
Status:    Connection established, waiting for welcome message...
Response:    220 DMT FTP Server
Command:    USER down
Response:    331 Password required for down
Command:    PASS ****
Response:    230 Anonymous access granted, restrictions apply
Command:    OPTS UTF8 ON
Response:    200 UTF8 set to on
Status:    Connected
Status:    Retrieving directory listing...
Command:    PWD
Response:    257 "/" is the current directory
Command:    TYPE I
Response:    200 Type set to I
Command:    PORT 194,12,234,123,242,221
Response:    200 PORT command successful
Command:    MLSD
Error:    Connection closed by server
Error:    Failed to retrieve directory listing


Драмата е в новите версии на proftpd (явно над proftpd -v ProFTPD Version 1.3.4a) и по-специално в mod_facts.c
Текущата версия е :  proftpd -vv | grep facts -->   mod_facts/0.3 (* $Id: mod_facts.c,v 1.45 2011/05/23 21:11:56 castaglia)
докато старата е : proftpd -vv | grep facts -->   mod_facts/0.1 ($Id: mod_facts.c,v 1.26.2.1 2010/03/02 18:08:07 castaglia)

Решението на проблема е :
< IfModule mod_facts.c > 
FactsAdvertise off 
</IfModule > 
добавено в /etc/proftpd/proftpd.conf.

Описанието:  
1. http://www.proftpd.org/docs/modules/mod_facts.html
2. https://forum.filezilla-project.org/viewtopic.php?f=2&t=22464&start=0  


петък, август 23, 2013

LSI MegaRAID Storage Manager + Ubuntu

Server: Ubuntu 12.04 LTS 64b
RAID Controller: LSI 8704epl

Целта на занятието беше мониторинг и управление на RAID volumes.
I. Console tools:
echo "deb http://hwraid.le-vert.net/debian wheezy main" >> /etc/apt/sources.list
wget -O - http://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | sudo apt-key add -
apt-get update
apt-get install megaclisas-status  megacli megaraidsas-status megasasctl
cat /etc/init.d/megaraid-statusd | grep MAILTO
MAILTO=root   # Where to report problems

Като краен резултат:
megasasctl -vv -l 0x05
a0       MegaRAID SAS 8704ELP     bios:2.07.00 fw:1.40.42-0615 encl:1 ldrv:2  rbld:30% mem:128MiB batt:FAULT, module missing, pack missing, charge failed/0mV/0C
a0d0      1861GiB RAID 1   1x2  optimal
      row  0:  a0e252s2  a0e252s3
a0d1       297GiB RAID 1   1x2  optimal
      row  0:  a0e252s0  a0e252s1
a0e252s0      ATA WDC WD3201ABYS-0 rev:1C02 s/n:WD-WCARW4849895         298GiB  a0d1  online   errs: media:0  other:812
a0e252s1      ATA WDC WD5003ABYX-0 rev:1S02 s/n:WD-WMAYP5632935         465GiB  a0d1  online   errs: media:0  other:749
a0e252s2      ATA WDC WD2003FYYS-0 rev:1D02 s/n:WD-WCAY00537638        1863GiB  a0d0  online   errs: media:0  other:750
a0e252s3      ATA WDC WD2003FYYS-0 rev:1D02 s/n:WD-WCAY01502649        1863GiB  a0d0  online   errs: media:0  other:567

II. GUI - LSI MegaRAID Storage Manager -- това е ми трябваше.
Вариантите са 2 - рънвам го локално и правя X11-forwarding през SSH или си инсталирам този софтуер някъде и от това някъде се свързвам към локално стартираният сървър. Писана е цялата дивотия на java. Иска си net-snmp
cd /tmp/
wget http://www.lsi.com/downloads/Public/MegaRAID%20Common%20Files/13.04.03.01_Linux(x64)_MSM.tar.gz
apt-get install alien
tar xfvz 13.04.03.01_Linux(x64)_MSM.tar.gz
cd disk/
alien --scripts *.rpm
dpkg -i *.deb
Логина от remote machine иска Local credentials и за да може да се правят промени по RAID-a трябва да е root или поне sudo.

неделя, октомври 28, 2012

Debian Lenny

deb http://archive.debian.org/debian/ lenny contrib main non-free

to use in sources.list if Debian Squeeze is not desired.

четвъртък, март 01, 2012

Subject based redirect rule via postfix

Какво търсим: възможност да редиректваме писма на базата определно съдържание в Subject-a.
Какво имаме: postfix MTA + целият нужен и ненужен хлам от допълнителни сървиси (spamassassin,dovecot, amavis, etc )
В /etc/postfix/main.cf разрешаваме header check-a (нейде в началото е добре да живее)
header_checks = regexp:/etc/postfix/header_checks
Съдържанието на /etc/postfix/header_checks е:
/^Subject: Enlargment*/ REDIRECT lubim_kolega@domain.com   [на един ред трябва да е - порастна ми косата докато го схвана защо се чупи]
/etc/init.d/postfix restart
P.S за пореден път обещавам, че някой ден ще ги изчета всичките неща от този линк
http://www.postfix.org/header_checks.5.html
All credits to brata - аз не мислех, че толкова лесно може да стане

четвъртък, октомври 06, 2011

Console

Това което променям на Linux console [debian and derivates](глезотийка ама красотата ще промени света)
/etc/update-motd.d
/etc/update-motd.d$ diff 00-header ../update-motd.d.orig/00-header
< printf "%s\n" < printf "%s\n" "$(hostname -f) $(lsb_release -s -d)" < printf "%s\n" --- > uname -a
> printf "%s\n" "$(lsb_release -s -d)"

Manualy edit ~/.bashrc
timestamp in history
export HISTTIMEFORMAT="%F %T ""
Да се записват в history и дупликатите
#export HISTCONTROL=ignoredups
fancy colors on man-pages
export PAGER="/usr/bin/most -s"
(apt-get install most)

fancy epigram on login
fortune /usr/share/games/fortunes/bg | cowsay -b -f /usr/share/cowsay/cows/tux.cow -n
(apt-get install fortune-mod fortunes-bg cowsay)
Color promt
case "$TERM" in
xterm*|rxvt*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"';;
*) ;;
esac
Aliases:
alias ls='ls -alh --color=auto'
alias grep='grep -i --color=auto' # -i ignore case
alias rm='rm -i' # interactive -> ask before delete can be overrode with -f(orce)
alias mv='mv -i' # interactive -> ask before delete can be overrode with -f(orce)

Junos
edit
set system login message "\n Thinking doesn't hurt anyone! \n"
commit and-quit
[sho ver and haiku]

Mikrotik RouterOS
file edit sys-note.txt
paste от тук нещо по избор примерно

ToDo: да си довърша research-a за cmd replacement и въобще shell change

неделя, февруари 22, 2009