Posts

Showing posts with the label Linux

CURL error code 7 in php

Curl is one of most powerful functionality in PHP. It will allow us to communicate with external URL. To use the curl functionality in your code. We must enable PHP curl module in PHP installation. In this post, i could like to explain about curl error code "7". There are some of the criteria to get this error. Due to wrong URL. URL might have some port on postfix. For Example: http://xx.xxx.xxx.xx:8080/ Solution : To solve this issue, we must remove the port on URL.Your URL must be like http://xx.xxx.xxx.xx/

Libmemcached cinttypes problem on complie using gc++ complier for memcached library

--------------------------------------------------------------------------------------------------------- Problem --------------------------------------------------------------------------------------------------------- The compilation failed on a configure without any options: ----   CXX libhashkit/libhashkit_libhashkit_la-behavior.lo   CXX libhashkit/libhashkit_libhashkit_la-crc32.lo   CXX libhashkit/libhashkit_libhashkit_la-digest.lo   CXX libhashkit/libhashkit_libhashkit_la-encrypt.lo   CXX libhashkit/libhashkit_libhashkit_la-fnv_32.lo   CXX libhashkit/libhashkit_libhashkit_la-fnv_64.lo   CXX libhashkit/libhashkit_libhashkit_la-function.lo   CXX libhashkit/libhashkit_libhashkit_la-has.lo   CXX libhashkit/libhashkit_libhashkit_la-hashkit.lo   CXX libhashkit/libhashkit_libhashkit_la-jenkins.lo   CXX libhashkit/libhashkit_libhashkit_la-ketama.lo   CXX libhashkit/libhashkit_libhashkit_la-md5.lo   CXX libhashkit/libhashkit_libhashkit_la-murmur.lo   CXX libhashkit/libhashkit_libhashk

How to add cron job in CentOS(UNIX/LINUX)

CRON Job is one of the most powerful system in UNIX system. Cron job will be execute by unix system by certain time interval on regular basis. It will allow to schedule your script to run on background without affecting your current task on UNIX machine. Here i will give you real time example for CentOS. Cron jobs can be schedule on two different ways, System cron job and user defined cron jobs. System jobs will be defined by root privilege user. This will allow your unix system to perform there system related job on certain interval basis. User defined cron jobs can be defined by any of the user with their user privilege. Location of crontab in CentOS - /etc/crontab The below command will allow you to edit the cron file to add your job. crontab -e Here the syntax for adding your cron job into cron file. 1 2 3 4 5 /path/to/your-filename arg1 arg2 What is 1, 2, 3, 4, 5? 1 - Minute (0-59) 2 - Hours (0-23) 3 - Days of month(1-31) 4 - Month (1-12) 5 - Week days (0 -7)

How to use SCP command in windows

SCP command is one of the most powerful command in linux to transfer files in secure way. It can be use for windows. Here the link to download link for windows. After you download the file into you local machine. Please go to command prompt and go to location of pscp.exe. From there you need to execute the following commands to download and upload a file. Please use below command to download file to local from server location. Please use below command to upload file from local to server location.

How to setup virtual host in apache2 on ubuntu OS

Virtual host is one of the beautiful option, which is provided by web servers. I have already shared the snacks about XAMPP virtual host creating process. I believe that snacks was tasty and delightful for your coding life. Here, i am sharing another tasty snacks about Apache2 server virtual host, which is default server of most of linux OS. In order to create virtual host in your linux machine with apache2 server. First you have to place your project folder under root directory (/var/www/). Create virtual host file in below location with tags Step 1 : Go to cd /etc/apache2/sites-available/ Step 2 : cp default yoursitename.com Step 3 : Open your file with following command sudo gedit  yoursitename.com Paste the below code into yoursitename.com file. <VirtualHost *:80>     ServerAdmin test@test.com     DocumentRoot /var/www/project-directory/     ServerName yoursitename.com         ServerAlias www.yoursitename.com         ErrorLog /var/log/apache2/yoursitename.co

Skype can't connect error ubuntu

This article is more useful for skype users. Skype is generic chatting software. Sometimes you may be frustrated about skype error like "skype can't connect". This solution is only for Ubuntu users. Using this shell script, you can remove the old instance from your system, deleting the shared.xml which is tmp xml of every instance of skype and restarting the skype. skype_error.sh So, now we have build the shell script and saved. Next we have to execute the shell script. Please follow following steps to execute shell script in ubuntu. Step 1 : Open teminal. Step 2 : Go to your shell script saved path. Step 3 : Put dot(.) with space give the shell scrip filename and press enter. Example: . skype_error.sh

Create virtual host in xampp on ubuntu

