FFMPEG version SVN-r24734 Autoinstaller

Filed Under (FFMPEG) by Milind on 06-02-2012

FFmpeg is a open source project that produces libraries and programs for handling multimedia data and publishes them online. The most popular components of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line program for transcoding multimedia files.

FFMPEG can be installed manually using detailed steps given on the eUKHost forum thread but if you don’t want to do manual work and need to get it installed automatically then this thread is for you. If you go through above given thread you will find an autoinstaller script which will also install FFMPEG but it will install the older version of FFMPEG. Now you can install Latest FMMPEG SVN-r24734 version using steps given below.

Download FMMPEG SVN-r24734 auto-installer Script
Login to the server and download file using wget.

root@server [~]# wget http://eitwebguru.com/soft/ffmpeginstaller.tar.gz

Extract the downloaded file

root@server [~]# tar -zxvf ffmpeginstaller.tar.gz


Go to Extracted folder

root@server [~]# cd ffmpeginstaller


Run Autoinstaller

root@server [~]# ./install


Now follow the steps and press enter…now its time to have a cup of coffee.

Oracle 10gR2 RAC Installation Error: error while loading shared libraries -libpthread.so.0

Filed Under (Linux Tips, Oracle) by Milind on 28-01-2012

1) VIPCA Configuration
Error 1: error while loading shared libraries -libpthread.so.0
While installing Oracle 10gR2 RAC (Cluster) on Redhat Enterprise Linux 5 or CentOS 5 you will get following error when you execute root.sh (After Cluster Installation) on last node. This Error is thrown when root.sh execute VIPCA which Virtual IP configuration Tool.

Running vipca(silent) for configuring nodeapps
/u01/app/oracle/product/crs/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
[root@rac2 crs]#

To fix this issue edit /u01/app/oracle/product/10.2.0/clust/bin/vipca and add following (Green colored or on line number 124):

if [ "$arch" = "i686" -o "$arch" = "ia64" ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
unset LD_ASSUME_KERNEL


Error 2: Error 0(Native: listNetInterfaces:[3])

Once above changes made and when you run /u01/app/oracle/product/10.2.0/clust/bin/vipca you will get following Error

[root@rac2 bin]# /u01/app/oracle/product/10.2.0/clust/bin/vipca
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]

Now you will have to configure Virtual IP’s Manually. You can configure it using following commands

[root@rac2 bin]# pwd
/u01/app/oracle/product/10.2.0/clust/bin
[root@rac2 bin]# ./oifcfg setif -global eth0/115.124.120.0:public
[root@rac2 bin]# ./oifcfg setif -global eth1/10.10.10.1:cluster_interconnect
[root@rac2 bin]# ./oifcfg getif
eth0 115.124.120.0 global public
eth1 10.10.10.0 global cluster_interconnect

[root@rac2 bin]#

Now Run VIPCA


2) Srvctl Error:

While checking status of RAC using command srvctl you will again get the following error:

[oracle@rac2 ~]$srvctl config database -d RAC
/u01/app/oracle/product/10.2.0/db_1/jdk/jre/bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

To fix this bug edit following files

/u01/app/oracle/product/clust/bin/srvctl
/u01/app/oracle/product/10.2.0/db_1/bin/srvctl

and add following (Green colored):

#Remove this workaround when the bug 3937317 is fixed
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
unset LD_ASSUME_KERNEL

Now Execute srvctl commands to check the current configuration and status of the RAC database

[oracle@rac1 ~]$ srvctl config database -d RAC
rac1 RAC1 /u01/app/oracle/product/10.2.0/db_1
rac2 RAC2 /u01/app/oracle/product/10.2.0/db_1

Steps to Secure WordPress

Filed Under (Softwares, Wordpress) by Milind on 18-01-2012

Recently I found that many wordpress based websites got hacked or compromised. So, I started searching Internet for security measures which can be took to protect WordPress based websites. Following are some points which I found common on various websites.

1. Vulnerabilities in the WordPress
Vulnerabilities of WordPress could be defined as program or script that allows an attacker to bypass normal wordpress settings. To avoid such problems, keep your blog updated to latest versions. Older version of WordPress contains old functions and scripts which can be easily hacked.

Also keep your all plugins updated and if you are not using any specific plug-in, delete it from the system.

2. Secure wp-config.php
wp-config.php file contains database information like database name, database username, password. By default wp-config.php has 644 permission which means a normal user can easily read your wp-config.php. So, set the permission of the file to 750 which will disable other users to read it.

