Jun 21

Run:

dumpe2fs -h /dev/sda1

or

tune2fs -l /dev/sda1

where /dev/sda1 is you partition, and search for Block size:

written by MG \\ tags: ,

Jan 26

#!/bin/bash
for x in `find * -maxdepth 0 -type d`;
do
  # Translate Caps to Small letters
  y=$(echo $x | tr ‘[A-Z]‘ ‘[a-z]‘);

  # check if directory exits
  if [ ! -d $y ]; then
     echo “mv $x $y”
     mv $x $y;
  fi
done

NOTE: -maxdepth 0 is for directories in curent dir. If you want to rename in depth use -depth instead

written by MG \\ tags: , , , ,

Jan 07

Error:

/download/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_toGDImage’:
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function)
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_ffmpeg_frame’:
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1

Solution:

1. Open the file “/ffmpeg-php-0.5.0/ffmpeg_frame.c”

1. Replace all PIX_FMT_RGBA32 with PIX_FMT_RGB32

written by MG \\ tags: , , , ,

Nov 23

SSHD has a little bug when do you want to use ClientAliveCountMax in combination with ClientAliveInterval, so if you want to work try this:

TCPKeepAlive yes
ClientAliveInterval 3600
ClientAliveCountMax 0

this should disconnect iddle session older then 1h.

written by MG \\ tags: , , ,

Nov 18

AMRNB & AMRWB
wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz?use_mirror=mesh
cd opencore-amr-0.1.2
./configure ; make ; make install

FAAC
wget http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz?use_mirror=sunet
wget http://www.linuxfromscratch.org/patches/blfs/svn/faac-1.28-glibc_fixes-1.patch
cd faac-1.28
patch -Np1 -i ../faac-1.28-glibc_fixes-1.patch
sed -i -e ‘/obj-type/d’ -e ‘/Long Term/d’ frontend/main.c
./configure ; make ; make install
        docs: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/faac.html

FAAD
wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz

cd faad2-2.7
./configure; make ; make install
         docs: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/faad2.html

LAME
wget http://downloads.sourceforge.net/lame/lame-398-2.tar.gz
./configure –enable-mp3rtp ; make ; make install
       docs: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/lame.html

Liba52
wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz
./configure –enable-shared ; make ; make intall
       docs: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/liba52.html

XVIDCORE
wget http://downloads.xvid.org/downloads/xvidcore-1.2.2.tar.gz
cd xvidcore/build/generic && ./configure –prefix=/usr/local ; make ; make install
       docs: http://www.linuxfromscratch.org/blfs/view/svn/multimedia/xvid.html

FFMPEG
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure –enable-libxvid –enable-libmp3lame –enable-libfaad –enable-libfaac –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-gpl –enable-shared –enable-nonfree –enable-version3 –enable-pthreads ; make ; make install

written by MG \\ tags: , ,

Oct 01

Add MX records to your DNS like this:

10 mail.yourdomain.com
20 backup.yourdomain.com

You will also need to add DNS entries that correspond with the new server so that backup.yourdomain.com points to the IP address of your back-up mail server.

When the mail server at the IP address relating to mail.yourdomain.com is not available mail will be sent to backup.yourdomain.com

and then add the following line in /etc/mail/mailertable:

yourdomain.com smtp:mail.yourdomain.com

Next we need to add this to the mailertable database.
Type:
# makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable

And then append the following lines to the bottom of your access file.

To:yourdomain.com RELAY

Now you should have something like this:
# by default we allow relaying from localhost…
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
To:yourdomain.com RELAY

now run:
makemap hash /etc/mail/access.db < /etc/mail/access

Now restart the sendmail service to make the changes complete
Type:
# service sendmail restart

written by MG \\ tags: , ,

Apr 21

 If you are running vsftpd in standalone mode, add the “listen_port” directive in vsftpd.conf,like this:

listen_port=30

If you are running vsftpd from an inetd or xinetd program, this becomes an inetd or xinetd problem. You must change the inetd or xinetd configuration files (perhaps /etc/inetd.conf or /etc/xinetd.d/vsftpd).

written by MG \\ tags: , ,