How do I see the chat history in an IRC channel?

For the greeting, often the channel registration service provides this. Foonetic's ChanServ has an option called "ENTRYMSG":

<grawity> help set entrymsg          
-ChanServ- ***** ChanServ Help *****  
-ChanServ- Help for SET ENTRYMSG:           
-ChanServ-                                 
-ChanServ- SET ENTRYMSG allows you to change or set
-ChanServ- a message sent to all users joining the
-ChanServ- channel.                                           
-ChanServ-                            
-ChanServ- Syntax: SET <#channel> ENTRYMSG [message]
-ChanServ-                                  
-ChanServ- Example:                                                   
-ChanServ-     /msg ChanServ SET #support ENTRYMSG Welcome to #support. Please do not paste more than 5 lines.
-ChanServ- ***** End of Help *****

The backlog is harder. Most IRC servers don't have any sort of message logging – both for privacy and performance reasons – so the user never knows what messages were sent before joining the channel. Some users use IRC bouncers (like ZNC or psyBNC) that stay in the channel 24/7 and send the last few messages when the user connects to the bouncer. Web-based clients, such as Mibbit, do this by having a shared log – as long as at least one Mibbit user is in the channel, all other users can receive the backlog.

On top of that, until recently, IRC did not have any way of transmitting the original timestamps, so if the history was replayed, all old messages would show up as sent all at once, with an ugly "[12:34]" added to the message text. Nowadays there's an optional extension for this, but only the ZNC bouncer and maybe 2–3 clients support it yet. But it still works only when replaying is done by the server (or bouncer) itself, not when done by a bot.

So you can get this only by a) writing a bot that would provide backlog on request, or b) asking users to use an IRC bouncer that provides this feature.