3. Rename the administrative account
When WordPress is installed on a System by default, it uses and sets username “admin” as the administrator of the blog. For better security it’s not suggested to use “admin”. After installation you can create a new user with administrator rights and delete “admin”.

4. Hide WordPress version
If you are running a wordpress version which has know vulnerabilities, then its not a good option to keep your wordpress version open to public. There are many plugins which hide the wordpress version from public OR you can simply add  “<? php remove_action(‘wp_head’, ‘wp_generator’.; ?>” in function.php of your theme.

5. Protect WP-* Folders
Block wp-* folders from being crawled and index by search engines. This can be done by blocking access to wp-* from robot.txt. Add following line in your robot.txt

Disallow: /wp-*

6. Firewall Plugins
There are a few plugins that scans suspicious-looking requests based on rule databases and/or white-lists. BlogSecurity’s WPIDS plug-in installs “PHPIDS”, a generic security layer for PHP applications, while “WordPress Firewall” uses some WordPress-tuned pre-configured rules along with a whitelist to screen out attacks without much configuration

7. Secure WordPress Database
WordPress is database dependent application for which you need to have a database and database user. For WordPress installation, you simply create a database with user but securing database is also useful for securing you WordPress Blog.

Following are a few tweaks to secure database
7.1. Grant limited access to a database user: Create a user to access this database only and grant limited access to SQL commands on this database (select, insert, delete, update, create, drop and alter).

7.2. Pick a strong database password

8. Backups
Always make habit of taking backup of your blog and database at regular intervals and do not depend upon your hosting company’s backups as it might be possible that the backup they have contains the hacked data. (if the backup run after your blog was hacked) There are many plugins provided by WordPress with the help of which one can take backups.

9. Strong Passwords
Creating a Strong Password is another option to protect your blog from getting hacked. Also changing the passwords on weekly or monthly basis will be added protection.

10. Monitoring Blogs
As a user/admin of the blogs you will have to regularly monitor your blogs for changes, like any suspicious user get registered or any file of your blog gets changed or you find any suspicious activity contact our support team for deep investigation.

Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

Filed Under (Linux Tips, Microsoft Windows, Softwares, VLC) by Milind on 14-01-2012

Recently I have worked on a project where I have to stream a video on Internet which will be then accessed by the Servers on different locations and those servers will then stream the same video to the sub-ordinate systems simultaneously. Using this we can reduce the Load on Main Streaming Server as well as we can save lot of bandwidth as if all the server/systems connect to the Main server directly bandwidth usage of both the server and the client will be very high.

Scenario:
1) Video will be streamed from a Server on Internet.
2) Many other Servers will connect to the Server.
3) These servers will then stream the same video on their network (e.g. on LAN).
4) Users of local system will access the video from secondary servers.

Following image can explain the Scenario in a better way

VLC Cluster 300x300 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

Step to Stream Video on Primary Server

Following are the steps to stream a video on Primary Server which can be located on remoter location.

1) Login to the Server and install VLC on it.
2) Open VLC Media Player

VLC 1 300x89 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

3) Go to Media >> Streaming

VLC2 300x224 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

4) Now add the file which you want to stream and Press Stream

VLC3 300x290 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

5) Source: On Stream Output screen it will show the Source file; press Next to continue

VLC4 300x257 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

6) Destination: Add HTTP as new destination which will automatically run on port 8080 and you can activate trans-coding as well. Press Next to continue.

VLC5 300x256 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

7) Others: You will see miscellaneous options which you can select as per your requirement. Press Stream to start Streaming.

VLC6 300x257 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])

8) VLC will start streaming the Video which you have mentioned.

VLC7 300x87 Setup VLC Stream Network (How to create Streaming VLC Server [Primary])


In Next Article I will explain How to setup Secondary Server and clients to watch live streaming

BlueProximity: Lock Computer using your Phone

Filed Under (Linux Tips, Softwares, Ubuntu) by Milind on 19-12-2011

BlueProximity is a tool which detects your mobile phone via bluetooth and locks your computer when your bluetooth blueproximity logo BlueProximity: Lock Computer using your Phonephone is out of bluetooth reach. If you move away from your Desktop of computer and the distance between you and computer is more than a certain limit for a given time, BlueProximity will lock it automatically. You can also execute or start any shell command using this software. Once the administrator/User come nearer than the configured level for a set of time, the system will gets unlock automatically.

Things required
1) Bluetooth Dongle
2) Mobile Phone with Bluetooth.

Steps to Install BlueProximity
Automatic (For Hardy or newer version)
BlueProximity is included in the repos of Hardy or newer version of Ubuntu and it can be installed using “apt-get”:

