[HOWTO] Install rtmpdump in CentOS 5

I was trying to install rtmpdump on CentOS 5.5 32-bit. I tried some RPMs and failed. I got errors like:

libboost_regex.so.3 is needed by rtmpdump

Now I figured I had to compile from source. I installed the required dependencies:

yum install openssl-devel

Then I downloaded the source tarball for v2.2e:

wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.2e.tar.gz

Then unpacked it:

tar xvf rtmpdump-2.2e.tar.gz

Then, compiled it:

cd rtmpdump-2.2e
make
make install

Now, run:

rtmpdump

If all goes well, you should get:

RTMPDump v2.2e
(c) 2010 Andrej Stepanchuk, Howard Chu, The Flvstreamer Team; license: GPL
ERROR: You must specify a hostname (–host) or url (-r “rtmp://host[:port]/playpath”) containing a hostname

Hope this helps.

[SOLVED] LWP::UserAgent version 5.827 required–this is only version 2.033 at /usr/lib/perl5/vendor_perl/5.8.8/WWW/Mechanize.pm line 106

I installed an application get_flash_videos, which requires WWW Mechanize, on my Virtual CestOS 5.5 server. I installed it with yum:

yum install perl-WWW-Mechanize

When I ran the program, I got the following error:

LWP::UserAgent version 5.827 required–this is only version 2.033 at /usr/lib/perl5/vendor_perl/5.8.8/WWW/Mechanize.pm line 106

After searching on the Internet, I found that the error was due to bug in perl-libwww-perl-5.805-1.1.1.noarch. I found that upgrading it to perl-libwww-perl-5.827 would fix the issue. I found it here. I installed it with the following command:

rpm -Uvh ftp://ftp.pbone.net/mirror/ftp.pramberger.at/systems/linux/contrib/rhel5/archive/x86_64/perl-libwww-perl-5.827-1.el5.pp.noarch.rpm

That fixes the problem and I can now run get_flash_videos.

[SOLVED] Fatal error: Call to undefined function xmlrpc_encode_request() in /path/to/a/php/file on line x

I was trying to use xmlrpc_encode_request() for posting to wordpress for one of my sites and got the error similar to the following:

Fatal error: Call to undefined function xmlrpc_encode_request() in /path/to/a/php/file on line x

This happened because the server did not have xmlrpc extension for PHP enabled. If you are getting this error on a shared hosting server, you are almost out of luck. However, you can still talk to support to have it installed. If you have your own VPS or Dedicated, you can install and configure it on your own. If you do not have it installed, you can install it by typing in the following (as root of course):
Ubuntu:

apt-get install php5-xmlrpc

CentOS/Red Hat:

yum install php-xmlrpc

If it is already installed, but disabled, you can go to the following directory and enable it:
Ubuntu:
/etc/php5/conf.d/
CentOS/Red Hat:
/etc/php.d/

Look for xmlrpc.ini. If it does not exist, create it. Now, make sure it has the following contents:

; Enable xmlrpc extension module
extension=xmlrpc.so

Make sure there is no semicolon in the beginning of second line. Save it.

Now, if PHP is loaded as apache module (most probably it is the case), you will need to restart apache for changes to take effect. Run the following to restart apache:
Ubuntu:

service apache2 restart

or

/etc/init.d/apache2 restart

CentOS/Red Hat:

service httpd restart

or

/etc/init.d/httpd restart

Hope this helps.

[HOWTO] Install phpMyAdmin in CentOS 5

I am using CentOS 5 in one of my Virtual Servers and I wanted it to have phpMyAdmin. I tried installing it by doing yum install phpmyadmin but it said No package phpmyadmin available. So I add to add a repo. I discovered that rpmforge repo had this package. To add it, I executed the following commands:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.i386.rpm

If you have 64-bit version installed, you should try this one out:

wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm
rpm -Uhv rpmforge-release-0.5.1-1.el5.rf.x86_64.rpm

If you get a 404 Not Found, then you will need to figure out the latest updated version of repo url from rpmforge usage page.

After that, you may like to update your packages by doing this:

yum update

and then continue installing phpmyadmin

yum install phpmyadmin

It should ask you for confirmation and you can continue installing phpMyAdmin with dependencies.

When installation is done, you can edit /etc/httpd/conf.d/phpmyadmin.conf and allow it to be opened from anywhere and not just the same computer. You are going to need this if you have installed it in a remote virtual server.
To do so, open up /etc/httpd/conf.d/phpmyadmin.conf using:

nano /etc/httpd/conf.d/phpmyadmin.conf

You will see:


  Order Deny,Allow
  Deny from all
  Allow from 127.0.0.1

Just change the line “Allow from 127.0.0.1” to “Allow from [yourip]”, where [yourip] is IP address of your computer if you have public static IP. Otherwise, you can also set it to “Allow from all”.
Press Ctrl+O followed by Enter to save and Ctrl+X to exit nano.

Now, you must restart apache. To do so, run

service httpd restart

Now, you can access phpMyAdmin by visiting http://vps_server_IP_or_domain/phpmyadmin. But you will get the following error:

Error
The configuration file now needs a secret passphrase (blowfish_secret).

To make it work, you will need to edit config.inc.php. To do so, type in:

nano /usr/share/phpmyadmin/config.inc.php

Find a line saying:

$cfg['blowfish_secret'] = ''; /* YOU MUST FILL IN THIS
FOR
COOKIE AUTH! */

Fill in any secret keyword there, eg mysecretpassphrase, so that it looks like:

$cfg['blowfish_secret'] = 'mysecretpassphrase'; /* YOU MUST FILL IN THIS
FOR
COOKIE AUTH! */

and then save it.

If you don’t have mysql server installed, you will get the following error:

Error
#2002 – The server is not responding (or the local MySQL server’s socket is not correctly configured)

To install mysql-server, just run:

 yum install mysql-server

and then start it:

 service mysqld start

Then change the root password:

mysqladmin -u root password PASSWORD_HERE

Now, you will have to remove phpmyadmin:

yum remove phpmyadmin

and reinstall it again:

yum install phpmyadmin

Then you will need to edit the config.inc.php again to enter blowfish secret (see above). Then, you can login.

If however, you want phpMyAdmin to connect to a remote server, you can change the line by replacing localhost with your server IP:

$cfg['Servers'][$i]['host'] = 'localhost';

Hope this helps.

[SOLVED] Installation/Upgrades extremely slow in BTRFS partition

UPDATE: I installed a modified version of dpkg which makes it pretty much faster. Brian Rogers posted the patched dpkg ppa in the bug page.
The patched dpkg can be installed by executing the following commands:

sudo apt-add-repository ppa:brian-rogers/btrfs
sudo apt-get update
sudo apt-get upgrade

Older Post follows for historical reasons:
I am using Ubuntu 10.10 Maverick Meerkat Beta and was experiencing extremely slow installation/upgrades. I was using Maverick Alpha 2 which I replaced with Alpha 3 with clean install and changed the root partition to BTRFS. Copying was normal but for some reason, package installation and upgrades took ages.

Later, it was also declared that BTRFS was not making into Maverick final and we would have to wait till the release of Ubuntu 11.04, Natty Narwhal. I read in a bug report that a patch had been issued but this has not made into the latest 2.6.35-22. Hopefully, this will be included when the final version of Maverick comes out.

Meanwhile, I decided to upgrade to 2.6.36 kernel from Kernel Mainline PPA. The latest version as of today is 2.6.36-020636rc5 (2.6.36-rc5). I downloaded the following files and installed them in the same order:
linux-headers-2.6.36-020636rc5_2.6.36-020636rc5.201009211328_all.deb
linux-headers-2.6.36-020636rc5-generic_2.6.36-020636rc5.201009211328_i386.deb
linux-image-2.6.36-020636rc5-generic_2.6.36-020636rc5.201009211328_i386.deb

If you have a 64-bit installation, you should download the following instead:
linux-headers-2.6.36-020636rc5_2.6.36-020636rc5.201009211328_all.deb
linux-headers-2.6.36-020636rc5-generic_2.6.36-020636rc5.201009211328_amd64.deb
linux-image-2.6.36-020636rc5-generic_2.6.36-020636rc5.201009211328_amd64.deb

I rebooted and tried installing some packages. The bug still remains. It is definitely not fast as I’d expect it to be. It is still very slow compared to previous experiences with ext3/ext4. I will wait for the new version of 2.6.36 to appear on Kernel Mainline PPA.

[SOLVED] IOError: Profile archgenxml_profile.xmi not found

I am following through the book “Plone 3.3 Products Development Cookbook” and encountered an error while using archgenxml as specified in Page 58:

cd ~/libexec/archgenxml/models
../bin/archgenxml ./poxContentTypes.zargo

The error is as follows:

INFO ArchGenXML Version 2.4.1
(c) 2003-2009 BlueDynamics Alliance, Austria, GPL 2.0 or later
INFO Parsing…
Traceback (most recent call last):
File “../bin/archgenxml”, line 19, in ?
archgenxml.ArchGenXML.main()
File “/home/pravin/libexec/archgenxml/eggs/archgenxml-2.4.1-py2.4.egg/archgenxml/ArchGenXML.py”, line 114, in main
gen.parseAndGenerate()
File “/home/pravin/libexec/archgenxml/eggs/archgenxml-2.4.1-py2.4.egg/archgenxml/ArchetypesGenerator.py”, line 4127, in parseAndGenerate
profile_dir=self.options.option(‘profile_dir’))
File “/home/pravin/libexec/archgenxml/eggs/xmiparser-1.4-py2.4.egg/xmiparser/xmiparser.py”, line 2813, in parse
raise IOError(“Profile %s not found” % fn)
IOError: Profile archgenxml_profile.xmi not found

