If you are using linux so you are very much familiar with vim editor. Here I will show how install vim editor on linux box using command line.
Some time when you are doing new setup of server like for linux distribution. There is lot is coming cloud hosting and centos and fedora. My most favorite is fedora.
install vim on linux
how to install vim on linux
If your OS does not have vim then use following command.
Nginx web server is becoming most popular in these year. Best server response time and minimum execution time is the advantages of Nginx server. wordpress.com itself using the nginx server for hosting these sites and blogs.
How to remove www from URL with nginx server
How to remove www from URL with nginx server
How to remove www from URL with nginx server
Many people want to remove the www from URL. I will tell you the tip how to remove the www from URL with nginx server.
Open your Ngnix configuration file (nginx.conf). Just use following code in server block.
if ($host ~* ^www\.(.*)) {
set $remove_www $1;
rewrite ^(.*)$ http://$remove_www$1 permanent;
}
Now these days keeping www in URL is becoming old fashion. How can check many websites for that and the current example is twitter.com. Using apache rule you can remove the www from url with rewite rule.
How to remove the www from url with rewite rule
How to remove the www from url with rewite rule
I specially dont like to put www in URL so we can easily remove the www from URL.
Open your apache configuration file. If you are using Linux then open file from following location
# vim /etc/httpd/conf/httpd.conf
put following lines in your virtual directory section.
Many times we need to run the linux commands using PHP language. We are going to give you code to, execute linux commands using php. This is my favorite question about PHP when I take an interview of new PHP developer.
execute linux commands using php
In this article I will show you how to execute the linux command using PHP language syntax or script.
You can executelinuxcommands within a php script – all you have to do is put the command line in backticks (”) ,exec() , and shell_exec().
Many times this issue is happened with me I tried the kill command to stop the process. Solved, Kill command is not working on linux.
But that is really not responding. For Example, following command executed but not worked.
I specially like the kill -9 processid command. Using kill -9 on a process is like just hitting the power button on your running PC. You already know that powering off a running PC can damage your filesystem because of run-time inconsistent data, why would you do the same thing to your applications? You risk the _exact same_ data corruption.
How to set up Firefox Profile Manager on Fedora or Linux
Firefox has new functionality called Profile manager which will allow you to switch with multiple Users.
You can create many user profiles in Firefox and save that as per your choice.
setup Firefox Profile Manager on Fedora
Many times on same Firefox some user don’t want some addons or theme. That time we got some difficulties.
For avoiding this issue we can create the firefox profile in firefox.
In windows creating Firefox profile is very easy. Just open windows run window and type “firefox -P”. That sit!
You will see following screens.
Using this you can create the firefox profiles.
Now I am going to show you how to create the firefox profile in Fedora.
If you are programmer then you many times heard about cron jobs. Who are new in to programming or new about using cron jobs they always think, how schedule job in linux box.
How to set cron jobs in Linux
How to set cron jobs in Linux
For many purpose we can use the cron jobs. Like sending emails, taking Mysql or database backup, taking file system backup or any other purpose.
What is Cron?
Cron is basically Linux program which will run on only windows.
Cron is a program that enables you to execute a command, or a script with a sequence of commands, at a specified date, time or at set intervals. The commands or scripts that you want cron to run are defined in a file called crontab, and every user has their own independent crontab file. Cron is a system program that is running all the time and is similar to the Windows scheduler which allows you to run commands/programs at predefined times and intervals.
We can pass following parameters to Cron file.
Minute = Minute of the hour, 00 to 59. * Will indicate every minute (details later)
Hour = Hour of the day in 24-hour format, 00 to 23. * Will indicate every hour (details later)
Day = Day of the month, 1 to 31. * Will indicate every day (details later)
Month = Month of the year, 1 to 12. * Will indicate every month (details later)
Day = Day of the week, 3 chars – sun, mon, tue, or numeric (0=sun, 1=mon etc)…. * Will indicate every day (details later)
Task = The command you want to execute
In this article I given full step by step installation guide about php and memcached . Check full article for install php and memcached server on centos5.
install php and memcached server on centos5
What is Memcached?
Free & open source, high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
install php and memcached server on centos5
Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.
Please use following commands for installtion;
[root@ip-192-168-2-125 wordpressapi]# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm
[root@ip-192-168-2-125 wordpressapi]# /etc/init.d/memcached restart
Shutting down Distributed memory caching (memcached): [ OK ]
Starting Distributed memory caching (memcached): [ OK ]
[root@ip-192-168-2-125 wordpressapi]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@ip-192-168-2-125 wordpressapi]# vim /etc/php.ini
In php.ini file Please find the “extension=modulename.extension” words
Under that sentance please paste following line:
extension=memcache.so
Note: dont comments that line.
[root@ip-192-168-2-125 wordpressapi]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@ip-192-168-2-125 wordpressapi]#
Linux tutorial, As we wine is windows emulator for linux box. So many people thinking how to install the Wine package on Linux box.
how to install wine in fedora
how to install wine in fedora
That is so easy just follow my steps. Commands will look like as follows:
[root@kapilk-pc kapil]# yum install wine*
Loaded plugins: refresh-packagekit
Setting up Install Process
Package wine-tools is obsoleted by wine-core, trying to install wine-core-1.1.32-1.fc11.i586 instead
Resolving Dependencies
–> Running transaction check
—> Package wine.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-alsa.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-capi.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-cms.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-common.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-core.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-desktop.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-devel.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-docs.noarch 0:1.0-2.fc11 set to be updated
—> Package wine-esd.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-fonts.noarch 0:1.1.32-1.fc11 set to be updated
—> Package wine-jack.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-ldap.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-nas.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-openal.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-oss.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-pulseaudio.i586 0:1.1.32-1.fc11 set to be updated
—> Package wine-twain.i586 0:1.1.32-1.fc11 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
==================================================================================
Package Arch Version Repository Size
==================================================================================
Installing:
wine i586 1.1.32-1.fc11 updates 27 k
wine-alsa i586 1.1.32-1.fc11 updates 88 k
wine-capi i586 1.1.32-1.fc11 updates 31 k
wine-cms i586 1.1.32-1.fc11 updates 47 k
wine-common noarch 1.1.32-1.fc11 updates 86 k
wine-core i586 1.1.32-1.fc11 updates 14 M
wine-desktop noarch 1.1.32-1.fc11 updates 31 k
wine-devel i586 1.1.32-1.fc11 updates 2.7 M
wine-docs noarch 1.0-2.fc11 fedora 1.9 M
wine-esd i586 1.1.32-1.fc11 updates 41 k
wine-fonts noarch 1.1.32-1.fc11 updates 190 k
wine-jack i586 1.1.32-1.fc11 updates 43 k
wine-ldap i586 1.1.32-1.fc11 updates 94 k
wine-nas i586 1.1.32-1.fc11 updates 29 k
wine-openal i586 1.1.32-1.fc11 updates 41 k
wine-oss i586 1.1.32-1.fc11 updates 93 k
wine-pulseaudio i586 1.1.32-1.fc11 updates 50 k
wine-twain i586 1.1.32-1.fc11 updates 57 k
Rails 3 beta by February, Ruby on Rails 3, an upgrade to the popular Web development framework that merges Rails with the alternative Merb framework, is due to be offered as a beta release by the end of this month.
Rails 3 beta by February, Ruby on Rails 3, an upgrade to the popular Web development framework that merges Rails with the alternative Merb framework, is due to be offered as a beta release by the end of this month.
Rails 3 beta by February
According to David Heinemeier Hansson, the founder of the Ruby based web development framework, although a beta of Rails 3 is expected by the end of this month the release may slip into February. Hansson gave the estimated release timing in an article on InfoWorld. If all goes to plan Rails 3 is expected to arrive in the first quarter of this year. Rails 3 is a major reworking of the framework which sees ideas from the alternative Merb framework being integrated in a development process which began in December 2008.