sudo apt-get install blueproximity

Manual Installation

For older version of Ubuntu (Older than Hardy) you will have to manually install blueproximity.

1) First you have to install Dependencies

sudo apt-get install bluez-utils python-gtk2 python-glade2 python-configobj python-bluez

2) Install latest version of python-support package from http://security.ubuntu.com/ubuntu/pool/main/p/python-support/ and install it using command “sudo dpkg -i”

3) Install BlueProximity
Download BlueProximity from http://sourceforge.net/projects/blueproximity/files/ OR http://mirrors.kernel.org/ubuntu/pool/universe/b/blueproximity/ and install it using “dpkg”

Pair Devices
1) Insert Bluetooth Dongle on your System and enable it (and set it Visible)
2) Activate Bluetooth on your Mobile and Scan for your computer.
3) Authorize and Pair both the devices using PIN.

Steps to Configure BlueProximity

1) Open blueproximity from Accessories or execute the command “blueproximity” which will show following Image

BLUEP 269x300 BlueProximity: Lock Computer using your Phone

2) Scan for the devices and Select the device you want to configure. (Make sure that the device is Paired with Computer Already)

3) BlueProximity Settings/Configuration/Details: Click on Proximity Details which will show following options

Set Following
Lock:
Distance: 7
time: 10

Unlock:
Distance: 3
time: 3

BLUEP2 271x299 BlueProximity: Lock Computer using your Phone

4) Locking and Unlocking: By Default Proximity uses following commands to lock and unlock your screen automatically.

BLUP3 300x268 BlueProximity: Lock Computer using your Phone

Locking Command: gnome-screensaver-command -l
Unlocking command: gnome-screensaver-command -d

But you can turn your monitor off at the time of lock which will save Electricity when you are away from your computer and switch it on when you return. Using Following Commands to lock&turn off and “unlock & turn On the monitor

Locking Command: gnome-screensaver-command -l && xset dpms force off
Unlocking command: xset dpms force on && gnome-screensaver-command -d

Bluep4 300x272 BlueProximity: Lock Computer using your Phone


Now, get up from your chair and move few steps back !!!!

How to Configure RSH for Oracle Cluster

Filed Under (Linux Tips, Oracle) by Milind on 17-12-2011

While installing and configuring Oracle Cluster you need to configure RSH Server (Quite outdated but still oracle requires it). Today in this post I will explain how you can configure RSH on nodes which are going to be clustered.

1) Installation of RSH:-
You can install RSH using YUM or RPM package manager.

For YUM execute following command from Shell (as root)

yum install rsh-server

For RPM:-
Download rsh-server RPM from Repository OR mount your RHEL DVD and go to RPM’s Directory and execute following command:-

rpm -ivh rsh-server-0.17-40.el5.x86_64.rpm

2) Enable RSH Service.

By default RSH service is disabled to enable it open and Edit /etc/xinetd.d/rsh and /etc/xinetd.d/rlogin ; find term “disable”. Change “yes” to “no”. Make sure that both the files looks like following

[root@rac1 ]# cat /etc/xinetd.d/rsh
# default: on
# description: The rshd server is the server for the rcmd(3) routine and, \
# consequently, for the rsh(1) program. The server provides \
# remote execution facilities with authentication based on \
# privileged port numbers from trusted hosts.
service shell
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
disable = no
}

_

[root@rac1 ]# cat /etc/xinetd.d/rlogin
# default: on
# description: rlogind is the server for the rlogin(1) program. The server \
# provides a remote login facility with authentication based on \
# privileged port numbers from trusted hosts.
service login
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rlogind
disable = no
}

3) Restart the Service on all node’s.

Restart xinetd service on all clustered nodes and also make sure to enable it on reboot. These operations can be done using following commands.

/etc/init.d/xinetd restart
chkconfig rsh on
chkconfig rlogin on

4) Without Password logins

For Oracle Cluster setup its important that you should able to login into any other node without entering passwords. In SSH you can do that by setting SSH Keys but in RSH all you have to create /etc/hosts.equiv and insert all the Nodes in that. Following are the commands

touch /etc/hosts.equiv
chmod 600 /etc/hosts.equiv
chown root:root /etc/hosts.equiv

Then allow oracle user to connect servers without password. Insert following in /etc/hosts.equiv file

+rac1 oracle
+rac2 oracle
+pvt1 oracle
+pvt2 oracle

