вторник, 22 ноября 2011 г.

Ubuntu/Debian downgrade php5.3 to 5.2

Делаю downgrade в Lucid только для следующих пакетов в версии из репозитария Hardy

vim /etc/apt/preferences.d/php5-pin

Package: php5-cgi
Pin: release a=hardy
Pin-Priority: 1001

Package: libapache2-mod-php5
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-common
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-cli
Pin: release a=hardy
Pin-Priority: 1001

Package: php-auth
Pin: release a=hardy
Pin-Priority: 1001

Package: php-pear
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-curl
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-dev
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-gd
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-imagick
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-imap
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-mcrypt
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-mysql
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-sqlite
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-tidy
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-xmlrpc
Pin: release a=hardy
Pin-Priority: 1001

Package: php5-xsl
Pin: release a=hardy
Pin-Priority: 1001

aptitude install php5-cgi php-auth php-pear php5-cli php5-curl php5-dev php5-gd php5-imagick php5-imap php5-mcrypt php5-mysql php5-sqlite php5-tidy php5-xmlrpc php5-xsl

пятница, 18 ноября 2011 г.

Phpfarm custom.sh

aptitude install libxml2-dev libjpeg8-dev libcurl4-openssl-dev libpng-dev libfreetype6-dev libmcrypt-dev libmhash-dev libxslt-dev

mkdir -m 0755 /usr/local/php
git clone git://git.code.sf.net/p/phpfarm/code phpfarm

cd phpfarm/src

vim custom-options-5.2.17.sh
### 
configoptions="
            --enable-cli \
            --with-pear \
            --with-openssl=/usr \
            --with-iconv \
            --with-curl \
            --with-mysql \
            --with-mysqli \
            --enable-mbstring \
            --with-zlib \
            --with-zlib-dir \
            --with-gettext \
            --with-mhash \
            --enable-ftp \
            --with-mcrypt \
            --enable-bcmath \
            --with-mime-magic \
            --with-pdo-mysql \
            --enable-sockets \
            --enable-soap \
            --enable-fastcgi \
            --enable-force-cgi-redirect \
            --with-xsl \
--with-gd \
--enable-gd-native-ttf \
--with-ttf \
--with-png-dir \
--with-jpeg-dir \
--with-freetype-dir \

    "
#
#           --with-gd \
#            --with-gd=/usr/lib/php5/20090626 \
#--with-png-dir \
#--with-jpeg-dir \
#            --enable-gd-native-ttf \
#            --with-pspell \
#            --enable-exif \


четверг, 15 сентября 2011 г.

Как сохранять нужное кол-во Proxmox vzdump бекапов ?

в /etc/vzdump.conf
добавить строчку
maxfiles: N
N - необходимое кол-во

больше о vzdump.conf можно узнать в man vzdump

понедельник, 12 сентября 2011 г.

Virtio hdd самоподписаный драйвер

Для win2003
----------------------
I have followed the links, however even after signing the drivers myself, Windows 64-bit doesn’t want them. The only solution that I have found is:
- Install your Windows with 1 normal device (ide) and 1 virtio drive.
- When Windows is successfully installed, add virtio driver for the second disk.

I don’t know if it is really necessary but in cmd.exe:

Bcdedit.exe -set TESTSIGNING ON

See: http://msdn.microsoft.com/en-us/library/dd419910.aspx

Shutdown VM.
Change the first disk from ide to virtio, Windows knows the driver from the second drive and use it for the first which have just been changed.

There is probably a better solution to install but I don’t know it.

HOW SIGN YOURSELF:
Download Windows SDK for makecert and signtools: http://download.microsoft.com/download/7/A/B/7ABD2203-C472-4036-8BA0-E505528CCCB7/winsdk_web.exe

Generate certificate:

In C:\Program Files\Microsoft SDK\…….\bin
MakeCert -r -pe -ss TestCertStoreName -n “CN=CertName” CertFileName.cer

Sign driver:
SignTool sign /v /s TestCertStoreName /n CertName /t http://timestamp.verisign.com/scripts/timestamp.dll viostor.sys

Now if you right click on viostor.sys, you can see certified by “…”.


Для win2008
------------------
I finally got it to work permanently by signing the driver with a test certificate, putting Windows into testsigning mode and installing the driver.
(Hint: Microsoft has disabled the "DISABLE_INTEGRITY_CHECKS" option, which in earlier versions of Vista64 (and Win7 64 RC?) would allow installation of unsigned drivers)
I did the following:
1. Copy the Win2008 driver folder from the CD onto the HDD
2. Download DSEO 1.3b ("Driver Signature Enforcement Overrider 1.3b") - You DON'T have to turn off UAC!
3. Start DSEO and select to sign viostor.sys which you just copied to the HDD
4. Uninstall DSEO :)
5. Start up cmd as administrator
6. Turn on testsigning by entering: bcdedit -set TESTSIGNING ON
7. Restart computer
8. Install driver as described in the article above

вторник, 6 сентября 2011 г.

xslt в bash

java com.icl.saxon.StyleSheet -x org.apache.xerces.parsers.SAXParser
  -y org.apache.xerces.parsers.SAXParser xq338.xml 
  xq348.xsl bodyTextSize=8pt

воскресенье, 4 сентября 2011 г.

git tree

git config alias.tree = "log --graph --decorate --pretty=oneline --abbrev-commit"
git tree

Skype webcamera в Ubuntu

Чтобы заработала камера в скайпе нужно:
находим где расположен запускной файл
which skype
в моём случае /usr/bin/skype

возможен вариант /opt/skype/skype
далее выполнеем команды

cd /usr/bin
mv skype skype.real
cat <<EOF > skype
#!/bin/sh
LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so exec /usr/bin/skype "\$@"
EOF
chmod +x skype