* Q1 EPS ex items 15 cents vs Street view 14 cents
* Q1 revenue $174 million vs Street view $172 million
* Operating margin rises to 23.4 percent
* Shares mixed in extended trading
By Jim Finkle
BOSTON, June 24 (Reuters) - Software company Red Hat Inc (RHT.N) reported a 7 percent rise in quarterly profit onWednesday, bucking an industry trend of declining earnings, as margins widened under the scrutiny of its cost-conscious CEO.
Operating margin rose to 23.4 percent from 21.8 percent a year earlier, after excluding stock compensation and amortization expenses. That was better than the 23 percent the company projected three months ago.
Profitability has been improving since last year when the world's biggest provider of Linux software tapped former Delta Air Lines Inc (DAL.N) executive James Whitehurst as its CEO. He has imposed tight cost controls, drawing on experience squeezing costs out of the struggling, low-margin carrier.
"I know how to put a lid on costs where you need to. I've done a lot of that in my life," Whitehurst said in an interview.
Red Hat, whose rivals include Novell Inc NOVL.O and Microsoft Corp (MSFT.O), sells subscriptions to maintenance contracts that provide upgrades, help-desk support and bug fixes for Linux software.
Net income rose to $18.5 million, or 10 cents per share during the fiscal first quarter ended May 31, from $17.3 million, or 8 cents, a year earlier.
Red Hat claimed the modest profit increase after a string of bigger technology companies posted earnings declines. In its most recent quarter, No. 1 software maker Microsoft's net income dropped 32 percent from a year earlier. Oracle Corp ORCL.O said on Tuesday that profit fell 7 percent.
Red Hat has weathered the recession well partly because it sells its products via subscriptions that lock in investors over multiple years.
Whitehurst said that over the past few years Red Hat has only lost one major client -- Oracle Corp ORCL.O, which stopped using his company's software when it started selling a rival product.
He said Red Hat's Linux operating system is taking share away from Sun Microsystems Inc's JAVA.O Solaris operating system and its JBoss middleware is winning customers away from Oracle.
Red Hat's profit, excluding items, of 15 cents per share beat analysts' average forecast of 14 cents, according to Reuters Estimates.
Revenue rose 11 percent to $174 million, versus the average forecast of $172 million.
"It's slow, steady improvement, which is what you like to see as an investor. It's more sustainable than any one-time surge," said Jefferies & Co analyst Katherine Egbert.
Red Hat's stock is up 49 percent so far this year, making it one of the top-performing software companies. Microsoft shares have risen 20 percent so far this year, Oracle has risen 12 percent and the Nasdaq Composite Index has gained 12 percent.
The company forecast it will report second-quarter profit of 14 cents to 15 cents per share on revenue of $178 million to $180 million. Analysts expect the company to report profit of 15 cents per share on revenue of $179 million.
Red Hat also projected an operating margin of 23 percent.
The shares of the Raleigh, North Carolina-based company fell to $20 after rising to $20.50 in extended trading. They rose 2.5 percent to close at $20.13 on the New York Stock Exchange. (Reporting by Jim Finkle; editing by Andre Grenon)