How to check Linux OS version through command prompt

Use following check Linux OS version through command linux operating system version. There are so many linux commands which are useful but sometimes you need to know about hosting server details and their operating system.

following command will useful for fedora, centos, redhat os.

#uname -a

I got the following result after this command.

Linux purab-5745 3.8.0-29-generic #42-Ubuntu SMP Tue Aug 13 19:40:39 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

If you have debian OS than, you can use following command.

cat /etc/debian_version

Normally above command will show the your kernel version information.

Following command also shows the OS version

cat /proc/version
cat /etc/redhat-release

How we configure memcached on fedora with machine restart

In this tutorial we will show you how configure memcached on fedora with machine restart, First install the memcached on server- linux box.

What is Memcahced?

Memcached is free and open-source software, licensed under the Revised BSD license.[2] Memcached runs on Unix-like operating systems (at least Linux and OS X) and on Microsoft Windows. It depends on the libevent library.

configure memcached on fedora

# yum install php-pdo php-mcrypt squirrelmail php-pecl-apc php-xml php-gd php-devel php php-imap php-pgsql php-pear php-soap php-mbstring php-ldap php-mysql php-cli php-pecl-memcache

Using this file you can change the cache and memory size.

[root@kapilk-pc kapil]# vim /etc/rc.d/init.d/memcached

Aslo change the following file also. Do same setting in this file

# /etc/sysconfig/memcached

[root@kapilk-pc kapil]# /etc/init.d/memcached restart
Stopping memcached: [ OK ]
Starting memcached: [ OK ]

Following command will set command as wheneven machine reboots, memcached server will restart.

[root@kapilk-pc kapil]# /sbin/chkconfig memcached on

How to change timezone linux command line

In this article we will tell you to change timezone linux command line. Location of the local time file
Linux looks at /etc/localtime to determine the current time of your machine. This can either be a symbolic link to the correct time zone or a direct copy of the time zone file.

Please use following commands for changing the timezone.

[root@ip-kapilk-pc kapil]# date
Fri Jan 22 06:35:11 MST 2010

[root@ip-kapilk-pc kapil]# ln -sf /usr/share/zoneinfo/
Africa/ Cuba GMT0 Japan Poland Universal
America/ EET GMT-0 Kwajalein Portugal US/
Antarctica/ Egypt GMT+0 Libya posix/ UTC
Arctic/ Eire Greenwich MET posixrules WET
Asia/ EST Hongkong Mexico/ PRC W-SU
Atlantic/ EST5EDT HST Mideast/ PST8PDT zone.tab
Australia/ Etc/ Iceland MST right/ Zulu
Brazil/ Europe/ Indian/ MST7MDT ROC
Canada/ Factory Iran Navajo ROK
CET GB iso3166.tab NZ Singapore
Chile/ GB-Eire Israel NZ-CHAT Turkey
CST6CDT GMT Jamaica Pacific/ UCT

[root@ip-kapilk-pc kapil]# ln -sf /usr/share/zoneinfo/EST /etc/localtime
[root@ip-kapilk-pc kapil]# date
Fri Jan 22 08:40:32 EST 2010
[root@ip-kapilk-pc kapil]#

Change TimeZone Using /etc/localtime File

For this example, assume that your current timezone is UTC as shown below. You would like to change this to Pacific Time.

# date
Mon Sep 17 22:59:24 UTC 2010

How to setup vnc-server on fedora or linux

In this tutorial we will show you to How to setup vnc-server on fedora 11, we given you steps you install and configure the vnc server. we installed the tiger vnc server. Use following steps:

What is vnc server?

TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports. TigerVNC also provides extensions for advanced authentication methods and TLS encryption.

Following commands can be used on any linux machine like centos, redhat, debian and ubuntu os.

[root@siwank-pc siwan]# yum install vnc-server

Loaded plugins: refresh-packagekit
Setting up Install Process
Package tigervnc-server-1.0.0-2.fc11.i586 already installed and latest version
Nothing to do

[root@siwank-pc siwan]# vim /etc/sysconfig/vncservers

