Игорь Олемской — практические заметки по системному администрированию Linux CentOS

Архив тега ‘Uncategorized’

Magento – Performance Analysis (перепечатка)

Комментариев нет

In our office we are currently evaluating the pros and cons of Magento. Besides all the great features it offers it has a huge con — the performance. We read a lot about it but couldn't find any reliable statements about how fast or slow it really it is. So I put a plain Magento install on my testing machine and gave it a shot...

Yet another blog (перепечатка)

Комментариев нет

as if there weren’t enough blogs out there in the wide wide web,  I had to share my thoughts too. Hopefully you won’t regret wasting your time here and enjoy a few of my thoughts and experiences that I’m gonna share here… every once in a while. This blog is supposed to deal mainly with [...]

Установка легкого и быстрого прокси 3proxy на FreeBSD (перепечатка)

Комментариев нет

cd /usr/ports/net/3proxy && make install
echo "threeproxy_enable="YES"" >> /etc/rc.conf

Конфиг:

timeouts 1 5 30 60 180 1800 15 60
users test:CL:24555
daemon
archiver gz /bin/gzip %F
rotate 30
auth strong
external 0.0.0.0
internal 1.2.3.1
auth strong
deny * * 127.0.0.1,192.168.1.1
allow * * * 80-88,8080—8088 HTTP
allow * * * 443,8443 HTTPS
proxy -n
auth strong
flush
internal 127.0.0.1
allow 3APA3A 127.0.0.1
maxconn 3
admin

Запуск:

/usr/local/etc/rc.d/3proxy start

Все. Прокси будет слушать на 1.2.3.1:3128 и пускать по test / 24555

Примеры использования ffmpeg (перепечатка)

Комментариев нет

Показать информацию по файлу:

ffmpeg -i sample.avi

Склеить изображений в видео:

ffmpeg -f image2 -i image%d.jpg video.mpg

Все картинки из текущей директории с именами файлов image1.jpg, image2.jpg и т.д. будут преобразованы в один ролик video.mpg.

Разложение видеоряда на кадры:

ffmpeg -i video.mpg image%d.jpg

Будут сгенерированы файлы image1.jpg, image2.jpg и т.д… Поддерживаемые графические форматы: PGM, PPM, PAM, PGMYUV, JPEG, GIF, PNG, TIFF, SGI.

Кодирование видеоряда для Apple iPod/iPhone:

ffmpeg -i source_video.avi input -acodec aac -ab 128kb -vcodec mpeg4 -b 1200kb -mbd 2 -flags +4mv+trell -aic 2 -cmp 2 -subcmp 2 -s 320×180 -title X final_video.mp4

Извлечение звука из видео с последующим сохранением в MP3:

ffmpeg -i source_video.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 sound.mp3

Преобразование WAV в MP3:

ffmpeg -i son_original.avi -vn -ar 44100 -ac 2 -ab 192 -f mp3 son_final.mp3

AVI в MPG:

ffmpeg -i video_source.avi video_final.mpg

MPG в AVI:

ffmpeg -i video_source.mpg video_final.avi

Конвертация AVI-файла в несжатый анимированный GIF:

ffmpeg -i video_source.avi gif_anime.gif

Смешение аудио- и видеопотока в один результирующий файл:

ffmpeg -i son.wav -i video_source.avi video_final.mpg

Преобразование AVI в FLV:

ffmpeg -i video_source.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320×240 -f flv video_final.flv

FLV в AVI:

ffmpeg -i video_source.flv -ab 56 -ar 44100 -b 200 -s 320×240 video_final.avi

Suhosin Packages Added For PHP 5.2 and PHP 5.3 (перепечатка)

Комментариев нет

Per LP519547, we have just pushed php52-suhosin and php53-suhosin to our el5-stable repositories for Red Hat Enterprise Linux 5 and clones.

Suhosin is an advanced protection system for PHP installations. It was designed to protect servers and users from known and unknown flaws in PHP applications and the PHP core. Suhosin comes in two independent parts, that can be used separately or in combination. The first part is a small patch against the PHP core, that implements a few low-level protections against bufferoverflows or format string vulnerabilities and the second part is a powerful PHP extension that implements all the other protections.

The packages pushed to IUS only implement the extension and not the core PHP patches.  Whether or not you should use Suhosin is up to you, but you may wish to read the Why? section on their site first.