add custom fields to user profile wordpress without plugin

WordPress tutorial, add custom fields to user profile wordpress without plugin. For adding extra details use can use following sample code in functions.php file. You can modify the code as per your requirement.

add custom fields to user profile wordpress without plugin

add custom fields to user profile wordpress without plugin
add custom fields to user profile wordpress without plugin

Note: If you are not wordpress developer then you should ask any wordpress developer to do this changes.

add_action( 'show_user_profile', 'extra_fields_to_user' );
add_action( 'edit_user_profile', 'extra_fields_to_user' );

function extra_fields_to_user( $user ) { ?>

 <h3>Extra profile information</h3>

 <table>

 <tr>
 <th><label for="facebook">facebook</label></th>

 <td>
 <input type="text" name="facebook" id="facebook" value="<?php echo esc_attr( get_the_author_meta( 'facebook', $user->ID ) ); ?>" /><br />
 <span>Please enter your facebook username.</span>
 </td>
 </tr>

 </table>
<?php }
add_action( 'personal_options_update', 'extra_fields_to_user_save' );
add_action( 'edit_user_profile_update', 'extra_fields_to_user_save' );

function extra_fields_to_user_save( $user_id ) {

 if ( !current_user_can( 'edit_user', $user_id ) )
 return false;

 /* Copy and paste this line for additional fields. Make sure to change 'facebook' to the field ID. */
 update_usermeta( $user_id, 'facebook', $_POST['facebook'] );
}

showing the user information use following code.
<?php the_author_meta( ‘facebook’ ); ?>

how to create simple shadow effect in photoshop

photoshop tutorial, how to create simple shadow effect in photoshop. we given step by step guide with screen shots and their details.

how to create simple shadow effect in photoshop

how to create simple shadow effect in photoshop
how to create simple shadow effect in photoshop

Create your own design in photoshop

Type a text as a “wordpressapi”

photoshop_shawdo

now select filter option >> artistic >> corked pencil

it will look like below

photoshop3

Now select >> layer style >>  blending option

select drop shadow

photoshop4

wordpress pagination style without wordpress plugin

wp-pagenavi is most popular. wordpress pagination style without wordpress plugin, We need to install wp-pagenavi wordpress plugin for pagination styling.  When we think wordpress pagination style then first thing came in mind which is. We need to install wp-pagenavi wordpress plugin for pagination styling. There are multiple pagination plugins available for pagination styling but wp-pagenavi is most popular.

wordpress pagination style without wordpress plugin

I always recommend wordpress theme developers to not to use the wordpress plugins as much possible because any wordpress plugin will install the extra unuseful code also.

wordpress pagination style without wordpress plugin
wordpress pagination style without wordpress plugin

Here in this article I am giving you the example about wordpress pagination without using any wordpress plugin.

Just open your functions.php file and put following code.