Here, rac1, rac2, pvt1 and pvt2 are the servers in cluster (rac is public IP and pvt is private IP).

Thats it, now try to connect servers using command “rlogin [serverip]“.

Install ImageMagick and PHP-iMagick

Filed Under (Cpanel, Linux Tips, Plesk For Linux, Softwares) by Milind on 04-11-2011

What is ImageMagick?

ImageMagick is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats and it is used to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

What is PHP-iMagick?

Imagick is a native php extension to create and modify images using the ImageMagick API

Installation of ImageMagick

1) Download the latest version of ImageMagick from ImageMagick website i.e. http://www.imagemagick.org/script/download.php (select the mirror near to your server for fast download). Use following command to download ImageMagick

[root@support007 src]# wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick-6.5.7-10.tar.gz

im1 300x143 Install ImageMagick and PHP iMagick

2) Extract and go inside the ImageMagick Folder

[root@support007 src]# tar -zxf ImageMagick-6.5.7-10.tar.gz[root@support007 src]# cd ImageMagick-6.5.7-10

3) Configure: You can run ./configure –help to see the advance option and select the options as per your requirement. I will go ith default settings/configurations

[root@support007 ImageMagick-6.5.7-10]# ./configure

im2 300x143 Install ImageMagick and PHP iMagick

4) Once configure completes (without Error) and you get following screen run make & make install


im3 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make

im4 300x143 Install ImageMagick and PHP iMagick
im5 300x143 Install ImageMagick and PHP iMagick

[root@support007 ImageMagick-6.5.7-10]# make install

im6 300x143 Install ImageMagick and PHP iMagick
im7 300x143 Install ImageMagick and PHP iMagick

If the above commands get executed without any errors, !!! Congratulations you have installed ImageMagick on your Server. Now you can check the Imagemagick version using following command

[root@support007 src]# convert -versionVersion: ImageMagick 6.5.7-10 2009-12-07 Q16 http://www.imagemagick.orgCopyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

im8 300x143 Install ImageMagick and PHP iMagick

Installation of PHP-iMagick

1) Download, extract and go to PHP-iMagick directory

[root@support007 src]# wget http://pecl.php.net/get/imagick-2.3.0.tgz[root@support007 src]# tar zxf imagick-2.3.0.tgz[root@support007 src]# cd imagick-2.3.0[root@support007 imagick-2.3.0]#

im13 300x98 Install ImageMagick and PHP iMagick

2) Execute phpize command to prepare the build environment for a PHP extension and after that run “./configure”

[root@support007 imagick-2.3.0]# phpize[root@support007 imagick-2.3.0]# ./configure

im9 300x143 Install ImageMagick and PHP iMagick

3) Run make and make install to complete the installation.

[root@support007 imagick-2.3.0]# make[root@support007 imagick-2.3.0]# make install

im11 300x143 Install ImageMagick and PHP iMagick

im12 300x143 Install ImageMagick and PHP iMagick

4) Add following line in php.ini file to enable imagick extension with PHP. Make sure that the extension is installed in the Directoy mentioned as extension_dir in php.ini

extension=imagick.so

5) Restart Apache Webserver and create a PHPINFO file in web server’s document root with code “”. Now browse the File and check if you get following results

im14 284x300 Install ImageMagick and PHP iMagick

Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

Filed Under (Linux Tips, Microsoft Windows, VLC) by Milind on 19-09-2011

In previous article I have told how to configure a Primary Server from where the actual Video will be streamed and published. In this article I will explain how we can configure the Secondary server which will stream the videos to their clients.

Setup Secondary Streaming Server

1) Login to the Secondary Server and open VLC Player on it.

vlc1 1 300x178 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

2) Go to Media >> Streaming

vlc1 2 300x180 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

3) On Open Media window go to Network Tab and Enter the URL of the server with Port 8080 (Default port) and press Stream.


vlc1 31 300x290 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

4) Stream Output Source >> Press Next

vlc1 41 300x257 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

5) Destination: Select HTTP >> Add (again this server will start stream on port 8080 by default). Also Select the Trans-coding and press Next.

vlc1 5 300x257 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

6) Others: You will see miscellaneous options which you can select as per your requirement. Press Stream to start Streaming.

Configuring VLC Client (End User)

1) Open VLC Player on local System

vlc2 1 300x116 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)

2) Go to Media >> Open Network Stream

3) Select HTTP Protocol From the Drop Down and insert the IP address and Port of Secondary Server. Press Play.

vlc 2 31 238x300 Setup VLC Stream Network (How to create Secondary Streaming VLC Server and Client)


