This question already has an answer here:

I know this kind of questions has been asked before, I want to know the detailed procedure to sign on msgs and derive the r, v, s(the command line), and the client and environment it needs to do the signing, thanks. (I now use mist)

marked as duplicate by Waqar Lim May 17 '16 at 9:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.