Linux or Windows platform for hosting

As there are many companies offering you good deals on Linux or Windows platform for hosting, you may be having a little dilemma to choose Linux or Windows platform for hosting. To make a better choice the two platforms can be compared by various factors such as performance, price, ease of use, functionality and stability. Before opting for the service you should have some idea about these platforms.

Linux was first introduced in 1991 by Linus Torvalds, as an extended form of Minix. Initially Linux was used by many universities as an operating system. Wide popularity and demand made the hosting service available for free distribution with General Public License. Linux supports a large number of script and programming languages.

As there was a great demand and need for graphic user interface, Windows platform was introduced as MS-DOS add on and its subsequent releases were widely accepted by the people. Windows Server 2003 was considered as very successful commercial server software and recently Server 2008 has been launched. The functionality of XP is very familiar.

The price of the platform depends on the services offered by the hosting company. Linux is available as a version, due to factors such as free licensing and availability which are not held by Microsoft products. As Linux is developed to cater to the multi-user environment, it takes some time to enable its stability, compared to Windows environment. Linux platform is considered to be more secure and stable than Windows. Both Linux and Windows platforms are very easy to use. Many people are familiar with windows processes. With a Linux Server you can upload content easily to your website by enabling FrontPage extensions. Windows Server system has very attractive functionalities with Access database support and is associated with MySQL. You can easily integrate off-line and online system by using ASP.net. While Visual Basic scripts and Windows Media files are supported by Windows servers, Real Player media is supported by Linux. Both the platforms offer you script support such as CGI, XML, PHP, etc. Linux offers the functionalities at a cheaper cost and a stable environment, compared to Windows due to the license cost of Microsoft.

You can find that many hosting companies offer a wide range of Linux and Windows hosting plans. While choosing the hosting company you have to evaluate your realistic and pre-determined needs for a reliable and secure service.

Local port range sysctl tuning for high bandwidth Linux servers

Most of the Linux distributions specify local port range from 16384 to 65536 and this may be too low for very high bandwidth and busy boxes, let’s say SMTP, Hosting, POP3/Imap and Proxy servers.

You can adjust this setting by editing /etc/sysctl.conf file and replacing the default:

net.ipv4.ip_local_port_range = 16384 65536

with

net.ipv4.ip_local_port_range = 1024 65536

MySQL information_schema error when using mysqldump utility

Some users report problem when backup is performed using mysqldump command line utility under the Linux OS. The version affected in our tests were 4.1.20.

mysqldump: Got error: 1044: Access denied for user ‘root’@'localhost’ to database ‘information_schema’ when using LOCK TABLES

To quickly fix this problem use the following switch when running mysqldump for MySQL database backups.

mysqldump -u root -p –all-databases –single-transaction > all.sql

Cpanel upcp Yaml Syck problem

Some Cpanel systems miss Yaml::Syck package and /scripts/upcp display a bunch of errors. To fix this problem you may install YAML-Syck package by downloading tar package (at this time of writing the filename: YAML-Syck-0.91.tar.gz ) or you can always run perl Cpan shell to install it the easy way ;)

(login to root account and execute in shell:)

perl -MCPAN -e shell

install YAML::Syck

Enjoy ;)

Replace multiple file text string using grep and perl

If you have a folder with a lot of files in a directory and with a specific string that you want to change you can do it in seconds using grep and perl command line:

grep -R –files-with-matches ‘OLDSTRING’ . | sort | uniq | xargs perl -pi~ -e ’s/OLDSTRING/NEWSTRING/’

Where OLDSTRING is the string you want to find and replace with NEWSTRING.

FFmpeg installation problem on the Linux

If you are installing ffmpeg from the SVN and getting the following error log after running ./configure:

./configure
Unable to create and execute files in /tmp.  Set the TMPDIR environment
variable to another directory and make sure that /tmp is not mounted
noexec.
Sanity test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
ffmpeg-devel@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file “config.err” produced by configure as this will help
solving the problem.

This means that your /tmp directory has noexec flag and you need to disable it for a while.

Check your /etc/fstab

and locate /tmp

It probably shows something similar below:

LABEL=/tmp              /tmp                    ext3    defaults,noexec,nosuid        1 2 

Remove noexec and it should be something like:

LABEL=/tmp              /tmp                    ext3    defaults,nosuid        1 2

Issue

umount /tmp && mount /tmp

And you are set, proceed with the installation of ffmpeg.

If you are  getting the following error after running umount and/or mount:

umount: /tmp: device is busy 

Then some process is having a file handle open to /tmp directory. You will need to shutdown the daemon before issuing mount commands.

List all installed rpm packages and it’s size

Virtual Private Server disk space are usually limited so it’s always good to know how much space on the hard drive takes some rpm package. You can delete it later - you will save your disk space and of course some bandwidth if updates are released later on.

rpm -qa –qf ‘%10{SIZE}\t%{NAME}\n’ | sort -k1,1n

This applies to Linux environment servers only.