Thursday, February 21, 2013

FFMPEG installation on Centos

I installed FFMPEG via. yum.

[root@ip-10-190-51-120 ~]# uname -a
Linux ip-10-190-51-120 #1 SMP Thu Jul 19 16:20:44 CDT 2012 x86_64 x86_64 x86_64 GNU/Linux
[root@ip-10-190-51-120 ~]#

[root@ip-10-190-51-120 ~]# cat /etc/redhat-release
CentOS release 6.3 (Final)
[root@ip-10-190-51-120 ~]#

rpm -Uvh

Installing FFMPEG.

yum install ffmpeg ffmpeg-devel

Install FFMPEG-PHP Extension

FFmpeg-php is a very good extension and wrapper for PHP which can pull useful information about video through API interface. Inorder to install it you will need to download the source file and then compile and install extension in your server.

cd /usr/local/src


tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0.tbz2
make install

Once you have done that without any problems then you will see the php extension file /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ and you will need mention that extension in php.ini file.

nano /usr/local/lib/php.ini

Put the below two lines at the end of the php.ini file


Then restart apache using — service httpd restart

If you get an error like this 
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function âzim_ffmpeg_frame_toGDImageâ:
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: âPIX_FMT_RGBA32â undeclared (first use in this function)
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function âzim_ffmpeg_frame_ffmpeg_frameâ:
/usr/src/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

Under the ffmpeg-php-0.6.0 directory modify the file: ffmpeg_frame.c with nano or vi editor and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32

# nano ffmpeg_frame.c
# Search for PIX_FMT_RGBA32 and replace it with PIX_FMT_RGB32
# Exit from the editor

Then run the following commands:

# cd /usr/local/src/ffmpeg-php-0.6.0
# cp -aP ffmpeg_frame.loT ffmpeg_frame.lo
# make clean
# ./configure
#   make
#   make install

This should fix the errors given above. Finally add the extension in php.ini and check phpinfo for the server you should see ffmpeg listed.

Installing Jira in Centos

Login as root
cd /opt
Download Jira for linux from
chmod a+x atlassian-jira.bin
I choose express install

Access URL http://ip:8080
/etc/init.d/jira start
/etc/init.d/jira stop

Then we have to run the wizard

I then created a mysql DB,user and password.
Give necessary permissions.

flush privileges;

Then we need to copy the mysql JDBC driver to jira
Download the driver from
Untar the package
cd to that folder
Copy mysql-connector-java-5.x.x-bin.jar to /opt/jira/lib

Stop Jira
Start Jira

Give it as a public site
Give name of the site
Admin user details
Email notification etc.

Installing PhpMyAdmin in centos

yum install phpmyadmin

vi /etc/httpd/conf.d/phpMyAdmin.conf

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

<Directory /usr/share/phpMyAdmin/>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
Allow from
Allow from

Access url : http://ip/phpmyadmin , it will prompt for username/password. Enter your mysql root password.

Saturday, February 9, 2013

Can't login in hudson as administrator

Today i can't login to our hudson application as administrator. I am sure the password i tried is correct. I restarted tomcat and still the issue persists.

Error log :
INFO: Hudson is ready.
9 Feb, 2013 4:11:43 PM onUnsuccessfulAuthentication
INFO: Login attempt failed
org.acegisecurity.BadCredentialsException: Bad credentials
        at org.acegisecurity.providers.dao.AbstractUserDetailsAuthenticationProvider.authenticate(
        at org.acegisecurity.providers.ProviderManager.doAuthentication(
        at org.acegisecurity.AbstractAuthenticationManager.authenticate(
        at org.acegisecurity.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(
        at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(
        at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(

Solution :
I created a new user in hudson via. backend.
Logged in server.
cd /root/.hudson/users
Create a folder shivin and copy the config.xml file from /root/.hudson/users/Administrator folder
Go to /root/.hudson/
Edit config.xml file for giving privileges for the new user "shivin"
Once you give all permission, Stop tomcat and start again.
Try the web for login with the user "shivin" , you can
There go to People and select "Administrator", change password and save
Logout from user shivin and try with the new Administrator password

Issue fixed. I can login fine.