I ran the help for archgenxml by executing the following:

../bin/archgenxml --help

I noticed the option –profile-dir with which I could specify the directory containing profiles. It was expected to look into profiles directory, but it did not. So, the following command generates the contents as required:

cd ~/libexec/archgenxml/models
../bin/archgenxml ./poxContentTypes.zargo --profile-dir=../profiles/

This did the job.

[SOLVED] “Package dependencies cannot be resolved” while installing qgis-plugin-grass

I was trying to install GRASS Plugin for Quantum GIS (qgis-plugin-grass) in my Ubuntu 10.10 Maverick Meerkat while I got the following error in Ubuntu Software Center:

Package dependencies cannot be resolved
This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time.

I then launched Synaptic Package Manager (from System>Administration menu) and tried to install qgis-plugin grass and got the following error message:

qgis-plugin-grass:
Depends: libgdal1-1.6.0-grass but it is not going to be installed

I then tried to install libgdal1-1.6.0-grass which gave me the following error:

libgdal1-1.6.0-grass:
Depends: grass640-6 but it is not installable

I looked for grass640-6 package but it was not available. However, a package named grass was available which was at version number 6.0.4-rc6 was available. I decided to make a new dummy transitional package (which the developers should have done). To do so, I just created a directory grass640 with another directory DEBIAN and created a file control inside it:

mkdir -p grass640/DEBIAN
touch grass640/DEBIAN/control

Then, I opened up control file that I just created in gedit:

gedit grass640/DEBIAN/control

and wrote the following content and saved it:

Package: grass640-6
Source: grass
Version: 0.6.4.0-6
Architecture: all
Maintainer: khattam@khattam.info
Installed-Size: 0
Depends: grass
Priority: extra
Homepage: http://www.khattam.info
Description: transitional dummy package for grass
 transitional dummy package to pull in grass

Then, I built the debain file:

dpkg-deb -b grass640/ ./

As a result, I got a file named grass640-6_0.6.4.0-6_all.deb in my current directory. If you don’t want to create it, you can use mine from here. Then I just installed it by double clicking on it. After that, I could install qgis-plugin-grass without problems.

Hope this helps.

[SOLVED] Torrent stopped downloading although there are enough seeds and connections

I was downloading a large file from torrent and it stopped at 63%.  I was using deluge as my torrent client. Since there were enough seeds and enough connections were being made for the torrent to get going but it did not, I thought it was a deluge specific issue, so I got rid of it and installed Vuze (also called azureus) and moved the torrent to it. The way you do that is just start the same torrent in vuze, stop it and copy the files you had downloaded via older torrent client replacing the files being downloaded via vuze, then right click the torrent in vuze and then click “Force Recheck”. But to my surprise, the torrent still got stuck just like in deluge.

Then I right clicked on the torrent and selected Show Details. In the Sources tab, I saw a lot of trackers were unreachable or timeout was occurring while attempting to connect to them. So, since there were many trackers that were online, I decided to remove those faulty trackers. To do so, I went back to the torrent listing, right clicked on the torrent and then navigated to Advanced>Tracker/Torrent>Edit Tracker URL(s) and then removed all those except those that were online.

After that, the torrent started downloading again. Hope this helps others who are experiencing similar problems.

[HOWTO] Disable conky minimization on Show Desktop

If you have conky installed, then by default when you click on Show Desktop icon on your panel, conky also gets minimized. You can bring it back by clicking it again, but that does not work if you open another window or selectively maximize/restore a window(s). Also, when you click on the Desktop after activating scale, then conky is lost. In both of these cases, the conky process keeps running, however it cannot be brought back. You must terminate it and run conky again.

However, if you just disable “Hide Skip Taskbar Windows” under General Settings in Compiz-config-settings-manager (ccsm), then conky will not be minimized if you press Show Desktop icon and it will not get lost if you click the Desktop after scale plugin is activated.

Hope this helps.