Monday, February 1, 2010
How to install wordpress!
Thursday, January 14, 2010
Howto: enable TUN module on a VPS
TUN module is required to configure VPN tunneling and to configure VPN on a VPS, you need to enable the module from the Hardware node. Login to your Host server and execute the following command:
First check if the TUN module is enabled on the hardware node:
lsmod | grep tun
If not, load the module using modprobe:
modprobe tun
Now, enable the TUN module on a VPS:
vzctl set VEID devices c:10:200:rw save
vzctl exec VEID mkdir -p /dev/net
vzctl exec VEID mknod /dev/net/tun c 10 200
vzctl exec VEID chmod 600 /dev/net/tun
where, VEID is the VPS ID you want to enable the TUN module on.
Wednesday, January 13, 2010
Fantastico shows error 'You cannot install more than one script in the root directory of a domain'
2. Go to "file manager"
3. click on the ".fantasticodata" folder
4. open up "installed_in_root.php" and edit it.
This is an example of what I mean:
If you open up "installed_in_root.php" you will see something like this:
$installed_in_root["domain.com"] = 1;
This is what you need to delete.
(this is just an example from my "installed_in_root,php" file).
Keep in mind that every install of wordpress you have made will be stored in this file, be very carefull not to delete any of your other wordpress sites out of it.
I hope this makes sense lol, I'm not very good at explaining things.
Change Time Zone for a particular account on cpanel server
SetEnv TZ
e.g. SetEnv TZ Australia/Adelaide
php_value date.timezone "Australia/Adelaide"
Monday, December 21, 2009
How To Add DomainKeys and SPF Records on CPanel Servers
We consider here we have a domain howtodolinux.com with cpanel username dothelinux
Please note on CPanel servers most of the work is done using cpanel username which then reflect setting on particular domains. If you have several domains / sub domains under one username, it will add domainkeys and SPF records for all domains / subdomains.
Execute the following command on your CPanel server using root.
1 DomainKeys
1.1 Add DomainKeys for single user
/usr/local/cpanel/bin/domain_keys_installer dothelinux
1.2 Add DomainKeys for all CPanel users.
If you wish to add DomainKeys for all Cpanel users on your server, execute following command.
cat /var/cpanel/users | while read a; do
/usr/local/cpanel/bin/domain_keys_installer $a
done
2 SPF (Sender Policy Framework)
2.1 Add SPF for single account.
/usr/local/cpanel/bin/spf_installer dothelinux
2.2 Add SPF for all Cpanel accounts.
If you want to add SPF records for all cpanel accounts exist on your server then use the following command.
cat /var/cpanel/users | while read a; do
/usr/local/cpanel/bin/spf_installer $a
done
3 Enable DomainKeys and SPF for every new CPanel account.
3 Enable DomainKeys and SPF for every new CPanel account.
If you want to add DomainKeys and SPF for every new account created on Cpanel, then do the following.
vi /scripts/postwwwacct
postwwwacct is a file which execute after wwwacct (used to create account), paste following lines in the file
#!/usr/bin/perl
my %OPTS = @ARGV;
$ENV{USER} = “$OPTS{’user’}”;
system q(/usr/local/cpanel/bin/domain_keys_installer $USER);
system q(/usr/local/cpanel/bin/spf_installer $USER);
Saturday, December 12, 2009
How to Install FFmpeg in Linux
Installation
First you need to add a file in yum repository directory for dag packages installation. For this edit the following file:
Vi /etc/yum.repos.d/dag.repo
add the following contents to the file,
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=0
enabled=1
Then enter the command,
yum install ffmpeg ffmpeg-devel
To check what audi/video formats are supported
ffmpeg -formats > ffmpeg-format.txt
Open the ffmpeg-formats.txt to see the ooutput
D means decode
E means encode
V means video
A means audio
T = Truncated
Installation of 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.
For downloading the source tarball click here
or
wget http://biznetnetworks.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2
Extract the souce tarball.
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0/
phpize
Some time you will get an error like "Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable is set correctly and then rerun this script."
YOU CAN SEE THE FIX OF THIS ERROR UNDER COMMON ERRORS.
./configure
make
make install
Editing PHP.INI
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/ffmpeg.so and you will need mention that extension in php.ini file
vi /usr/local/lib/php.ini
Put the below two lines at the end of the php.ini file
[ffmpeg]
extension=ffmpeg.so
Then restart the server
service httpd restart
To check whether ffmpeg enabled with php, point your browser to test.php file. It should show the confirmation of installed ffmpeg php extension
// # vi test.php
phpinfo();
?>
Picture.................................................paste here...
If any case the ffmpeg does not show in the phpinfo() test make sure that php.ini path to ffmpeg.so is correct. Still the problem occures, the reason could be you might be using older version of ffmpeg-php which is buggy. just download the latest version of ffmpeg-php sourse then complile it.
Common Errors
1. If you get command not found error for phpize, then you will need to do yum install php-devel
2.
2. If you get error like "ffmpeg headers not found" while configuring the source.
configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
then it means you have not installed ffmpeg-devel packages.
To Fix: Just install ffmpeg-devel using
yum install ffmpeg-devel
3. If you get an error like shared libraries not found problem and the program halts in the middle, then you must specify the ffmpeg installed path explicitly to the ./configure.
A) configure: error: ffmpeg shared libraries not found. Make sure ffmpeg is compiled as shared libraries using the --enable-shared option
To Fix:
1. First find out the ffmpeg path with ffmpeg --help command. The prefix default path should be like /usr/local/cpffmpeg
2. Conf./configure --with-ffmpeg=/usr/local/cpffmpeg
That should resolve the problem!
B)
Installing Mplayer + Mencoder
Just issue the following yum commands to install the rest of the packages.
yum install mplayer mencoder
Installing FlvTool2
Flvtool2 is a flash video file manipulation tool. It can calculate metadata and can cut and edit cue points for flv files.
yum install flvtool2
Installing LAME MP3 Encoder, Libogg, LIBVORBIS
LAME is a high quality MPEG Audio Layer III (MP3) encoder licensed under the LGPL. Both quality and speed improvements are still happening, probably making LAME the only MP3 encoder still being actively developed.
yum install lame libogg libvorbis