In file use following lines (//SIWAN IS MY USER NAME, YOU NEED TO USE YOUR USERNMAE)

VNCSERVERS="59:siwan"
VNCSERVERARGS[59]="-geometry 1024x768 -nolisten tcp"

Than set your password or change for VNC-viewer

[siwan@siwank-pc ~]$ vncpasswd
Password:
Verify:

Than Became root user using following command.

[siwan@siwank-pc ~]$ su
Password:

Start the VNC server using following command. Use following command to start vnc services after rebooting

[root@siwank-pc siwan]# /sbin/service vncserver restart

[root@siwank-pc siwan]# /sbin/chkconfig vncserver on

Done!

Now you can able to use your box from vnc viewer..

How to install Imagemagick on linux and check Imagemagick

In this tutorial we will give information about, How to install Imagemagick on linux and check Imagemagick. Imagemagick is great application for image manipulation on linux box.

What is Imagemagick?

ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

install Imagemagick on linux

The functionality of ImageMagick is typically utilized from the command-line or you can use the features from programs written in your favorite language. Choose from these interfaces: G2F (Ada), MagickCore (C), MagickWand (C), ChMagick (Ch), ImageMagickObject (COM+), Magick++ (C++), JMagick (Java), L-Magick (Lisp), Lua (LuaJIT), NMagick (Neko/haXe), Magick.NET (.NET), PascalMagick (Pascal), PerlMagick (Perl), MagickWand for PHP (PHP), IMagick (PHP), PythonMagick (Python), RMagick (Ruby), or TclMagick (Tcl/TK). With a language interface, use ImageMagick to modify or create images dynamically and automagically.

Use following command for Installing the Imagemagick
#su
#YOUR_PASSWORD
#yum install imagemagik

OR binary installtion follow this:
tar -xzf imagemagic1.2.3.4.5.6.tar.gz
cd imagemagic1.2.3.4.5.6
./configure
make
make check
make install

How to check Imagemagick on Fedora:
[root@siwank-pc html]# rpm -ql ImageMagick
/usr/bin/animate
/usr/bin/compare
/usr/bin/composite
/usr/bin/conjure
/usr/bin/convert
/usr/bin/display
/usr/bin/identify
/usr/bin/import
/usr/bin/mogrify
/usr/bin/montage
/usr/bin/stream
…….

For running the ImageMagick use following commands
#animate or #display

How to Install IE6 and IE7 on Fedora

Here in this article we will guide you to Install IE6 and IE7 on Fedora or any linux system. Now days I6 and IE7 is not used by people still I am updating this post.

Note: Don’t became root because these files will crash your linux.

Use following commands for installing the IE7 on your box.
#su
#ROOT_PASSWORD
#yum install wine cabextract
#exit
Here we are exiting the root user

#cd /tmp
#wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
#tar xvfz ies4linux-latest.tar.gz
#cd ies4linux-*
#./ies4linux –no-flash –install-ie7

I tried following command multiple times than I got succeed(6 or 7 times). Many times this command not executed properly.
#./ies4linux –no-flash –install-ie7

To launch IE6 Type on command prompt:
#ie6

To launch IE7 Type on command prompt:
#ie7

My comments
IE6 and 7 is running properly on my machine but some time it gives me error about IE7.
I am looking forward to solve that issue.

Image upload issue in wordpress with nginx

Nginx server is used by wordpress itself. We solved Image upload issue in wordpress with nginx. you can use following code.

Image upload issue in wordpress with nginx

Please Use the following code:


location ~ ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
root /usr/share/nginx/html/wordpressmu;
rewrite ^/.*(/wp-admin/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^/.*(/wp-includes/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^/.*(/wp-content/themes/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^/.*(/wp-content/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^.*/files/(.*(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ /wordpress/wp-content/blogs.php?file=$1 last;

expires 10d;
break;
}

Nginx rule with image fix for multiple wordpress instance

I solved the issue with Wordprss and Images. If you want to host or install two instances on one domain in that senorio you can use following code. we given code for Nginx rule with image fix for multiple wordpress instance. you should use our code for fixing

Nginx rule with image fix for multiple wordpress instance

Please Use the following code;

location ~ ^.+\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js)$ {
#images for wordpress instance one
if ($request_uri ~* /wordpress) {
set $set_root /usr/share/nginx/html/wordpress1;
}
#images for wordpress instance two
if ($request_uri ~* /moms) {
set $set_root /usr/share/nginx/html/wordpress2;
}

root $set_root;
rewrite ^/.*(/wp-admin/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^/.*(/wp-includes/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^/.*(/wp-content/themes/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last;
rewrite ^/.*(/wp-content/.*\.(html|jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js))$ $1 last; expires 10d;
break;
}

Install mp3 player and vlc player on Fedora

Play mp3 songs in fedora linux
I am using the Fedora 11 and on that I am going to install the Fluendo MP3 plugin

Install mp3 player and vlc player on Fedora

If you want to install the Fluendo MP3 plugin on Fedora 8, 9, 10 or 11
Use same steps;

Download fluendo-codecs-mp3-7-1.i386.rpm file from here:

fluendo-codecs-mp3

Use following command:
[root@localhost siwan]# rpm -i fluendo-codecs-mp3-7-1.i386.rpm

How to install the Vlc player on Fedora 8, 9, 10 or 11
root@localhost siwan]#  su
[root@localhost siwan]#  rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm
[root@localhost siwan]# yum install vlc
[root@localhost siwan]# yum install mozilla-vlc (optionnal)

how to check programs installation path in linux

There are many linux distributions like fedora, redhat, centos. Each has different program installation path. Using following commands you can check programs installation path in linux

how to check programs installation path in linux

Use following commands:

</pre>
[root@localhost ]# which php
/usr/bin/php
[root@localhost ]# which ruby
/usr/bin/ruby
[root@localhost ]# php --version
PHP 5.2.9 (cli) (built: Apr 17 2009 03:42:25)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
[root@localhost ]# ruby --version
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-linux]
[root@localhost Desktop]#