function wpapi_pagination($pages = '', $range = 4)
{
 $showitems = ($range * 2)+1;

 global $paged;
 if(empty($paged)) $paged = 1;

 if($pages == '')
 {
 global $wp_query;
 $pages = $wp_query->max_num_pages;
 if(!$pages)
 {
 $pages = 1;
 }
 }

 if(1 != $pages)
 {
 echo "</pre>
<div class="\&quot;wpapi_pagination\&quot;">Page ".$paged." of ".$pages."";
 if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href="&quot;.get_pagenum_link(1).&quot;">« First</a>";
 if($paged > 1 && $showitems < $pages) echo "<a href="&quot;.get_pagenum_link($paged - 1).&quot;">‹ Previous</a>";

 for ($i=1; $i <= $pages; $i++)
 {
 if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
 {
 echo ($paged == $i)? "<span class="\&quot;current\&quot;">".$i."</span>":"<a class="\&quot;inactive\&quot;" href="&quot;.get_pagenum_link($i).&quot;">".$i."</a>";
 }
 }

 if ($paged < $pages && $showitems < $pages) echo "<a href="\&quot;&quot;.get_pagenum_link($paged">Next ›</a>";
 if ($paged < $pages-1 &&  $paged+$range-1 < $pages && $showitems < $pages) echo "<a href="&quot;.get_pagenum_link($pages).&quot;">Last »</a>";
 echo "</div>
<pre>\n";
 }
}

Above function will give the wordpress pagination style like google search engine.

Then open style.css file from your wordpress theme file and put following code in that file.


.wpapi_pagination {
clear:both;
padding:20px 0;
position:relative;
font-size:11px;
line-height:13px;
}

.wpapi_pagination span, .wpapi_pagination a {
display:block;
float:left;
margin: 2px 2px 2px 0;
padding:6px 9px 5px 9px;
text-decoration:none;
width:auto;
color:#fff;
background: #555;
}

.wpapi_pagination a:hover{
color:#fff;
background: #3279BB;
}

.wpapi_pagination .current{
padding:6px 9px 5px 9px;
background: #3279BB;
color:#fff;
}

Then finally where you want to show the wordpress pagination there in area put following code (index.php, etc..)


if (function_exists("wpapi_pagination")) {
 wpapi_pagination($additional_loop->max_num_pages);

 

wordpress pagination style without wordpress plugin
wordpress pagination style without wordpress plugin

If you are having any issues or question about adding the wordpress pagination without plugin then please write me.

 

 

What is reset css and How to use the reset CSS

Many new web developers or web application developers may be did not hear about reset CSS. Many web developers use the global selectors and global CSS styling. That is very basic reason behind that. They want to display their CSS style across the various browsers.

What is reset css and How to use the reset CSS

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on. With reset CSS you are overriding the setting of various browser setting and elements. There are inconsistencies with every browser. For reducing the issues and setting of browser you need to reset the browser properties.

What is reset css and How to use the reset CSS
What is reset css and How to use the reset CSS

With reset CSS you can set the border, font color, color, margin, padding, img, h1, a, etc properties. The problem is that every browser’s stylesheet has subtle but fundamental differences. By using a CSS reset. There are many big sites and tool available for using the reset the CSS.

In reset CSS you need to use the most common HTML tags and their properties for reset there CSS properties.

you can also create you reset CSS as per your website need. There are many useful and good reset available. I like the YUI reset CSS most because that is really useful.

For using the YUI reset CSS you need to just add the following line in your website.

<!-- Source File -->
css" href="http://yui.yahooapis.com/3.2.0/build/cssreset/reset-min.css">

For more information about YUI reset css you can visit the following URL
http://developer.yahoo.com/yui/3/cssreset/

Following reset css is most common in each and every website and following code is useful for every website.

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	outline: 0;
	font-size: 100%;
	vertical-align: baseline;
	background: transparent;
}

Reset CSS is really useful for every website. do use the reset CSS in you stylesheet. There is another good reset CSS called blueprint which you download from following URL.
http://code.google.com/p/blueprintcss/.


Some people are saying dont use the reset css because that will increase the your css size but I must admin this thing.
you should use the reset css that will save your big time.

What is reset css and How to use the reset CSS
What is reset css and How to use the reset CSS

How to clean up and optimize wordpress database

Keeping your wordpress database is very important for wordpress database. In this article we explained, How to clean up and optimize wordpress database. This will improve your site speed aslo. Many times you install the wordpress plugins and some time you dont want that plugins and you delete that plugins.

How to clean up and optimize wordpress database

There is very nice wordpress plugin is avilable for database backup.

WP-DB-Backup

WP-DB-Backup allows you easily to backup your core WordPress database tables. You may also backup other tables in the same database.
But that plugins create some tables in your wordpress database. You need to remove that tables from your wordpress database.
Imp note: when ever you are cleaning the database or deleting the unwanted tables from wordpress database. Please consult with your web administrator.
Dont forget to take a full backup of your database.

This tutorial should be forward-compatible with WordPress 3.0

  • Install WP-DB-Backup by Austin Matzko
  • Mouse over Tools so that the down arrow appears
  • Click the down arrow
  • Click Backup
  • You’ll see something like this:
How to clean up and optimize wordpress database
How to clean up and optimize wordpress database

On the left are the default database tables included with WordPress. All of these are included every time you backup. The only thing you have to decide here is whether to exclude spam comments from being backed up (I recommend this) and whether to exclude post revisions (I recommend excluding these too, unless you have a specific reason for keeping revisions).

On the right is a list of additional database tables, most of which were probably created by plugins. There’s also a table called that will end with the name “commentmeta” – this can be used by plugins.

If your plugins have created a lot of data that you would like to save, or you’ve spent a lot of time configuring particular plugins, you’ll want to backup these tables. Otherwise, you can keep your database backups smaller by not checking them.

  • Next we see the Backup Option. There are three choices here:

A. Save to the server

This will save a backup of your database as a file on your web server. I don’t recommend this.

B. Download to your computer.

This will create a database backup file that you can save to your local computer.

C. Email backup to:

This allows you to send a copy of the backup to any e-mail address you’d like.

  • Let’s go ahead and download a copy to our hard drives now.

Check options you want in the Tables section then click “Backup now!”

You should see a progress bar, and when that’s done your browser will prompt you to save the file. You can save this file wherever you’d like.

  • There’s another section called “Scheduled Backup.” This is where this program gets really great.

Here we can schedule a backup to be e-mailed to a particular e-mail address however often we’d like. I recommend checking selecting “Once Daily.”

  • On the right, you’ll see that list of optional tables again. Check the ones you want to backup every time the backup runs.
  • Enter the e-mail address you want the backups delivered to in the “Email backup to:” field.
  • Click “Schedule backup.”
  • You should now get a backup file as an e-mail attachment every day. You should save these attachments to your local computer. If you’re using Gmail or another web mail host that has a lot of storage space, you might want to leave your databases on their server as an additional off-site backup. Be aware that that’s an additional security risk – if your e-mail account is ever compromised, the would have access to all of your database backups.

Active Model in Rails

The technique we used was quite a hack as this is something that ActiveRecord wasn’t designed to do but now in Rails 3.0 we have a new feature called ActiveModel which makes doing something like this a lot easier.

Active Model in Rails

Before we get into the details of ActiveModel we’ll first describe the part of the application that we’re going to modify to use it.

Active Model in Rails 3.0
Active Model in Rails 3.0

The screenshot above shows a contact form that has been created using Rails’ scaffolding. The application has a model called Message that is currently backed by ActiveRecord which means that we’re managing messages through the database. We’re going to change the way this form works so that it just sends emails and doesn’t store messages in a database table.

When you’re thinking of doing something like this it’s always a good idea to first consider your requirements and make sure that you really don’t want to store the data from the form in a database as there are often good side-effects to doing this. A database can act as a backup and also makes it easier to move the message-sending into a queue in a background process. For the purposes of this example, however, we don’t want any of that functionality so we’re free to go ahead and make our model tableless.

The code for the Message class looks like this:

File name: /app/models/message.rb


class Message < ActiveRecord::Base
 validates_presence_of :name
 validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i
 validates_length_of :content, :maximum => 500
end

Message inherits from ActiveRecord::Base as you would expect a model class to, but as we don’t want this model to have a database back-end we’re going to remove that inheritance. As soon as we do this, though, our form will no longer work as the validators are provided by ActiveRecord. Fortunately, we can restore this functionality by using ActiveModel.

If we take a look at the Rails 3 source code we’ll see the that there are activerecord and activemodel directories. The core Rails team has taken everything from ActiveRecord that wasn’t specific to the database backend and moved it out into ActiveModel. ActiveRecord still relies heavily on ActiveModel for the functionality that isn’t specific to the database and as ActiveModel is full-featured and thoroughly tested it’s great for use outside ActiveRecord.

It we take a look in the directory that contains the code for ActiveModel we can see the functionality that it provides.

We can see from the list above that ActiveModel includes code to handle callbacks, dirty tracking, serialization and validation, among other things. The last of these is exactly what we’re looking for.

The code for validations has the following comment near the top and we can see from it that it’s fairly easy to add validations to a model. All we need to do is include the Validations module and provide getter methods for the attributes that we’re calling validators on.

Now that we know this we can apply it to our Message model.

File name: /app/models/message.rb


class Message
 include ActiveModel::Validations

 attr_accessor :name, :email, :content

 validates_presence_of :name
 validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i
 validates_length_of :content, :maximum => 500
end

Message inherits from ActiveRecord::Base as you would expect a model class to, but as we don’t want this model to have a database back-end we’re going to remove that inheritance. As soon as we do this, though, our form will no longer work as the validators are provided by ActiveRecord. Fortunately, we can restore this functionality by using ActiveModel.

If we take a look at the Rails 3 source code we’ll see the that there are activerecord and activemodel directories. The core Rails team has taken everything from ActiveRecord that wasn’t specific to the database backend and moved it out into ActiveModel. ActiveRecord still relies heavily on ActiveModel for the functionality that isn’t specific to the database and as ActiveModel is full-featured and thoroughly tested it’s great for use outside ActiveRecord.

It we take a look in the directory that contains the code for ActiveModel we can see the functionality that it provides.

We can see from the list above that ActiveModel includes code to handle callbacks, dirty tracking, serialization and validation, among other things. The last of these is exactly what we’re looking for.

The code for validations has the following comment near the top and we can see from it that it’s fairly easy to add validations to a model. All we need to do is include the Validations module and provide getter methods for the attributes that we’re calling validators on.

Now that we know this we can apply it to our Message model.

File name: /app/models/message.rb


class Message
 include ActiveModel::Validations

 attr_accessor :name, :email, :content

 validates_presence_of :name
 validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i
 validates_length_of :content, :maximum => 500
end

This isn’t enough to get our model to behave as the controller expects it to, though. There are two problems in the create method. Firstly the call to Message.new won’t work as our Message model no longer has an initializer that takes a hash of attributes as an argument. Secondly, save won’t work as we don’t have a database backend to save the new message to.

Filename : /apps/controllers/messages_controller.rb


class MessagesController < ApplicationController
 def new
 @message = Message.new
 end

def create
 @message = Message.new(params[:message])
 if @message.save
 # TODO send message here
 flash[:notice] = "Message sent! Thank you for contacting us."
 redirect_to root_url
 else
 render :action => 'new'
 end
 end
end

We’ll fix the second of these problems first. While we can’t save a message we can check that it is valid, so we’ll replace @message.save with @message.valid?.

File name :/app/controllers/messages_controllers.rb


def create
 @message = Message.new(params[:message])
 if @message.valid?
 # TODO send message here
 flash[:notice] = "Message sent! Thank you for contacting us."
 redirect_to root_url
 else
 render :action => 'new'
 end
end

We can solve the first problem by writing an initialize method in the Message model that takes a hash as a parameter. This method will loop through each item in the hash and assign the value to the appropriate attribute for the message using the send method.

File name: /app/models/message.rb


class Message
 include ActiveModel::Validations

attr_accessor :name, :email, :content
 validates_presence_of :name
 validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i
 validates_length_of :content, :maximum => 500
 def initialize(attributes = {})
 attributes.each do |name, value|
 send("#{name}=", value)
 end
 end
end

If we reload the form now we’ll see that we’re not quite there yet, however.

This time the error is caused by a missing to_key method in the Message model. The error is thrown by the form_for method so it seems that Rails itself is expecting our model to have functionality that it doesn’t yet support. Let’s add that functionality now.

Rather than guessing everything that Rails expects the model to have there’s a nice lint test included with ActiveModel that allows us to check whether our custom model behaves as Rails expects it to. If we include the ActiveModel::Lint::Tests module in a tests for the model it will check that the model has all of the required functionality.

The source code for the Lint::Tests module shows the methods that the model needs to respond to in order for it to work as it should, including to_key. We can make our model work by including a couple of ActiveRecord modules. The first of these is Conversion, which provides that to_key method and several others. The other module is the Naming module, but in this case we extend it in our class rather than including it as it includes some class methods.

As well as including the Conversion module we need to define a persisted? method in our model, which needs to return false as our model isn’t persisted to a database. With these changes in place our Message model now looks like this:

File name: /app/models/message.rb


class Message
 include ActiveModel::Validations
 include ActiveModel::Conversion
 extend ActiveModel::Naming
 attr_accessor :name, :email, :content
 validates_presence_of :name
 validates_format_of :email, :with => /^[-a-z0-9_+\.]+\@([-a-z0-9]+\.)+[a-z0-9]{2,4}$/i
 validates_length_of :content, :maximum => 500
 def initialize(attributes = {})
 attributes.each do |name, value|
 send("#{name}=", value)
 end
 end
 def persisted?
 false
 end
end

If we reload the form now it will work again which means that the Message model now satisfies all of the requirements that Rails 3 relies on for a model. If we try to submit the form we’ll see that the validators are working, too.

We’ve only covered a little of what ActiveModel provides in this episode but this should have been enough to whet your appetite and give you a reason to look more deeply into its source code to see what it can do. The code is well documented and structured so if you see something you might find useful then there should be enough information in the comments for that file to get you started using it.

how to add users in wordpress website

If you’d like your blog to feature posts from multiple authors, how to add users in wordpress website, you can add as many administrative accounts to your blog as you like. There are two different ways to add users. There are two different ways to add a new user to your blog, depending on whether or not that person already has an account at WordPress.com.

how to add users in wordpress website

how to add users in wordpress website
how to add users in wordpress website

 

To add someone who already has a WordPress.com account:

  • Log in to your dashboard.
  • Click on the Users -> Authors & Users menu option.
  • In the Add User From Community section at the bottom, enter the author’s email address in the User E-mail box
  • Select either Contributor, Author or Editor in the Role list
  • Click the Add User button
  • Your new user will now see your blog listed in their dashboard when they log in to WordPress.com.

To add someone who does not have a WordPress.com account:

  • Log in to your dashboard.
  • Click on the Users -> Invites menu option.
  • Enter the author’s first name, last name and email address in the appropriate fields.
  • Check the box labeled Add user to my blog as a contributor.
  • Click the Send Invite button.
  • Your new user will receive an email inviting them to sign up for a WordPress.com account (and, optionally, create their own blog if they want). Once they have signed up, you’ll see them listed as a Contributor on your Users tab. You can change them to a different role (Author or Editor) later if you’d like.

The difference between each of the roles is explained in the User Roles documentation.

Warning: Please be very careful when adding a new Administrator user to your blog. Other Administrators are effectively co-owners. They have as much power over your blog as you do, including the ability to permanently delete it.

Transfer Note: For security purposes, there is no way to remove the original creator/owner from their blog. As such, if you wish to transfer your blog to another user/account, please follow the instructions here.

Video

Watch the “Adding users to your blog (or removing them)” video from WordPress.tv.

Adding users to your blog (or removing them)

Adding users to your blog (or removing them)

This movie requires Adobe Flash for playback.

Watch the “Inviting your friends to WordPress.com” video from WordPress.tv.

Inviting your friends to WordPress.com

Inviting your friends to WordPress.com

This movie requires Adobe Flash for playback.

Was this Helpful?


How to use smiley images in wordpress posts

If you want to use smiley images in wordpress posts then you can use our tricks. Here in this article, we given sample and trick for using smiley in posts.

Follow our steps.

  1. Find your smiley image files in the /wp-includes/images/smilies directory and back them up to another directory
  2. Note the names of each smiley file. Your files must match these names and should be in the same ‘gif’ image format.
  3. For predictable behavior, the image sizes should be similar.
  4. Upload your new files to the /wp-includes/images/smilies directory with an FTP program.

How to use smiley images in wordpress posts

How to use smiley images in wordpress posts
How to use smiley images in wordpress posts

If you want to changes the names of smiley and you need to edit wp-includes/functions.php file.

In that file you will find the “smilies_init” function.

You will find the following code in that file.


if ( !isset( $wpsmiliestrans ) ) {
 $wpsmiliestrans = array(
 ':mrgreen:' => 'icon_mrgreen.gif',
 ':neutral:' => 'icon_neutral.gif',
 ':twisted:' => 'icon_twisted.gif',
 ':arrow:' => 'icon_arrow.gif',
 ':shock:' => 'icon_eek.gif',
 ':smile:' => 'icon_smile.gif',
 ':???:' => 'icon_confused.gif',
 ':cool:' => 'icon_cool.gif',
 ':evil:' => 'icon_evil.gif',
 ':grin:' => 'icon_biggrin.gif',
 ':idea:' => 'icon_idea.gif',
 ':oops:' => 'icon_redface.gif',
 ':razz:' => 'icon_razz.gif',
 ':roll:' => 'icon_rolleyes.gif',
 ':wink:' => 'icon_wink.gif',
 ':cry:' => 'icon_cry.gif',
 ':eek:' => 'icon_surprised.gif',
 ':lol:' => 'icon_lol.gif',
 ':mad:' => 'icon_mad.gif',
 ':sad:' => 'icon_sad.gif',
 '8-)' => 'icon_cool.gif',
 '8-O' => 'icon_eek.gif',
 ':-(' => 'icon_sad.gif',
 ':-)' => 'icon_smile.gif',
 ':-?' => 'icon_confused.gif',
 ':-D' => 'icon_biggrin.gif',
 ':-P' => 'icon_razz.gif',
 ':-o' => 'icon_surprised.gif',
 ':-x' => 'icon_mad.gif',
 ':-|' => 'icon_neutral.gif',
 ';-)' => 'icon_wink.gif',
 '8)' => 'icon_cool.gif',
 '8O' => 'icon_eek.gif',
 ':(' => 'icon_sad.gif',
 ':)' => 'icon_smile.gif',
 ':?' => 'icon_confused.gif',
 ':D' => 'icon_biggrin.gif',
 ':P' => 'icon_razz.gif',
 ':o' => 'icon_surprised.gif',
 ':x' => 'icon_mad.gif',
 ':|' => 'icon_neutral.gif',
 ';)' => 'icon_wink.gif',
 ':!:' => 'icon_exclaim.gif',
 ':?:' => 'icon_question.gif',
 );

You can edit that names as per your requirement and add more smiley.

If you want to put some css for your smiley then you can use or put following CSS class in your style.css file (Theme folder).

img.wp-smiley {
   float: none;
   padding:2px;
   border:none;
}

That sit! Have fun.

How to install siege on Linux box

In this article I given step by step information about How to install siege on Linux box. I given the full commands and there output with full description.

How to install siege on Linux box

ABOUT SIEGE – Background
Siege is an http load testing and benchmarking utility. It was designed to let web developers measure their code under duress, to see how it will stand up to load on the internet. Siege supports basic authentication, cookies, HTTP and HTTPS protocols. It lets its user hit a web server with a configurable number of simulated web browsers. Those browsers place the server “under siege.”

How to install siege on Linux box
How to install siege on Linux box

PLATFORM SUPPORT
Siege was written on GNU/Linux and has been successfully ported to AIX, BSD, HP-UX and Solaris. It should compile on most System V UNIX variants and on most newer BSD systems. Because Siege relies on POSIX.1b features not supported by Microsoft, it will not run on Windows. Of course you can use Siege to test a Windows HTTP server.

Download siege from following URL or Using following command
[kapil@kapil-pc ~]$ wget ftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz
[kapil@kapil-pc ~]$ tar xzf siege-latest.tar.gz
[kapil@kapil-pc ~]$ mv siege-2.69 siege
[kapil@kapil-pc ~]$ cd siege
[kapil@kapil-pc siege ~]$ su
[root@kapil-pc siege ~]$ ROOT_PASSWORD

[root@kapil-pc siege ~]$ ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking for gcc… no
checking for cc… no
checking for cc… no
checking for cl… no
configure: error: no acceptable cc found in $PATH

If you got above error Please Use following command.

[root@kapil-pc siege ~]$ yum install gcc*

Than run following command again

[root@kapil-pc siege ~]$ ./configure
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking for gawk… gawk
checking whether make sets $(MAKE)… yes
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking for style of include used by make… GNU
checking for gcc… gcc
checking for C compiler default output file name… a.out
checking whether the C compiler works… yes
checking whether we are cross compiling… no
checking for suffix of executables…
checking for suffix of object files… o
checking whether we are using the GNU C compiler… yes
checking whether gcc accepts -g… yes
checking for gcc option to accept ANSI C… none needed
checking dependency style of gcc… none
checking how to run the C preprocessor… gcc -E
checking for egrep… grep -E
checking for AIX… no
checking for gcc… (cached) gcc
checking whether we are using the GNU C compiler… (cached) yes
checking whether gcc accepts -g… (cached) yes
checking for gcc option to accept ANSI C… (cached) none needed
checking dependency style of gcc… (cached) none
checking for a sed that does not truncate output… /bin/sed
checking for ld used by gcc… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking for /usr/bin/ld option to reload object files… -r
checking for BSD-compatible nm… /usr/bin/nm -B
checking whether ln -s works… yes
checking how to recognise dependent libraries… pass_all
checking for ANSI C header files… yes
checking for sys/types.h… yes
checking for sys/stat.h… yes
checking for stdlib.h… yes
checking for string.h… yes
checking for memory.h… yes
checking for strings.h… yes
checking for inttypes.h… yes
checking for stdint.h… yes
checking for unistd.h… yes
checking dlfcn.h usability… yes
checking dlfcn.h presence… yes
checking for dlfcn.h… yes
checking for g++… g++
checking whether we are using the GNU C++ compiler… yes
checking whether g++ accepts -g… yes
checking dependency style of g++… none
checking how to run the C++ preprocessor… g++ -E
checking for g77… no
checking for f77… no
checking for xlf… no
checking for frt… no
checking for pgf77… no
checking for fort77… no
checking for fl32… no
checking for af77… no
checking for f90… no
checking for xlf90… no
checking for pgf90… no
checking for epcf90… no
checking for f95… f95
checking whether we are using the GNU Fortran 77 compiler… yes
checking whether f95 accepts -g… yes
checking the maximum length of command line arguments… 32768
checking command to parse /usr/bin/nm -B output from gcc object… ok
checking for objdir… .libs
checking for ar… ar
checking for ranlib… ranlib
checking for strip… strip
checking if gcc supports -fno-rtti -fno-exceptions… no
checking for gcc option to produce PIC… -fPIC
checking if gcc PIC flag -fPIC works… yes
checking if gcc static flag -static works… yes
checking if gcc supports -c -o file.o… yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries… yes
checking whether -lc should be explicitly linked in… no
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking whether stripping libraries is possible… yes
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
configure: creating libtool
appending configuration tag “CXX” to libtool
checking for ld used by g++… /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld… yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries… yes
checking for g++ option to produce PIC… -fPIC
checking if g++ PIC flag -fPIC works… yes
checking if g++ static flag -static works… yes
checking if g++ supports -c -o file.o… yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
appending configuration tag “F77” to libtool
checking if libtool supports shared libraries… yes
checking whether to build shared libraries… yes
checking whether to build static libraries… yes
checking for f95 option to produce PIC… -fPIC
checking if f95 PIC flag -fPIC works… yes
checking if f95 static flag -static works… yes
checking if f95 supports -c -o file.o… yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries… yes
checking dynamic linker characteristics… GNU/Linux ld.so
checking how to hardcode library paths into programs… immediate
checking for perl… /usr/bin/perl
checking for a POSIX-compliant shell… /bin/sh
checking whether make sets $(MAKE)… (cached) yes
checking for a BSD-compatible install… /usr/bin/install -c
checking for buggy pthread mutex initializers… no
checking for dlopen() in -ldld… no
checking for dlopen() in -ldl… yes
checking for ssl support… yes
checking off/include/openssl/opensslv.h usability… no
checking off/include/openssl/opensslv.h presence… no
checking for off/include/openssl/opensslv.h… no
checking /usr/include/openssl/opensslv.h usability… yes
checking /usr/include/openssl/opensslv.h presence… yes
checking for /usr/include/openssl/opensslv.h… yes
checking for OpenSSL version… >= 0.9.8 (appropriate flag set)
checking for ANSI C header files… (cached) yes
checking for sys/wait.h that is POSIX.1 compatible… yes
checking fcntl.h usability… yes
checking fcntl.h presence… yes
checking for fcntl.h… yes
checking for unistd.h… (cached) yes
checking signal.h usability… yes
checking signal.h presence… yes
checking for signal.h… yes
checking sys/socket.h usability… yes
checking sys/socket.h presence… yes
checking for sys/socket.h… yes
checking sys/select.h usability… yes
checking sys/select.h presence… yes
checking for sys/select.h… yes
checking sys/time.h usability… yes
checking sys/time.h presence… yes
checking for sys/time.h… yes
checking sys/times.h usability… yes
checking sys/times.h presence… yes
checking for sys/times.h… yes
checking sys/resource.h usability… yes
checking sys/resource.h presence… yes
checking for sys/resource.h… yes
checking errno.h usability… yes
checking errno.h presence… yes
checking for errno.h… yes
checking arpa/inet.h usability… yes
checking arpa/inet.h presence… yes
checking for arpa/inet.h… yes
checking netinet/in.h usability… yes
checking netinet/in.h presence… yes
checking for netinet/in.h… yes
checking netdb.h usability… yes
checking netdb.h presence… yes
checking for netdb.h… yes
checking pthread.h usability… yes
checking pthread.h presence… yes
checking for pthread.h… yes
checking for string.h… (cached) yes
checking for strings.h… (cached) yes
checking sched.h usability… yes
checking sched.h presence… yes
checking for sched.h… yes
checking openssl/e_os.h usability… no
checking openssl/e_os.h presence… no
checking for openssl/e_os.h… no
checking openssl/e_os2.h usability… yes
checking openssl/e_os2.h presence… yes
checking for openssl/e_os2.h… yes
checking for an ANSI C-conforming const… yes
checking for size_t… yes
checking whether time.h and sys/time.h may both be included… yes
checking return type of signal handlers… void
checking for working alloca.h… yes
checking for alloca… yes
checking for strchr… yes
checking for memcpy… yes
checking for strncpy… yes
checking for strstr… yes
checking for strlen… yes
checking for strncasecmp… yes
checking for strncmp… yes
checking for socket… yes
checking for gethostbyname… yes
checking for snprintf… yes
checking for strdup… yes
checking for rand_r… yes
checking for localtime_r… yes
checking for getipnodebyname… no
checking for freehostent… no
checking for getopt_long… yes
checking for socket in -lsocket… no
checking for pthread_attr_init in -lpthread… yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating html/Makefile
config.status: creating lib/Makefile
config.status: creating lib/joedog/Makefile
config.status: creating include/Makefile
config.status: creating include/joedog/Makefile
config.status: creating utils/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing default-2 commands
config.status: executing default-3 commands
config.status: executing default-4 commands
config.status: executing default-5 commands
config.status: executing default-6 commands

——————————————————–
Configuration is complete

Run the following commands to complete the installation:
make
make install

To upgrade an old siegerc file (optional):
mv ~/.siegerc.new ~/.siegerc

For complete documentation: http://www.joedog.org
——————————————————–

Than Use following command

[root@kapil-pc siege ~]# make
Making all in .
make[1]: Entering directory `/home/kapil/testing/siege’
make[1]: Nothing to be done for `all-am’.
make[1]: Leaving directory `/home/kapil/testing/siege’
Making all in include
make[1]: Entering directory `/home/kapil/testing/siege/include’
make all-recursive
make[2]: Entering directory `/home/kapil/testing/siege/include’
Making all in joedog
make[3]: Entering directory `/home/kapil/testing/siege/include/joedog’
make[3]: Nothing to be done for `all’.
make[3]: Leaving directory `/home/kapil/testing/siege/include/joedog’
make[3]: Entering directory `/home/kapil/testing/siege/include’
make[3]: Nothing to be done for `all-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/include’
make[2]: Leaving directory `/home/kapil/testing/siege/include’
make[1]: Leaving directory `/home/kapil/testing/siege/include’
Making all in lib
make[1]: Entering directory `/home/kapil/testing/siege/lib’
Making all in joedog
make[2]: Entering directory `/home/kapil/testing/siege/lib/joedog’
/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c -o memory.lo memory.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c memory.c -fPIC -DPIC -o .libs/memory.o
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c memory.c -o memory.o >/dev/null 2>&1
/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c -o notify.lo notify.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c notify.c -fPIC -DPIC -o .libs/notify.o
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c notify.c -o notify.o >/dev/null 2>&1
/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c -o perl.lo perl.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c perl.c -fPIC -DPIC -o .libs/perl.o
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c perl.c -o perl.o >/dev/null 2>&1
/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c -o util.lo util.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c util.c -fPIC -DPIC -o .libs/util.o
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c util.c -o util.o >/dev/null 2>&1
/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c -o snprintf.lo snprintf.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c snprintf.c -fPIC -DPIC -o .libs/snprintf.o
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c snprintf.c -o snprintf.o >/dev/null 2>&1
/bin/sh ../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c -o stralloc.lo stralloc.c
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c stralloc.c -fPIC -DPIC -o .libs/stralloc.o
gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I/usr/include/openssl -I/usr/include -W -Wall -g -O2 -c stralloc.c -o stralloc.o >/dev/null 2>&1
/bin/sh ../../libtool –tag=CC –mode=link gcc -W -Wall -g -O2 -o libjoedog.la -version-info 1:0:1 memory.lo notify.lo perl.lo util.lo snprintf.lo stralloc.lo
libtool: link: warning: `-version-info/-version-number’ is ignored for convenience libraries
ar cru .libs/libjoedog.a .libs/memory.o .libs/notify.o .libs/perl.o .libs/util.o .libs/snprintf.o .libs/stralloc.o
ranlib .libs/libjoedog.a
creating libjoedog.la
(cd .libs && rm -f libjoedog.la && ln -s ../libjoedog.la libjoedog.la)
make[2]: Leaving directory `/home/kapil/testing/siege/lib/joedog’
make[2]: Entering directory `/home/kapil/testing/siege/lib’
make[2]: Nothing to be done for `all-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/lib’
make[1]: Leaving directory `/home/kapil/testing/siege/lib’
Making all in src
make[1]: Entering directory `/home/kapil/testing/siege/src’
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c auth.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c base64.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c client.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c cookie.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c cfg.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c crew.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c data.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c date.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c eval.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c getopt.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c getopt1.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c handler.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c hash.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c http.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c init.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c load.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c log.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c main.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c md5.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c sock.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c ssl.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c timer.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c url.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c util.c
gcc -DHAVE_CONFIG_H -I. -I. -I../include -I/usr/include/openssl -I/usr/include -I/usr/include/openssl -I/usr/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -c version.c
/bin/sh ../libtool –tag=CC –mode=link gcc -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -L/usr/lib -lpthread -o siege auth.o base64.o client.o cookie.o cfg.o crew.o data.o date.o eval.o getopt.o getopt1.o handler.o hash.o http.o init.o load.o log.o main.o md5.o sock.o ssl.o timer.o url.o util.o version.o ../lib/joedog/libjoedog.la -ldl -lssl -lcrypto
mkdir .libs
gcc -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -DOPENSSL_NO_KRB5 -g -O2 -o siege auth.o base64.o client.o cookie.o cfg.o crew.o data.o date.o eval.o getopt.o getopt1.o handler.o hash.o http.o init.o load.o log.o main.o md5.o sock.o ssl.o timer.o url.o util.o version.o -L/usr/lib -lpthread ../lib/joedog/.libs/libjoedog.a -ldl -lssl -lcrypto
make[1]: Leaving directory `/home/kapil/testing/siege/src’
Making all in utils
make[1]: Entering directory `/home/kapil/testing/siege/utils’
make[1]: Nothing to be done for `all’.
make[1]: Leaving directory `/home/kapil/testing/siege/utils’
Making all in doc
make[1]: Entering directory `/home/kapil/testing/siege/doc’
make[1]: Nothing to be done for `all’.
make[1]: Leaving directory `/home/kapil/testing/siege/doc’
Making all in html
make[1]: Entering directory `/home/kapil/testing/siege/html’
make[1]: Nothing to be done for `all’.
make[1]: Leaving directory `/home/kapil/testing/siege/html’

Now you can use following command.

[root@kapil-pc siege ~]# make install
Making install in .
make[1]: Entering directory `/home/kapil/testing/siege’
make[2]: Entering directory `/home/kapil/testing/siege’
make[2]: Nothing to be done for `install-exec-am’.
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege’
make[1]: Leaving directory `/home/kapil/testing/siege’
Making install in include
make[1]: Entering directory `/home/kapil/testing/siege/include’
Making install in joedog
make[2]: Entering directory `/home/kapil/testing/siege/include/joedog’
make[3]: Entering directory `/home/kapil/testing/siege/include/joedog’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/include/joedog’
make[2]: Leaving directory `/home/kapil/testing/siege/include/joedog’
make[2]: Entering directory `/home/kapil/testing/siege/include’
make[3]: Entering directory `/home/kapil/testing/siege/include’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/include’
make[2]: Leaving directory `/home/kapil/testing/siege/include’
make[1]: Leaving directory `/home/kapil/testing/siege/include’
Making install in lib
make[1]: Entering directory `/home/kapil/testing/siege/lib’
Making install in joedog
make[2]: Entering directory `/home/kapil/testing/siege/lib/joedog’
make[3]: Entering directory `/home/kapil/testing/siege/lib/joedog’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/lib/joedog’
make[2]: Leaving directory `/home/kapil/testing/siege/lib/joedog’
make[2]: Entering directory `/home/kapil/testing/siege/lib’
make[3]: Entering directory `/home/kapil/testing/siege/lib’
make[3]: Nothing to be done for `install-exec-am’.
make[3]: Nothing to be done for `install-data-am’.
make[3]: Leaving directory `/home/kapil/testing/siege/lib’
make[2]: Leaving directory `/home/kapil/testing/siege/lib’
make[1]: Leaving directory `/home/kapil/testing/siege/lib’
Making install in src
make[1]: Entering directory `/home/kapil/testing/siege/src’
make[2]: Entering directory `/home/kapil/testing/siege/src’
test -z “/usr/local/bin” || mkdir -p — “/usr/local/bin”
/bin/sh ../libtool –mode=install /usr/bin/install -c ‘siege’ ‘/usr/local/bin/siege’
/usr/bin/install -c siege /usr/local/bin/siege
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/src’
make[1]: Leaving directory `/home/kapil/testing/siege/src’
Making install in utils
make[1]: Entering directory `/home/kapil/testing/siege/utils’
make[2]: Entering directory `/home/kapil/testing/siege/utils’
make install-exec-hook
make[3]: Entering directory `/home/kapil/testing/siege/utils’
/bin/sh ../utils/mkinstalldirs /usr/local/bin
/bin/sh ../libtool –mode=install /usr/bin/install -c bombardment /usr/local/bin/bombardment
/usr/bin/install -c bombardment /usr/local/bin/bombardment
/bin/sh ../libtool –mode=install /usr/bin/install -c siege2csv.pl /usr/local/bin/siege2csv.pl
/usr/bin/install -c siege2csv.pl /usr/local/bin/siege2csv.pl
/bin/sh ../libtool –mode=install /usr/bin/install -c siege.config /usr/local/bin/siege.config
/usr/bin/install -c siege.config /usr/local/bin/siege.config
make[3]: Leaving directory `/home/kapil/testing/siege/utils’
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/utils’
make[1]: Leaving directory `/home/kapil/testing/siege/utils’
Making install in doc
make[1]: Entering directory `/home/kapil/testing/siege/doc’
make[2]: Entering directory `/home/kapil/testing/siege/doc’
make install-exec-hook
make[3]: Entering directory `/home/kapil/testing/siege/doc’
make[3]: Leaving directory `/home/kapil/testing/siege/doc’
test -z “/usr/local/man/man1” || mkdir -p — “/usr/local/man/man1”
/usr/bin/install -c -m 644 ‘./siege.1’ ‘/usr/local/man/man1/siege.1’
/usr/bin/install -c -m 644 ‘./siege.config.1’ ‘/usr/local/man/man1/siege.config.1’
/usr/bin/install -c -m 644 ‘./bombardment.1’ ‘/usr/local/man/man1/bombardment.1’
/usr/bin/install -c -m 644 ‘./siege2csv.1’ ‘/usr/local/man/man1/siege2csv.1’
test -z “/usr/local/man/man5” || mkdir -p — “/usr/local/man/man5”
/usr/bin/install -c -m 644 ‘./urls_txt.5’ ‘/usr/local/man/man5/urls_txt.5’
test -z “/usr/local/man/man7” || mkdir -p — “/usr/local/man/man7″
/usr/bin/install -c -m 644 ‘./layingsiege.7’ ‘/usr/local/man/man7/layingsiege.7′
make[2]: Leaving directory `/home/kapil/testing/siege/doc’
make[1]: Leaving directory `/home/kapil/testing/siege/doc’
Making install in html
make[1]: Entering directory `/home/kapil/testing/siege/html’
make[2]: Entering directory `/home/kapil/testing/siege/html’
make install-exec-hook
make[3]: Entering directory `/home/kapil/testing/siege/html’
HTML pages not installed
make[3]: Leaving directory `/home/kapil/testing/siege/html’
make[2]: Nothing to be done for `install-data-am’.
make[2]: Leaving directory `/home/kapil/testing/siege/html’
make[1]: Leaving directory `/home/kapil/testing/siege/html’

Now siege installation is done. Than Use following command for using the siege for testing.

[root@kapil-pc siege ~]# siege
SIEGE 2.69
Usage: siege [options]
siege [options] URL
siege -g URL
Options:
-V, –version VERSION, prints version number to screen.
-h, –help HELP, prints this section.
-C, –config CONFIGURATION, show the current configuration.
-v, –verbose VERBOSE, prints notification to screen.
-g, –get GET, pull down headers from the server and display HTTP
transaction. Great for web application debugging.
-c, –concurrent=NUM CONCURRENT users, default is 10
-u, –url=”URL” Deprecated. Set URL as the last argument.
-i, –internet INTERNET user simulation, hits the URLs randomly.
-b, –benchmark BENCHMARK, signifies no delay for time testing.
-t, –time=NUMm TIME based testing where “m” is the modifier S, M, or H
no space between NUM and “m”, ex: –time=1H, one hour test.
-r, –reps=NUM REPS, number of times to run the test, default is 25
-f, –file=FILE FILE, change the configuration file to file.
-R, –rc=FILE RC, change the siegerc file to file. Overrides
the SIEGERC environmental variable.
-l, –log LOG, logs the transaction to PREFIX/var/siege.log
-m, –mark=”text” MARK, mark the log file with a string separator.
-d, –delay=NUM Time DELAY, random delay between 1 and num designed
to simulate human activity. Default value is 3
-H, –header=”text” Add a header to request (can be many)
-A, –user-agent=”text” Sets User-Agent in request
[root@kapil-pc siege ~]#

How to use memcached with php

Using this tutorial you will know, How to use memcached with php. We given code for using memcache with php. we shown you to configure memcache with php.

How to use memcached with php

 

How to use memcached with php
How to use memcached with php

If you try to install memcached with Linux server then use following commands

# yum install libevent
# yum install libmemcached libmemcached-devel
# yum install memcached

For Starting the memcached server
# memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody

11211 port is default port for memcached server.

For using the memecached with php client you need to install following package

# pecl install memcache

After installing all packages restart the apache server.

# /etc/sbin/service httpd restart

<!--?php
/* OO API */
$memcache_obj = new Memcache;
$memcache_obj--->connect('memcache_host', 11211);
$memcache_obj->set('any_key', 'some value', MEMCACHE_COMPRESSED, 50);
echo $memcache_obj->get('any_key');
?>

Important Note: Memcached key has limitations of 250 charactors, So key value should be with in 250 charactors.