Step 1 - Adding VirtualHost feature to the Web Server The first step is that you need to initiate the xampp virtual host will be enabled. To do this, simply uncomment the following line on /opt/lampp/etc/httpd.conf file. # sudo gedit /opt/lampp/etc/httpd.conf Uncomment the following line by removing '#' Remove the asah(#) Change this line, as i given below #Include etc/extra/httpd-vhosts.conf -> Include etc/extra/httpd-vhosts.conf Step 2 - Adding your website to virtualhost configuration file Next, you need to edit /opt/lampp/etc/extra/httpd-vhosts.conf file to add your website. # sudo gedit /opt/lampp/etc/extra/httpd-vhosts.conf Add the following text to the bottom of the file. <VirtualHost *:80> ServerAdmin webmaster@example.com DocumentRoot /opt/lampp/htdocs/example ServerName www.example.com ErrorLog logs/www.example.com-error_log CustomLog logs/www.example.com-access_log common </VirtualHost> Step 3 - Registering your new website

Intall Rabbit SVN for Ubuntu

This is Most popular SVN in Ubuntu Platform. I mean Linux platform.  It will give the toretise SVN GUI in linux platform. It looks more user friendly.   sudo add-apt-repository ppa:rabbitvcs/ppa Add the following line to your /etc/apt/sources.list file (signing key=1024R/34EF4A35): deb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu **DISTRIBUTION** main You can use Synaptic to install packages or the command line. If you are using Synaptic, just search for the packages listed below. On the command line, you need to update your software package repositories with: sudo apt-get update And install it with: sudo apt-get install «packages» …where packages are rabbitvcs-nautilus3 for the Nautilus 3.x extension (use this for Ubuntu 11.10, Oneiric Ocelot) rabbitvcs-nautilus for the Nautilus 2.x extension rabbitvcs-thunar for the Thunar extensions rabbitvcs-gedit for the GEdit extension rabbitvcs-cli for the command line launchers

Command for delete folder with files in linux

As we discuss early, we have plenty of linux command to learn. Recently, i faced a problem to delete a folder with files.Finally, i found the soultion to delete entire directory with files. Remove is a command to delete a file or folder. With option of -rm we can delete entire directory with files. Command : remove -rm foldername

ps and grep command in Linux

We have plenty of command to execute in linux platform and also those are very powerfull command. Here, i am going to give the demonstration of PS and Grep command with realtime example. Here my scenario, I am going to kill the process of firefox which is running in my machine with out of memory. Ps is basically process tracking command. -ef option will list out the process in detail. Grep is fetching command. So, Here below command will fetch the firefox process running status in detail. ps -ef | grep firefox

find and delete the particular files using file extension in linux

The below command generic command. Using this command we can remove particular extension file. Here, I illustarted the .svn files find and remove from the particular folder. So, here find the .svn extension from partiular folder and it will remove from the folder. find . -name ".svn" -exec rm -rf {} \;

Basic vi Commands

What is vi ? The default editor that comes with the UNIX operating system is called vi ( vi sual editor). [Alternate editors for UNIX environments include pico and emacs , a product of GNU.] The UNIX vi editor is a full screen editor and has two modes of operation: Command mode commands which cause action to be taken on the file, and Insert mode in which entered text is inserted into the file. In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may even cause the vi editor to enter the insert mode. In the insert mode, every character typed is added to the text in the file; pressing the <Esc> ( Escape ) key turns off the Insert mode. While there are a number of vi commands, just a handful of these is usually sufficient for beginning vi users. To assist such users, this Web page contains a sampling of basic vi commands. The most basic and useful commands are m

Things To Do.... After installing Ubuntu 9.04 aka Jaunty

This post is a follow up of this . In Ubuntu Jaunty Jackalope , as you would expect from any upgrade, the packages are a bit different, so i decided to write the Jaunty’s To Do List on its own. So here you go : 1 – Expand the Software Repository List First of all, lets make Ubuntu “see” more packages. Go to the terminal and edit your sources.list with : sudo gedit /etc/apt/sources.list Here is the content of my sources.list which I think is quite complete to have all the necessary applications you could ever need. So delete the whole content of your sources list and replace it with the content of mine Save it. Go to the Terminal and type: sudo apt-get upgrade Now all your programs will run on the last version. 2 – Anti-Virus Windows equivalent : AVG AntiVirus, NAV, TrendMicro, F-Prot, Kaspersky, … Ubuntu equivalent : Avast Avast wget http://files.avast.com/files/linux/avast4workstation_1.3.0-2_i386.deb && sudo dpkg -i avast4workstation_1.3.0-2_i3