I searched the Internet, and most suggest that pull-ups do not require warming up. But that advice is for "normal" people and professionals, while I have a weak body. I can at best manage to do two pull-ups, and then it will hurt for days. Can anyone give me some suggestions about how to do proper warming up before pull-ups?
When you say "hurt", do you think its a muscle soreness (a broad, burning sensation in your muscles), or joint pain (sharp, localized pain in your elbows, shoulders, or upper back)? If its muscle soreness, that's to be expected. Joint pain is something else.
Its possible that you don't have a "warming up" problem, but that you're just not strong enough to do any more than 2 pullups right now. That's fine, everybody was there once.
From my own personal history: 4 years ago, I couldn't do more than 1 pullup. I've worked at it on and off since then, and can now do a dozen.
What didn't work for me
I agree with you, when you look at the literature on starting to do pullups, you see a lot of advice to just start with your body weight, and do as many as you can. People also recommend doing "negative only" pullups, where you jump over the bar and lower yourself down.
I imagine that actually works for some people (experienced athletes, weightlifters who've never tried to do pullups, lightweight athletes), but it never worked for me. Back when I tried to do that, I kept hurting myself. My shoulder girdle simply wasn't strong enough to handle the strain, and I'd get a lot of pinching around my shoulder blade. Also, I had a flexibility issue in my bicep that caused my left elbow to keep getting tendonitis when I'd lower. Trying to work directly with my bodyweight was just something I wasn't ready for yet.
What did work for me
If you're only able to do a very low number of pullups (<5), and feel stuck at that number, I'd recommend trying to find a gym that has an assisted pullup machine (preferably), or a lat pulldown machine. On either machine, find a weight where you can perform the pulling motion for 3 sets of 7-10 repetitions, and try to build from there. If you're stuck with a lat pulldown machine, try and stick with a shoulder-width grip, like you'd use on a regular pullup. Focus on doing pulls (on either machine) with proper form, and through a full range of motion, bring the bar down under your chin, to your neck. As you get able to do 10 reps, bump the weight up, and and do sets of 7 reps.
If you keep this up, hopefully you'll get closer and closer to pulling down your bodyweight (on a lat pulldown) or needing almost no assistance (on a assisted pullup machine). At some point you'll have to start bridging over to doing real pullups, and there will be an adjustment period, because the machines won't completely capture the real pullup motion, but you'll be in a much better position to tackle them then!
I would suggest putting goals and a exercise plan together so you can workout in a progressive manner without getting injured or discouraged. Doing 2 pull ups and being in pain for a few days is a sign that you need to build up your core and back (and probably all other) main muscle groups. Don't get discouraged, get organized, set goals and plan it out.