YouTube Inc. struck deals with CBS and two major music labels Monday as the popular video-sharing Web site races to befriend content providers and avoid copyright infringement lawsuits.

The separate agreements with CBS, Vivendi’s Universal Music Group and Sony BMG Music Entertainment come less than a month after YouTube reached a deal with Warner Music Group Corp. Hours after announcing the agreements, Google Inc. announced it would acquire the video site for $1.65 billion.