That’s it, your Live VLC Streaming Network is ready.

How to Install MP4Box on Linux Server

Filed Under (FFMPEG, Installations, Linux Tips, Softwares) by Milind on 09-09-2011

MP4Box is a MP4 multiplexer, which can import MPEG-4 video, DivX, XviD, 3ivx, h264 etc, audio streams and subtitles into the .mp4 container. The end result is a compliant MP4 stream. It can also extract streams from a .mp4. MP4Box is a command line tool, but can be used with graphical user interfaces such as YAMB or my MP4box GUI.

1) Download MP4Box
Execute Following commands on Shell to Download the MP4Box Source

[root@server ~]# cd /usr/local/src/
[root@server src]# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC/GPAC%200.4.5/gpac-0.4.5.tar.gz
[root@server src]# wget http://nchc.dl.sourceforge.net/project/gpac/GPAC%20extra%20libs/GPAC%20extra%20libs%200.4.5/gpac_extra_libs-0.4.5.tar.gz


gpac-0.4.5.tar.gz” is Main Source for MP4Box where as “gpac_extra_libs-0.4.5.tar.gz” contains Extra Libraries which will enhance the functionality of MP4Box.

2) Extract the Downloaded sources
Extract both the downloaded files using Tar

[root@server src]# tar -zxvf gpac-0.4.5.tar.gz
[root@server src]# tar -zxvf gpac_extra_libs-0.4.5.tar.gz


3) Copy the Additional Libraries from “gpac_extra_libs” to “gpac” folder

[root@server src]# cd gpac_extra_libs
[root@server gpac_extra_libs]# cp -r * /usr/local/src/gpac/extra_lib
[root@server gpac_extra_libs]# cd ..


4) Install GPac or MP4Box

Execute following Commands on the Shell of your Linux Server one after one (Make sure it doesn’t throw any Error)

[root@server src]# cd gpac
[root@server gpac]# ./configure
[root@server gpac]# make lib
[root@server gpac]# make apps
[root@server gpac]# make install lib
[root@server gpac]# make install


5)
Once GPAC get installed Properly, copy the gpac .so file from gpac directory to System libraries

[root@server gpac]# cp bin/gcc/libgpac.so /usr/lib


Thats all
. you can verify if the MP4Box is installed or not using following Command.

[root@server gpac]# which MP4Box
/usr/local/bin/MP4Box
[root@server gpac]#


Problems Faced While installation.

I have faced two problems while installation of MP4Box

1) Permission of “./Configure” was not set; I have corrected it by setting permission of the file to 755

[root@server gpac]# ./configure
-bash: ./configure: Permission denied
[root@server gpac]# chmod 755 configure


2) Error on 64 Bit OS. Following Error was thrown. This Error can be fixed by creating an symbolic link of /usr/lib64/libglut.so.3 to /usr/lib64/libglut.so

ERROR:-

/usr/bin/ld: cannot find -lglut
collect2: ld returned 1 exit status

FIX:-

[root@server gpac]#ls /usr/lib64 |grep glut
libglut.so.3
[root@server gpac]# ln -s /usr/lib64/libglut.so.3 /usr/lib64/libglut.so

FIX:- make: *** [libavdevice/v4l.o] Error 1

Filed Under (FFMPEG, Softwares) by Milind on 06-09-2011

ERROR:

While installing FFMPEG on a server when we run “make” after “./configure” it gives following error:

math-errno       -c -o libavdevice/v4l.o libavdevice/v4l.c
In file included from libavdevice/v4l.c:32:
/usr/include/linux/videodev.h:56: error: syntax error before "ulong"
/usr/include/linux/videodev.h:72: error: syntax error before '}' token
libavdevice/v4l.c: In function `grab_read_header':
libavdevice/v4l.c:77: error: storage size of 'tuner' isn't known
libavdevice/v4l.c:141: error: invalid application of `sizeof' to incomplete type `video_tuner'
libavdevice/v4l.c:148: error: invalid application of `sizeof' to incomplete type `video_tuner'
libavdevice/v4l.c:77: warning: unused variable `tuner'
make: *** [libavdevice/v4l.o] Error 1

SOLUTION:

This problem can be fixed by disabling v41 and v42 for FFMPEG. This can be done when we run “./configure” for FFMPEG

./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --disable-demuxer=v4l --disable-demuxer=v4l2

Once this has been completed run “make” and “make install” to install FFMPEG.

Follow US

Enter your email address:


I'm listed in Technology

Sponsors

Advertisement

Become Fan

tag cloud